Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: add shared Markdown renderer and toast notification system
nirholasdb845e6e4e6e
diff --git a/.env.example b/.env.exampleindex d6d02c9bd..4bf7f938a 100644--- a/.env.example+++ b/.env.example@@ -71,7 +71,7 @@ PASSWORD_ROUNDS=11# /api/chat picks a provider in this order (first key found wins, unless the# client explicitly sets `provider` in the request body):-# 1. ANTHROPIC_API_KEY → Claude Sonnet 4.6 (best tool calling)+# 1. ANTHROPIC_API_KEY → Claude Sonnet 5 (best tool calling)# 2. OPENROUTER_API_KEY → free-tier models (Llama 3.3 70B, GPT-OSS, Hermes 3)# 3. GROQ_API_KEY → Llama 3.3 70B on Groq (sub-second latency)# 4. OPENAI_API_KEY → gpt-4o-mini@@ -79,7 +79,7 @@ PASSWORD_ROUNDS=11# Anthropic — get a key at https://console.anthropic.comANTHROPIC_API_KEY=# Optional overrides for chat model + output cap.-CHAT_MODEL=claude-sonnet-4-6+CHAT_MODEL=claude-sonnet-5CHAT_MAX_TOKENS=1024# Admin key for three.ws chat brand config. Set in Vercel, enter in chat settings to unlock branding panel.diff --git a/OAI Select Tier Assets/README.md b/OAI Select Tier Assets/README.mdnew file mode 100644index 000000000..ef751f172--- /dev/null+++ b/OAI Select Tier Assets/README.md@@ -0,0 +1,3 @@+# OAI Select Tier Assets/++Partner-supplied OpenAI Select Partner badge assets and the press-release template, exactly as delivered by OpenAI. Do not modify, recolor, or recompose these files; usage rules live in [marketing/openai-select-partner/badge-usage.md](../marketing/openai-select-partner/badge-usage.md), and the derived web assets ship from [public/partners/openai/](../public/partners/openai/). The press release is gated on OpenAI's written approval before publishing (see [marketing/openai-select-partner/README.md](../marketing/openai-select-partner/README.md)).diff --git a/agents/fact-checker/src/llm-verdict.js b/agents/fact-checker/src/llm-verdict.jsindex bb13737be..8628a19fc 100644--- a/agents/fact-checker/src/llm-verdict.js+++ b/agents/fact-checker/src/llm-verdict.js@@ -79,11 +79,11 @@ export async function analyzeResults(claim, results) {const numbered = results.map((r, i) =>- `[${i + 1}] Title: ${r.title}\nURL: ${r.url}\nContent: ${r.snippet.slice(0, 500)}`,+ `[${i + 1}] Title: ${r.title}\nURL: ${r.url}\nContent: ${r.snippet.slice(0, 900)}`,).join('\n\n');- const prompt = `You are a fact-checking assistant. Given a claim and ${results.length} search result(s), analyze each result.+ const prompt = `You are a rigorous fact-checker. Given a claim and ${results.length} search result(s), judge each result's stance toward the claim USING ONLY the provided content.Claim: "${claim}"@@ -93,9 +93,12 @@ ${numbered}For each result (1 through ${results.length}), output:- excerpt: a 200-character or shorter direct quote or paraphrase from the content that is most relevant to the claim- stance: one of "supports", "contradicts", or "neutral"- - "supports" = the source backs the claim- - "contradicts" = the source refutes the claim- - "neutral" = the source is tangentially related but neither supports nor contradicts++Stance rubric — commit to a stance whenever the content addresses the claim's central assertion:+- "supports": the content affirms the claim's central assertion, including via paraphrase or equivalent figures (e.g. claim says 330 m, source says "about 330 metres" or "1,083 ft").+- "contradicts": the content states something INCOMPATIBLE with the claim. A different number, a different record-holder, a different date, or an explicit negation is a contradiction, NOT neutral. If the claim says "the tallest is X" and the source names Y as tallest, that contradicts.+- "neutral": ONLY when the content genuinely does not address the claim's central assertion (same broad topic but silent on the specific fact). Do not use neutral as a low-effort default; check the numbers and named entities first.+- If the claim conjoins several assertions and the content affirms one while refuting another, choose the stance for the assertion the content speaks to most directly (supports if it affirms that part, contradicts if it refutes it).Output ONLY a valid JSON array with ${results.length} objects, in order, each with fields "excerpt" (string) and "stance" (string).No markdown, no explanation, just the JSON array.diff --git a/agents/fact-checker/src/search-sources.js b/agents/fact-checker/src/search-sources.jsindex 58c684a97..0c2ebbd4b 100644--- a/agents/fact-checker/src/search-sources.js+++ b/agents/fact-checker/src/search-sources.js@@ -1,8 +1,10 @@// Multi-source web search with fallback chain.-// Priority: Brave → Tavily → Exa → Serper → Wikipedia full-text search →-// DuckDuckGo instant answer.+// Priority: Vertex-grounded Google Search → Brave → Tavily → Exa → Serper →+// Wikipedia full-text search → DuckDuckGo instant answer.// At least 3 results are always returned (or a descriptive error thrown).+import { webSearchAvailable, groundedSearch } from '../../../api/_lib/web-search.js';+const TIMEOUT_MS = 10_000;function withTimeout(promise, ms) {@@ -14,6 +16,35 @@ function withTimeout(promise, ms) {]);}+// ── Vertex-grounded Google Search (keyless, GCP service-account auth) ────────+//+// The one rung that works in production today: no Brave/Tavily/Exa/Serper key+// is configured there, so without this the chain fell straight through to the+// Wikipedia/DuckDuckGo fallbacks. Rides Gemini on Vertex AI with the built-in+// google_search tool (api/_lib/web-search.js), gated on webSearchAvailable()+// (GOOGLE_CLOUD_PROJECT) exactly like the key rungs gate on their env keys.+//+// Shape note: grounding chunks carry title + url but no per-source snippet.+// The synthesized answer IS the evidence text Google grounded on these+// sources, so it becomes each result's snippet: the fact-check consumer+// (api/x402/fact-check.js) feeds snippet.slice(0, 900) to stance extraction+// and falls back to snippet.slice(0, 200) for the excerpt, both of which want+// claim-relevant prose, not a bare domain. Authority stays per-URL via+// authorityScore(r.url) in the consumer; no per-rung weight exists here.+async function searchVertexGrounded(query) {+ if (!webSearchAvailable()) return null;++ // groundedSearch enforces its own 20s abort (LLM synthesis regularly needs+ // more than the flat-HTTP TIMEOUT_MS the other rungs use).+ const { answer, sources } = await groundedSearch(query, { maxSources: 10 });+ const snippet = String(answer || '').trim();+ return sources.map((s) => ({+ url: s.url,+ title: s.title || s.domain || '',+ snippet: snippet || s.domain || '',+ }));+}+// ── Brave Search ──────────────────────────────────────────────────────────────async function searchBrave(query) {@@ -145,7 +176,18 @@ async function searchSerper(query) {// ranking over sentence-shaped queries and needs no API key or account, so it// sits ahead of the DDG fallback: strictly more capable, same zero-config cost.async function searchWikipedia(query) {- const url = `https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=${encodeURIComponent(query)}&srlimit=5&format=json&origin=*`;+ // generator=search + prop=extracts fetches the ranked pages AND their intro+ // text in ONE request. The old list=search call only returned the ~150-char+ // search-match snippet (the bolded fragment around the keyword hit), which+ // rarely contains the fact being checked — downstream stance extraction+ // marked nearly every such source "neutral" and the whole chain collapsed to+ // "mixed" (the 20% benchmark run of 2026-07-08). A plain-text intro extract+ // actually states the page's core facts, which is what a stance judgment+ // needs. Same endpoint, same zero-config cost.+ const url =+ 'https://en.wikipedia.org/w/api.php?action=query&generator=search' ++ `&gsrsearch=${encodeURIComponent(query)}&gsrlimit=5` ++ '&prop=extracts&exintro=1&explaintext=1&exlimit=max&format=json&origin=*';const res = await withTimeout(fetch(url, { headers: { accept: 'application/json', 'user-agent': 'three.ws-fact-checker/1.0 (+https://three.ws)' } }),TIMEOUT_MS,@@ -154,20 +196,14 @@ async function searchWikipedia(query) {throw new Error(`Wikipedia search HTTP ${res.status}`);}const data = await res.json();- const results = data?.query?.search || [];- return results.map((r) => ({- url: `https://en.wikipedia.org/wiki/${encodeURIComponent(String(r.title || '').replace(/ /g, '_'))}`,- title: r.title || '',- // Strip the <span class="searchmatch"> highlight markup and decode the- // standard XML-safe entities MediaWiki escapes snippets with.- snippet: decodeXmlEntities(String(r.snippet || '').replace(/<[^>]+>/g, '')),- }));-}--function decodeXmlEntities(s) {- return s.replace(/&(amp|lt|gt|quot|#0?39);/g, (_, e) =>- ({ amp: '&', lt: '<', gt: '>', quot: '"', '#39': "'", '#039': "'" })[e],- );+ const pages = Object.values(data?.query?.pages || {});+ // generator results are unordered; `index` carries the search ranking.+ pages.sort((a, b) => (a.index ?? 99) - (b.index ?? 99));+ return pages.map((p) => ({+ url: `https://en.wikipedia.org/wiki/${encodeURIComponent(String(p.title || '').replace(/ /g, '_'))}`,+ title: p.title || '',+ snippet: String(p.extract || '').trim().slice(0, 1200),+ })).filter((r) => r.snippet);}// ── DuckDuckGo instant answer (fallback) ──────────────────────────────────────@@ -235,12 +271,14 @@ function deduplicate(results) {* @returns {Promise<Array<{url: string, title: string, snippet: string}>>}*/export async function searchWeb(query) {+ const hasVertex = webSearchAvailable();const hasBrave = Boolean(process.env.BRAVE_API_KEY);const hasTavily = Boolean(process.env.TAVILY_API_KEY);const hasExa = Boolean(process.env.EXA_API_KEY);const hasSerper = Boolean(process.env.SERPER_API_KEY);const searchFns = [];+ if (hasVertex) searchFns.push(searchVertexGrounded);if (hasBrave) searchFns.push(searchBrave);if (hasTavily) searchFns.push(searchTavily);if (hasExa) searchFns.push(searchExa);diff --git a/api/_lib/agent-trade-guards.js b/api/_lib/agent-trade-guards.jsindex b4a0f8a65..2337dd08e 100644--- a/api/_lib/agent-trade-guards.js+++ b/api/_lib/agent-trade-guards.js@@ -60,6 +60,28 @@ const MAX_ALLOWLIST = 50;// agent-wallet trade endpoint import this rather than redefining it.export const SOL_FEE_HEADROOM_LAMPORTS = 3_000_000n; // ~0.003 SOL+// Rent-exempt minimum of the SPL token account a buy opens. Not optional and not+// recoverable until the position closes, so any floor that ignores it is wrong.+export const ATA_RENT_LAMPORTS = 2_039_280n;++// What an entry costs BESIDES the buy itself: fee headroom + the token ATA's rent+// + room for a priority fee and an MEV tip. A wallet holding only `size` cannot+// actually buy `size`.+export const ENTRY_HEADROOM_LAMPORTS = SOL_FEE_HEADROOM_LAMPORTS + ATA_RENT_LAMPORTS + 1_000_000n;++// The least SOL an agent wallet can hold and still complete ONE trade end to end:+// the entry overhead above, plus the firewall's round-trip probe reserve (it+// simulates a real buy AND sell from this wallet), plus a minimum entry. Below+// this a wallet looks funded and is operationally dead — every buy aborts at the+// safety simulation it cannot afford to run.+//+// This is the number every system that MOVES SOL OUT of a trading wallet must+// respect. It exists because two subsystems disagreed about it: the economy's+// idle-capital reclaim kept `per_trade × 2` (as little as 0.004 SOL) while the+// executor needed ~0.012 to place that same trade, so reclaim could strip an+// enabled arm to a balance that could never buy anything.+export const MIN_OPERATIONAL_WALLET_SOL = 0.012;+export const SPEND_LIMIT_DEFAULTS = Object.freeze({daily_usd: null,per_tx_usd: null,diff --git a/api/_lib/economy-rebalance.js b/api/_lib/economy-rebalance.jsindex a95b2e35e..4f288f90b 100644--- a/api/_lib/economy-rebalance.js+++ b/api/_lib/economy-rebalance.js@@ -29,6 +29,22 @@ export const WSOL_MINT = 'So11111111111111111111111111111111111111112';const LAMPORTS_PER_SOL = 1_000_000_000;const USDC_ATOMICS = 10 ** USDC_DECIMALS;+// The USDC-spending engine wallets and their floors: the shared allowlist for+// every USDC refill path (the rebalance cron's swap legs AND the master's+// direct topup in economy-usdc-topup.js), so the two can never disagree on who+// qualifies or at what floor. floorUsd is env-overridable per role.+//+// selfPayFee: this wallet ALSO pays its own SOL network fee on every self-pay+// ring settle, so it has a second, independent need: SOL. Without it the+// planner only ever saw the USDC side, and a payer that drifted under the+// settle floor while holding plenty of USDC deadlocked the whole ring (July+// 2026, twice): the facilitator rejected every settle while the rebalancer+// reported "above_floor".+export const USDC_WALLETS = [+ { role: 'x402-ring-payer', floorEnv: 'ECONOMY_REBALANCE_RING_USDC_FLOOR', floorDflt: 10, selfPayFee: true },+ { role: 'a2a-payer', floorEnv: 'ECONOMY_REBALANCE_A2A_USDC_FLOOR', floorDflt: 5 },+];+function num(name, dflt) {const v = Number(process.env[name]);return Number.isFinite(v) && v >= 0 ? v : dflt;diff --git a/api/_lib/economy-sweepback.js b/api/_lib/economy-sweepback.jsindex 5ede2b1e3..a642076db 100644--- a/api/_lib/economy-sweepback.js+++ b/api/_lib/economy-sweepback.js@@ -29,6 +29,7 @@ import { SOLANA_SIGNERS, loadSignerKeypair } from './solana-signers.js';import { ECONOMY_MASTER_ADDRESS } from './economy-master.js';import { sendSol, LAMPORTS_PER_SOL } from './avatar-wallet.js';import { submitProtected } from './execution-engine.js';+import { MIN_OPERATIONAL_WALLET_SOL } from './agent-trade-guards.js';// Same float the treasury-topup cron refills to — sweep only above it.const DEFAULT_REFILL_MULTIPLE = 3;@@ -460,8 +461,17 @@ const AGENT_RECLAIM_MAX_WALLETS = num('AGENT_RECLAIM_MAX_WALLETS', 40);export function agentReclaimFloorSol(strategy = {}) {if (!strategy.enabled) return AGENT_IDLE_FLOOR_SOL;const perTrade = Number(strategy.perTradeSol);- if (!Number.isFinite(perTrade) || perTrade <= 0) return AGENT_IDLE_FLOOR_SOL;- return round(Math.max(AGENT_IDLE_FLOOR_SOL, perTrade * AGENT_ACTIVE_TRADE_MULTIPLE));+ // An ENABLED arm always keeps at least what one complete trade costs. Sizing the+ // floor on `per_trade × 2` alone ignored everything a buy needs BESIDES the buy+ // — the token ATA's rent, the fee and tip headroom, and the round-trip probe the+ // firewall simulates from this same wallet — so a small-size arm could be+ // reclaimed down to 0.004 SOL and then abort every entry at a safety simulation+ // it could no longer afford to run. Fully funded and operationally dead is the+ // worst state to leave a trader in: it looks healthy on every dashboard.+ const working = Number.isFinite(perTrade) && perTrade > 0+ ? perTrade * AGENT_ACTIVE_TRADE_MULTIPLE + MIN_OPERATIONAL_WALLET_SOL+ : MIN_OPERATIONAL_WALLET_SOL;+ return round(Math.max(AGENT_IDLE_FLOOR_SOL, working));}/**diff --git a/api/_lib/economy-usdc-topup.js b/api/_lib/economy-usdc-topup.jsnew file mode 100644index 000000000..1bb20d567--- /dev/null+++ b/api/_lib/economy-usdc-topup.js@@ -0,0 +1,262 @@+// @ts-check+// api/_lib/economy-usdc-topup.js+//+// Keeps the USDC-spending engine wallets stocked from the master's idle USDC.+//+// WHY THIS EXISTS. The x402 ring payer and the a2a settlement payer spend USDC+// on every settlement, and until now their only refill path was economy-rebalance+// swapping their OWN SOL into USDC on Jupiter. When a payer holds neither spare+// SOL nor USDC while the funding master sits on idle USDC revenue, the payer+// starves inside arm's reach of the money: settles die with SPL Custom:1+// (insufficient funds) while the master's ATA holds multiples of the shortfall+// (observed 2026-07-28: payer at ~5 USDC failing every $10 ring-settle leg,+// master idle at 48 USDC). This module closes that gap with a direct+// master -> payer USDC transfer: no swap, no slippage, one signature.+//+// Safe by construction:+// • Only ever pays registry-resolved USDC engine wallets (USDC_WALLETS from+// economy-rebalance.js is the allowlist), never an arbitrary address and+// never the master itself.+// • Armed per wallet only while its USDC sits BELOW its floor; the transfer+// refills toward floor x REFILL_MULTIPLE so it does not re-trigger every+// run (same hysteresis shape as the fee-SOL leg in economy-rebalance).+// • Triple-bounded: per-transfer cap, per-UTC-day cap, and a master USDC+// keep-floor the topup never spends below (leaves refuelMasterFromUsdc its+// own fuel). A cooldown guards against a same-minute double run.+// • Non-oscillating with the other crons: recipients carry holdsTokens in the+// registry, so treasury-sweepback's token sweep never claws the USDC back.+// • Every transfer is booked to economy_usdc_topups (drives the daily cap)+// and mirrored to the audit log.+//+// Inert switch: ECONOMY_USDC_TOPUP_ENABLED=0 turns it off entirely.++import { sql } from './db.js';+import { loadEconomyMaster } from './economy-master.js';+import { USDC_WALLETS } from './economy-rebalance.js';+import { USDC_MINT_BY_NETWORK, USDC_DECIMALS } from './vault-jupiter.js';+import { SOLANA_SIGNERS, resolveSignerPubkey } from './solana-signers.js';+import { submitProtected } from './execution-engine.js';+import { logAudit } from './audit.js';++const USDC_ATOMICS = 10 ** USDC_DECIMALS;++function num(name, dflt) {+ const v = Number(process.env[name]);+ return Number.isFinite(v) && v >= 0 ? v : dflt;+}++/** Direct master -> engine USDC refill is on unless explicitly disabled. */+export const USDC_TOPUP_ENABLED = process.env.ECONOMY_USDC_TOPUP_ENABLED !== '0';+/** Never spend the master's USDC below this (reserve for the SOL refuel swap). */+export const USDC_TOPUP_MASTER_KEEP = num('ECONOMY_USDC_TOPUP_MASTER_KEEP', 10);+/** Most USDC a single transfer may move. */+export const USDC_TOPUP_PER_TRANSFER = num('ECONOMY_USDC_TOPUP_PER_TRANSFER_USD', 15);+/** Most USDC all topups may move in one UTC day. */+export const USDC_TOPUP_DAILY = num('ECONOMY_USDC_TOPUP_DAILY_USD', 40);+/** Refill toward floor x this, so a topped-up wallet has real runway. */+export const USDC_TOPUP_REFILL_MULTIPLE = num('ECONOMY_USDC_TOPUP_REFILL_MULTIPLE', 1.5);+/** A transfer below this is not worth its fee. */+const MIN_TRANSFER_USD = 1;+/** Minimum seconds between two topup runs that move money. */+export const USDC_TOPUP_COOLDOWN_S = num('ECONOMY_USDC_TOPUP_COOLDOWN_S', 90);++/**+ * Pure topup decision + sizing, no RPC, no DB, so the bounds are unit-testable+ * (mirrors planRefuel in economy-fuel.js). Neediest wallet first; each transfer+ * draws down the shared per-run/day/master budgets.+ *+ * @param {object} a+ * @param {number} a.masterUsdc master USDC balance (whole tokens)+ * @param {number} a.spentTodayUsd USDC already topped up today (UTC)+ * @param {Array<{name:string,pubkey:string,usdc:number,floorUsd:number}>} a.wallets+ * @param {object} [a.caps] { masterKeep, perTransferUsd, dailyUsd, refillMultiple, minTransferUsd }+ * @returns {{ plan:Array<{name:string,pubkey:string,sendUsd:number,reason:string}>,+ * skipped:Array<{name:string,reason:string}> }}+ */+export function planUsdcTopups({ masterUsdc, spentTodayUsd, wallets, caps }) {+ const C = caps || {+ masterKeep: USDC_TOPUP_MASTER_KEEP,+ perTransferUsd: USDC_TOPUP_PER_TRANSFER,+ dailyUsd: USDC_TOPUP_DAILY,+ refillMultiple: USDC_TOPUP_REFILL_MULTIPLE,+ minTransferUsd: MIN_TRANSFER_USD,+ };+ const plan = [];+ const skipped = [];+ let masterSpendable = Math.max(0, masterUsdc - C.masterKeep);+ let dailyRemaining = Math.max(0, C.dailyUsd - spentTodayUsd);++ const rows = wallets+ .map((w) => ({ w, shortfallUsd: Math.max(0, w.floorUsd - w.usdc) }))+ .sort((a, b) => b.shortfallUsd - a.shortfallUsd);++ for (const { w, shortfallUsd } of rows) {+ // Armed only below the floor itself; the refill target is only how HIGH we+ // lift, never what arms the transfer, so a wallet between floor and target+ // sits in a stable band instead of drawing a trickle every run.+ if (shortfallUsd <= 0) {+ skipped.push({ name: w.name, reason: 'above_floor' });+ continue;+ }+ const targetUsd = w.floorUsd * C.refillMultiple;+ const sendUsd = round(Math.min(targetUsd - w.usdc, C.perTransferUsd, dailyRemaining, masterSpendable));+ if (sendUsd < C.minTransferUsd) {+ const reason =+ dailyRemaining < C.minTransferUsd ? 'daily_cap_reached'+ : masterSpendable < C.minTransferUsd ? 'master_at_keep_floor'+ : 'below_min_transfer';+ skipped.push({ name: w.name, reason });+ continue;+ }+ plan.push({ name: w.name, pubkey: w.pubkey, sendUsd, reason: `usdc ${w.usdc.toFixed(2)} < floor ${w.floorUsd}` });+ masterSpendable = round(masterSpendable - sendUsd);+ dailyRemaining = round(dailyRemaining - sendUsd);+ }+ return { plan, skipped };+}++let schemaReady = false;+async function ensureSchema() {+ if (schemaReady) return;+ await sql`+ CREATE TABLE IF NOT EXISTS economy_usdc_topups (+ id bigserial PRIMARY KEY,+ day date NOT NULL,+ recipient text NOT NULL,+ recipient_name text,+ usdc_atomics bigint NOT NULL,+ signature text,+ network text NOT NULL DEFAULT 'mainnet',+ created_at timestamptz NOT NULL DEFAULT now()+ )`;+ await sql`CREATE INDEX IF NOT EXISTS economy_usdc_topups_day_idx ON economy_usdc_topups (day)`;+ schemaReady = true;+}++async function usdcSentTodayUsd() {+ const rows = await sql`+ SELECT COALESCE(SUM(usdc_atomics), 0)::text AS atomics+ FROM economy_usdc_topups+ WHERE day = (now() AT TIME ZONE 'utc')::date`;+ return Number(rows?.[0]?.atomics || 0) / USDC_ATOMICS;+}++async function secondsSinceLastTopup() {+ const rows = await sql`+ SELECT EXTRACT(EPOCH FROM (now() - MAX(created_at)))::float8 AS secs+ FROM economy_usdc_topups`;+ const secs = rows?.[0]?.secs;+ return secs == null ? Infinity : Number(secs);+}++/** Read an owner's USDC balance (whole tokens) on the classic token program. */+async function readUsdcUsd(connection, ownerPubkey, mintPk) {+ const { PublicKey } = await import('@solana/web3.js');+ let atomics = 0n;+ try {+ const r = await connection.getParsedTokenAccountsByOwner(new PublicKey(ownerPubkey), { mint: mintPk });+ for (const a of r.value) atomics += BigInt(a.account.data.parsed?.info?.tokenAmount?.amount || '0');+ } catch {+ /* no ATA yet reads as zero, which is exactly what a starved wallet is */+ }+ return Number(atomics) / USDC_ATOMICS;+}++/**+ * Top up every under-floor USDC engine wallet straight from the master's USDC.+ * Reads live balances, plans with planUsdcTopups, and executes each transfer as+ * master-signed TransferChecked into the recipient's (idempotently created) ATA.+ *+ * @param {object} args+ * @param {import('@solana/web3.js').Connection} args.connection+ * @param {'mainnet'|'devnet'} [args.network]+ * @param {boolean} [args.dryRun]+ * @returns {Promise<{enabled:boolean, acted:boolean, reason?:string, masterUsdc?:number,+ * plan?:Array<object>, sent?:Array<object>, failed?:Array<object>, skipped?:Array<object>}>}+ */+export async function topUpUsdcEngines({ connection, network = 'mainnet', dryRun = false }) {+ if (!USDC_TOPUP_ENABLED) return { enabled: false, acted: false, reason: 'disabled' };++ const master = await loadEconomyMaster();+ if (!master) return { enabled: true, acted: false, reason: 'master_unconfigured' };++ const { PublicKey } = await import('@solana/web3.js');+ const mint = new PublicKey(network === 'devnet' ? USDC_MINT_BY_NETWORK.devnet : USDC_MINT_BY_NETWORK.mainnet);++ // Resolve the allowlisted USDC engines and their live balances. A wallet whose+ // secret aliases to the master can never be a target (it IS the master).+ const wallets = [];+ for (const cfg of USDC_WALLETS) {+ const spec = SOLANA_SIGNERS.find((s) => s.name === cfg.role);+ if (!spec) continue;+ const resolved = await resolveSignerPubkey(spec).catch(() => null);+ if (!resolved?.pubkey || resolved.pubkey === master.publicKey.toBase58()) continue;+ const usdc = await readUsdcUsd(connection, resolved.pubkey, mint);+ const floorUsd = Number(process.env[cfg.floorEnv]) || cfg.floorDflt;+ wallets.push({ name: cfg.role, pubkey: resolved.pubkey, usdc, floorUsd });+ }+ if (!wallets.length) return { enabled: true, acted: false, reason: 'no_targets' };++ const masterUsdc = await readUsdcUsd(connection, master.publicKey.toBase58(), mint);+ await ensureSchema();+ const spentToday = await usdcSentTodayUsd();+ const { plan, skipped } = planUsdcTopups({ masterUsdc, spentTodayUsd: spentToday, wallets });++ const base = { enabled: true, masterUsdc: round(masterUsdc), plan, skipped };+ if (!plan.length) return { ...base, acted: false, reason: 'nothing_below_floor' };+ if (dryRun) return { ...base, acted: false, reason: 'dry_run' };++ const sinceLast = await secondsSinceLastTopup();+ if (sinceLast < USDC_TOPUP_COOLDOWN_S) {+ return { ...base, acted: false, reason: 'cooldown', secondsSinceLastTopup: Math.round(sinceLast) };+ }++ const {+ TOKEN_PROGRAM_ID,+ getAssociatedTokenAddressSync,+ createAssociatedTokenAccountIdempotentInstruction,+ createTransferCheckedInstruction,+ } = await import('@solana/spl-token');++ const masterAta = getAssociatedTokenAddressSync(mint, master.publicKey, false, TOKEN_PROGRAM_ID);+ const sent = [];+ const failed = [];+ for (const leg of plan) {+ const recipient = new PublicKey(leg.pubkey);+ const recipientAta = getAssociatedTokenAddressSync(mint, recipient, false, TOKEN_PROGRAM_ID);+ const atomics = BigInt(Math.floor(leg.sendUsd * USDC_ATOMICS));+ if (atomics <= 0n) continue;+ try {+ const { signature } = await submitProtected({+ network,+ connection,+ payer: master,+ instructions: [+ createAssociatedTokenAccountIdempotentInstruction(master.publicKey, recipientAta, recipient, mint, TOKEN_PROGRAM_ID),+ createTransferCheckedInstruction(masterAta, mint, recipientAta, master.publicKey, atomics, USDC_DECIMALS, [], TOKEN_PROGRAM_ID),+ ],+ });+ sent.push({ name: leg.name, pubkey: leg.pubkey, sendUsd: leg.sendUsd, signature });+ // This row IS the daily-cap counter; a dropped write must be loud, and the+ // cooldown still bounds a same-minute repeat even without it.+ try {+ await sql`+ INSERT INTO economy_usdc_topups (day, recipient, recipient_name, usdc_atomics, signature, network)+ VALUES ((now() AT TIME ZONE 'utc')::date, ${leg.pubkey}, ${leg.name}, ${atomics.toString()}, ${signature}, ${network})`;+ } catch (e) {+ console.warn(`[usdc-topup] transfer ${signature} settled but its ledger row was NOT written: ${e?.message}`);+ }+ logAudit({+ action: 'economy_usdc_topup',+ meta: { name: leg.name, pubkey: leg.pubkey, sendUsd: leg.sendUsd, signature },+ });+ } catch (e) {+ failed.push({ name: leg.name, reason: (e?.message || 'send_failed').slice(0, 160) });+ }+ }+ return { ...base, acted: sent.length > 0, sent, failed };+}++function round(n) {+ return Math.round(n * 1e6) / 1e6;+}diff --git a/api/_lib/material-restyle-store.js b/api/_lib/material-restyle-store.jsindex 706859760..927c65b14 100644--- a/api/_lib/material-restyle-store.js+++ b/api/_lib/material-restyle-store.js@@ -104,6 +104,55 @@ export async function listRestylesByUser({ userId, limit = 24, before } = {}) {}}+/**+ * Platform-wide recent restyles for the activity feed (/api/users/me/feed+ * scope=all), newest first, cursor-paginated. Mirrors forge-store's+ * listRecentCreations: users are left-joined so anonymous restyles still+ * appear (with a null username the client renders without a profile link).+ */+export async function listRecentRestyles({ limit = 24, before } = {}) {+ if (!enabled()) return [];+ const lim = Math.min(60, Math.max(1, Number(limit) || 24));+ try {+ const rows = before+ ? await sql`+ select mr.id, mr.action, mr.label, mr.instruction, mr.preset,+ mr.result_url, mr.created_at,+ u.username, u.display_name, u.avatar_url+ from material_restyles mr+ left join users u on u.id = mr.user_id and u.deleted_at is null and u.username is not null+ where mr.created_at < ${before}+ order by mr.created_at desc limit ${lim}`+ : await sql`+ select mr.id, mr.action, mr.label, mr.instruction, mr.preset,+ mr.result_url, mr.created_at,+ u.username, u.display_name, u.avatar_url+ from material_restyles mr+ left join users u on u.id = mr.user_id and u.deleted_at is null and u.username is not null+ order by mr.created_at desc limit ${lim}`;+ return rows.map((r) => ({+ id: r.id,+ type: 'restyle',+ action: r.action,+ label: r.label,+ glbUrl: r.result_url,+ prompt: r.instruction || r.preset || null,+ category: r.action === 'variants' ? 'colorway variant' : 'AI restyle',+ createdAt: r.created_at,+ username: r.username || null,+ displayName: r.display_name || null,+ avatarUrl: r.avatar_url || null,+ }));+ } catch (err) {+ if (isDbUnavailableError(err)) {+ console.warn('[material-restyle-store] listRecentRestyles skipped (db unavailable):', err?.message);+ } else {+ console.error('[material-restyle-store] listRecentRestyles failed:', err?.message);+ }+ return [];+ }+}+/** Count of a signed-in creator's restyled models — profile stat strip. */export async function countRestylesByUser({ userId } = {}) {if (!enabled() || !userId) return 0;diff --git a/api/_lib/migrations/20260729000000_x402_settle_sig_unique.sql b/api/_lib/migrations/20260729000000_x402_settle_sig_unique.sqlnew file mode 100644index 000000000..65c4f8da2--- /dev/null+++ b/api/_lib/migrations/20260729000000_x402_settle_sig_unique.sql@@ -0,0 +1,40 @@+-- 20260729000000_x402_settle_sig_unique.sql+--+-- One on-chain signature settles AT MOST one payment.+--+-- Measured 2026-07-28: 12,674 of 59,271 ok settle rows (21.4%) shared a tx_sig+-- with another ok row. Sampled transactions on mainnet carry exactly ONE token+-- transfer, yet up to 9 settle rows with 9 distinct idempotency keys were+-- credited against each — deterministic Ed25519 signatures on byte-identical+-- ring payments (same payer/amount/recipient, one shared tick blockhash,+-- colliding fee nonce) let the facilitator's already-processed recovery branch+-- credit later payments off the first one's broadcast.+--+-- This index is the race-proof arbiter behind settle-credit.js: the credit+-- INSERT runs ON CONFLICT DO NOTHING against it, so of any set of concurrent+-- settles sharing a signature exactly one is credited.+--+-- The predicate is time-fenced to the fix's deploy window: history before the+-- cutoff keeps its duplicates (they are real, documented, and analyzed by+-- scripts/x402-milestone-stats.mjs — rewriting them would falsify the audit+-- trail). Any duplicate credited AFTER the cutoff but BEFORE this migration+-- runs is demoted below, keeping the earliest row per signature, so index+-- creation cannot fail regardless of when the migration is applied.++WITH ranked AS (+ SELECT id,+ ROW_NUMBER() OVER (PARTITION BY tx_sig ORDER BY ts ASC, id ASC) AS rn+ FROM x402_self_facilitator_log+ WHERE action = 'settle' AND ok = true AND tx_sig IS NOT NULL+ AND ts >= '2026-07-29 00:00:00+00'+)+UPDATE x402_self_facilitator_log l+SET ok = false,+ reject_reason = 'signature_already_settled:migration_backfill'+FROM ranked r+WHERE l.id = r.id AND r.rn > 1;++CREATE UNIQUE INDEX IF NOT EXISTS x402_self_fac_settle_sig_unique+ ON x402_self_facilitator_log (tx_sig)+ WHERE action = 'settle' AND ok = true AND tx_sig IS NOT NULL+ AND ts >= '2026-07-29 00:00:00+00';diff --git a/api/_lib/sniper-stall.js b/api/_lib/sniper-stall.jsindex cb2a995e2..5a50776b4 100644--- a/api/_lib/sniper-stall.js+++ b/api/_lib/sniper-stall.js@@ -15,6 +15,8 @@* Pure — no DB, no RPC, no clock. The caller supplies the facts.*/+import { MIN_OPERATIONAL_WALLET_SOL } from './agent-trade-guards.js';+// A pump.fun launch is created ON the bonding curve at a fixed starting market// cap — around $2.1k at current SOL prices, and never more than a few thousand// dollars before its first buy. A `new_mint` trigger fires at exactly that@@ -30,10 +32,12 @@ export const LAUNCH_MCAP_USD = 5_000;export const TYPICAL_LAUNCH_MCAP_USD = 2_500;const LAUNCH_TRIGGERS = new Set(['new_mint']);-// Floor a wallet must hold to open anything: the firewall's round-trip probe-// reserve (~0.006 SOL of ATA rent + fees) plus a minimum entry. Under this the-// arm cannot even prove the coin is sellable, so it never broadcasts.-export const MIN_WALLET_SOL = 0.008;+// Floor a wallet must hold to open anything: entry overhead (ATA rent, fee and+// tip headroom) plus the firewall's round-trip probe reserve plus a minimum+// entry. Under this the arm cannot even prove the coin is sellable, so it never+// broadcasts. Imported, not redefined — the reclaim that moves SOL out of these+// wallets reads the same number, and the two disagreeing is what emptied them.+export const MIN_WALLET_SOL = MIN_OPERATIONAL_WALLET_SOL;const num = (v) => (v == null || !Number.isFinite(Number(v)) ? null : Number(v));diff --git a/api/_lib/solana-signers.js b/api/_lib/solana-signers.jsindex 947240205..813ef102c 100644--- a/api/_lib/solana-signers.js+++ b/api/_lib/solana-signers.js@@ -139,6 +139,10 @@ export const SOLANA_SIGNERS = [env: 'A2A_PAYER_SOLANA_SECRET',fallbackEnv: 'A2A_PAYER_SOLANA_PRIVATE_KEY',minSol: 0.02,+ // Settles mandates in USDC, so its USDC float is working capital: without+ // this flag treasury-sweepback's token sweep clawed any refill straight+ // back to the master on the next excess-mode run.+ holdsTokens: true,purpose: 'co-signs SPL TransferChecked for agent-to-agent mandate settlements',network: 'mainnet',},diff --git a/api/_lib/web-search.js b/api/_lib/web-search.jsnew file mode 100644index 000000000..e4449511e--- /dev/null+++ b/api/_lib/web-search.js@@ -0,0 +1,109 @@+// Grounded web search: Vertex Gemini + Google Search grounding.+//+// The platform's first real web-search rung. Every prior "search" surface was+// a workaround: DuckDuckGo instant answers (definitions only), Google Trends+// scraping, ~180 RSS feeds, or the fact-checker's Brave/Tavily/Exa/Serper+// chain whose keys are unset in production. This module gives all of them a+// rung that actually works today, because it rides the same pre-approved GCP+// surface as the chat anchor (see api/_lib/vertex-gemini.js): Gemini on+// Vertex AI with the built-in google_search tool, authenticated with the GCP+// service account (no API key) and billed to platform credits.+//+// Semantics:+// • Availability is gated ONLY by GOOGLE_CLOUD_PROJECT (set on every Cloud+// Run deploy). Callers check webSearchAvailable() and treat false as+// "this rung doesn't exist", exactly like a missing provider key.+// • A token failure or upstream error throws; callers fall through their+// chain like any other provider error. No fabricated results, ever.+// • Results carry the grounding sources Google returned (title + uri). The+// answer text is Gemini's synthesis over those sources — callers that+// only want links use `sources`, callers that want an answer use `answer`.+//+// Env knobs (shared with the chat anchor):+// GOOGLE_CLOUD_PROJECT : GCP project id (required; gates the rung)+// GOOGLE_CLOUD_LOCATION_GEMINI : region or "global" (default: "global")+// VERTEX_GEMINI_MODEL : model id (default: google/gemini-2.5-flash)++import { getGcpAccessToken } from './gcp-auth.js';+import { vertexGeminiAvailable, vertexGeminiModel } from './vertex-gemini.js';++const FETCH_TIMEOUT_MS = 20_000;++export function webSearchAvailable() {+ return vertexGeminiAvailable();+}++// Native generateContent URL (NOT the OpenAI-compat endpoint: grounding tools+// are only accepted on the native API). The catalog id is OpenAI-compat shaped+// ("google/gemini-2.5-flash"); the native path wants the bare model id.+function groundedUrl() {+ const project = process.env.GOOGLE_CLOUD_PROJECT;+ const location = process.env.GOOGLE_CLOUD_LOCATION_GEMINI || 'global';+ const host =+ location === 'global' ? 'aiplatform.googleapis.com' : `${location}-aiplatform.googleapis.com`;+ const model = vertexGeminiModel().replace(/^google\//, '');+ return `https://${host}/v1/projects/${project}/locations/${location}/publishers/google/models/${model}:generateContent`;+}++function dedupeSources(chunks) {+ const seen = new Set();+ const out = [];+ for (const c of chunks) {+ const uri = c?.web?.uri;+ if (!uri || seen.has(uri)) continue;+ seen.add(uri);+ out.push({+ title: c.web.title || c.web.domain || uri,+ url: uri,+ domain: c.web.domain || null,+ });+ }+ return out;+}++/**+ * Run one grounded search. Returns { answer, sources, queries }:+ * answer : Gemini's synthesized answer text (may be '' when the model+ * answered without grounding text, never fabricated here)+ * sources : [{ title, url, domain }] deduped grounding chunks, best-first+ * queries : the search queries Google actually ran (transparency/debug)+ * Throws on unavailability, auth failure, or upstream error — callers treat+ * this like any provider-chain rung failure.+ */+export async function groundedSearch(query, { maxSources = 8, signal } = {}) {+ if (!webSearchAvailable()) throw new Error('web search unavailable: GOOGLE_CLOUD_PROJECT unset');+ const q = String(query || '').trim();+ if (!q) throw new Error('web search: empty query');++ const token = await getGcpAccessToken();+ const res = await fetch(groundedUrl(), {+ method: 'POST',+ headers: { authorization: `Bearer ${token}`, 'content-type': 'application/json' },+ signal: signal ?? AbortSignal.timeout(FETCH_TIMEOUT_MS),+ body: JSON.stringify({+ contents: [{ role: 'user', parts: [{ text: q }] }],+ tools: [{ googleSearch: {} }],+ generationConfig: { temperature: 0.2, maxOutputTokens: 1024 },+ }),+ });+ if (!res.ok) {+ const detail = (await res.text().catch(() => '')).slice(0, 300);+ throw new Error(`web search upstream ${res.status}: ${detail}`);+ }++ const body = await res.json();+ const candidate = body?.candidates?.[0];+ const answer = (candidate?.content?.parts || [])+ .map((p) => p?.text || '')+ .join('')+ .trim();+ const grounding = candidate?.groundingMetadata || {};+ const sources = dedupeSources(grounding.groundingChunks || []).slice(0, maxSources);+ const queries = Array.isArray(grounding.webSearchQueries) ? grounding.webSearchQueries : [];++ // A response with neither text nor sources is an upstream failure in+ // disguise (safety block, empty candidate) — surface it as an error so+ // chains fall through instead of caching an empty "success".+ if (!answer && !sources.length) throw new Error('web search: empty grounded response');+ return { answer, sources, queries };+}diff --git a/api/_lib/x402/settle-credit.js b/api/_lib/x402/settle-credit.jsnew file mode 100644index 000000000..5e4a5916c--- /dev/null+++ b/api/_lib/x402/settle-credit.js@@ -0,0 +1,128 @@+// api/_lib/x402/settle-credit.js+//+// The settle CREDIT gate: one on-chain signature settles AT MOST one payment.+//+// Why this exists (measured on mainnet 2026-07-28): Ed25519 signatures are+// deterministic, so two ring payments with the same payer/amount/recipient,+// built against one shared tick blockhash with a colliding fee nonce, compile+// to byte-identical transactions with the SAME signature. The first broadcast+// lands; every later one hits "already processed" and settleRingPayment's+// replay-recovery branch reports success — it cannot tell a retry of THIS+// payment from a different payment reusing the signature. Result: 12,674 of+// 59,271 logged settles (21.4%) shared a signature with another settle, i.e.+// services were delivered without their own settlement (76 USDC overstated).+//+// The fix is to make crediting explicit and atomic. A successful settle is only+// credited if this module can INSERT the ok=true row for its tx signature:+//+// - No prior credit for the signature → insert wins → payment is credited.+// - Prior credit with the SAME idempotency key → this is a genuine retry of+// the already-credited payment → idempotent success, no second credit.+// - Prior credit with a DIFFERENT (or absent) key → refusal:+// `signature_already_settled`. The service must not be delivered again.+//+// Concurrency: the SELECT pre-check is advisory; the race-proof arbiter is the+// partial unique index on (tx_sig) WHERE action='settle' AND ok (migration+// 20260729000000) plus INSERT … ON CONFLICT DO NOTHING RETURNING id. Whichever+// request's INSERT returns a row owns the credit; the loser re-reads the winner+// and classifies itself as idempotent replay or refusal.+//+// DB unavailability fails CLOSED (`settle_credit_unavailable`). A refused+// settle is retryable: once the DB is back, the retry broadcasts, hits+// already-processed, finds no prior credit row, and claims it — the buyer is+// made whole without ever opening the replay window during an outage.++// Insert the audit row for a NON-credit outcome (refusal / idempotent replay).+// Best-effort like the endpoint's logOp: a trail-write hiccup must not turn an+// already-decided outcome into a 5xx.+function logOutcome(sql, row, reason) {+ return sql`+ INSERT INTO x402_self_facilitator_log+ (action, network, payer, pay_to, mint, amount_atomic, tx_sig,+ fee_lamports, ok, reject_reason, idempotency_key, fee_payer)+ VALUES+ ('settle', ${row.network || null}, ${row.payer || null},+ ${row.payTo || null}, ${row.mint || null}, ${row.amountAtomic ?? null},+ ${row.txSig}, ${row.feeLamports ?? null}, false,+ ${reason}, ${row.idempotencyKey || null}, ${row.feePayer || null})+ `.catch((err) => console.error('[settle-credit] outcome log failed', err?.message || err));+}++async function priorCredit(sql, txSig) {+ const rows = await sql`+ SELECT id, idempotency_key+ FROM x402_self_facilitator_log+ WHERE action = 'settle' AND ok = true AND tx_sig = ${txSig}+ LIMIT 1+ `;+ return rows?.[0] || null;+}++function classify(row, winner) {+ const sameKey =+ row.idempotencyKey != null &&+ winner?.idempotency_key != null &&+ winner.idempotency_key === row.idempotencyKey;+ return sameKey+ ? { granted: false, idempotentReplay: true, reason: 'idempotent_replay' }+ : { granted: false, idempotentReplay: false, reason: 'signature_already_settled' };+}++// Claim the settlement credit for `row.txSig`. Returns:+// { granted: true } — credited; audit row written+// { granted: false, idempotentReplay: true } — same payment retried; respond+// success but do NOT re-deliver+// side effects (fee metering)+// { granted: false, idempotentReplay: false, reason } — different payment reusing the+// signature, or DB down; refuse+export async function claimSettleCredit({ sql, row }) {+ // A success with no signature cannot be gated (nothing to key on) and cannot+ // double-credit either — the broadcast path always yields a signature, so this+ // is a defensive branch, recorded as-is.+ if (!row.txSig) {+ await logOutcome(sql, { ...row, txSig: null }, null);+ return { granted: true };+ }++ try {+ // Advisory pre-check: catches the common replay (seconds apart) with one+ // cheap indexed read, before attempting the claim.+ const prior = await priorCredit(sql, row.txSig);+ if (prior) {+ const verdict = classify(row, prior);+ await logOutcome(sql, row, verdict.reason);+ return verdict;+ }++ // The claim. ON CONFLICT DO NOTHING keys on the partial unique index+ // (tx_sig WHERE action='settle' AND ok) — if another request credited this+ // signature between the pre-check and here, we get zero rows back.+ const ins = await sql`+ INSERT INTO x402_self_facilitator_log+ (action, network, payer, pay_to, mint, amount_atomic, tx_sig,+ fee_lamports, ok, reject_reason, idempotency_key, fee_payer)+ VALUES+ ('settle', ${row.network || null}, ${row.payer || null},+ ${row.payTo || null}, ${row.mint || null}, ${row.amountAtomic ?? null},+ ${row.txSig}, ${row.feeLamports ?? null}, true,+ ${null}, ${row.idempotencyKey || null}, ${row.feePayer || null})+ ON CONFLICT DO NOTHING+ RETURNING id+ `;+ if (ins?.length) return { granted: true };++ // Lost the race — classify against the winner.+ const winner = await priorCredit(sql, row.txSig);+ const verdict = classify(row, winner);+ await logOutcome(sql, row, verdict.reason);+ return verdict;+ } catch (err) {+ // Fail closed: without the DB we cannot prove this signature is unspent.+ console.error('[settle-credit] claim failed', err?.message || err);+ return {+ granted: false,+ idempotentReplay: false,+ reason: 'settle_credit_unavailable',+ };+ }+}diff --git a/api/_okx3d/README.md b/api/_okx3d/README.mdnew file mode 100644index 000000000..365dffe07--- /dev/null+++ b/api/_okx3d/README.md@@ -0,0 +1,82 @@+# `api/_okx3d/` - Agent Identity Studio pipeline and OKX.AI service engines++The engine layer behind the paid `/api/okx/3d/*` services three.ws sells to other agents on the OKX.AI marketplace (agent #2632). The route [`api/okx/3d/[service].js`](../okx/3d/%5Bservice%5D.js) owns transport, x402 payment, and the OKX 402 dialect; this directory owns the actual work. Prices, tool names, and input schemas all come from one catalog, [`../_lib/okx-catalog.js`](../_lib/okx-catalog.js), so the listing, the 402 challenges, and the engines can never disagree.++The flagship service is the **Agent Identity Studio** ($1.50 per identity): a brand brief goes in, a complete 3D identity comes out.++```+brief → identity prompt (Granite director, fail-soft)+ → textured mesh (/api/forge)+ → humanoid auto-rig (/api/forge?action=rig, UniRig)+ → posed studio renders (/api/render/avatar-clip + sharp compositing)+ → PFP crop (1024 + 128 preview) and full-body set, persisted to R2+```++Every GPU and render stage is driven over the deployed three.ws HTTP surfaces (the same pattern the npx MCP server uses in [`../_mcp-studio/forge-client.js`](../_mcp-studio/forge-client.js)), so the module behaves identically inside the production function and in a local run, and holds no provider keys of its own.++## Files++| File | Role |+| --- | --- |+| [`identity.js`](./identity.js) | The pipeline engine: prompt shaping, forge/rig/render orchestration, sharp compositing (PFP head crop, 4:5 full-body frames), and the R2-persisted job state machine. |+| [`tools.js`](./tools.js) | The A2MCP face of the pipeline for `/api/okx/3d/identity-studio`: MCP tool catalog (`create_identity` paid, `identity_status` and `getting_started` free), dispatcher, x402 pricing hook, and the 402 challenge metadata indexers see. |+| [`rest-services.js`](./rest-services.js) | Engine adapters for the decomposed paid REST services (`text-to-3d`, `text-to-3d-pro`, `image-to-3d`, `rig`, `avatar`, `retarget`, `pose-seed`, `fbx-export`). Thin wrappers over engines the platform already runs, no duplicated pipeline logic. |++## Job model++Job state lives as one JSON document in R2 (`okx-identity/jobs/<id>.json`, via [`../_lib/r2.js`](../_lib/r2.js)); renders land under `okx-identity/renders/<id>/`. Job ids travel as signed tokens ([`../_lib/forge-job-token.js`](../_lib/forge-job-token.js)) so a job handle cannot be guessed or forged.++The contract that keeps buyers safe and requests bounded:++- `createIdentityJob` validates the brief and the reference image's reachability (SSRF-guarded via [`../_lib/ssrf-guard.js`](../_lib/ssrf-guard.js)) **before** the transport settles the x402 payment. A thrown error means nothing was charged.+- Each free `identity_status` poll calls `advanceIdentityJob`, which moves the pipeline by exactly **one** bounded step (a single upstream poll, or one render). No request outlives its function budget; polling is what drives the job to completion (typically 3 to 6 minutes).+- Failed generate/rig/render stages retry free up to 3 attempts; a rate-limited upstream is treated as backoff, never as a consumed attempt. The buyer pays once, for deliverables, not for transient upstream weather.+- The render plan (one PFP pose plus three full-body poses from [`../../src/pose-presets.js`](../../src/pose-presets.js)) is seeded deterministically from the job id: reproducible per job, varied across jobs.+- Jobs persist about 30 days.++Prompt direction runs on the in-process LLM chain ([`../_lib/llm.js`](../_lib/llm.js), watsonx Granite leading the shared free-first chain) and is fail-soft: if every provider is down, a deterministic template (`fallbackIdentityPrompt`) produces the generation prompt instead. Nothing is fabricated and nothing blocks.++## Exports++From `identity.js`:++- `createIdentityJob({ base?, agentName, brief, styleHints?, referenceImageUrl? })` → `{ jobId, state }`. Validates, shapes the prompt, submits generation, persists state. `jobId` is the signed token clients poll with.+- `advanceIdentityJob(id, { base? })` → the updated state after one bounded pipeline step, or `null` for an unknown id.+- `describeIdentityJob(state, { base? })` → the public status/result shape: `status`, `stage`, `progress`, and on `done` the `deliverables` (PFP URLs, full-body set, `rigged_glb_url`, `mesh_glb_url`, viewer and pose-studio links).+- `encodeIdentityJobToken(id)` / `decodeIdentityJobToken(token)`, `loadIdentityJob(id)` (raw R2 state read).+- `shapeIdentityPrompt`, `fallbackIdentityPrompt`, `buildRenderPlan`, `validateReferenceImage`, and the constants `MAX_BRIEF_CHARS` (2000), `MAX_GENERATION_PROMPT_CHARS` (300), `IDENTITY_DIRECTOR_INSTRUCTION`.++From `tools.js` (consumed by the route's MCP transport):++- `dispatch` (built on [`../_lib/mcp-dispatch.js`](../_lib/mcp-dispatch.js)) plus `TOOLS`, `TOOL_CATALOG`, `PROTOCOL_VERSION`.+- `isPublicIdentityTool(name)`: true for the free tools servable without OAuth or x402 (`identity_status`, `getting_started`).+- `identityX402Amount(toolName)`: atomic USDC price for one `tools/call`, `null` when free.+- `IDENTITY_CHALLENGE`: the 402 challenge metadata facilitators and indexers see.++From `rest-services.js`:++- `invokeRestService(id, args, { req, payer })`: validates `args` against the catalog schema (Ajv), then dispatches to the engine adapter. Runs after payment verification and before settlement; throws HTTP-shaped errors (`{ status, code, message }`) so the route skips settlement and the buyer keeps their money. Async lanes return `{ status: 'queued', job_id, poll_url }` (polling `GET /api/forge?job=<id>` is free); fast lanes return `{ status: 'done', ... }` inline.+- `isRestPaidService(id)`: whether a catalog id is a paid REST row with a live engine adapter.++Shared director prompts (single-subject mesh spec, avatar humanoid steer, brand-mark lexicon) are imported from [`../_lib/forge-director-prompts.js`](../_lib/forge-director-prompts.js), the same source of truth `/api/forge` and the studio MCP tools use.++## Usage++No install step: this deploys with the rest of `api/` (see [`api/README.md`](../README.md) for routing). Buyers reach it at `https://three.ws/api/okx/3d/identity-studio` (A2MCP) and `https://three.ws/api/okx/3d/<service>` (REST); the free machine-readable index is `https://three.ws/api/okx/3d/catalog`.++To run the real pipeline locally, use the demo driver, which imports `createIdentityJob` / `advanceIdentityJob` / `describeIdentityJob` straight from [`identity.js`](./identity.js) and executes real runs of the production pipeline for the identities in [`../../data/agent-identities.json`](../../data/agent-identities.json):++```sh+node --env-file=.env.local scripts/okx-identity-demo.mjs [slug] [--force]+```++It needs the `S3_*` (R2) vars from `.env.local`; generation, rigging, and rendering all run on the deployed three.ws surfaces. Results (render URLs, GLB URLs, programmatic rig verification) are written back into `data/agent-identities.json`, which powers the [/agent-identities](../../pages/agent-identities.html) showcase page. Rigging is verified for real: the rigged GLB must contain a skin with joints and skinned primitives carrying `JOINTS_0` + `WEIGHTS_0`, or the run is recorded as failed. See [`../../scripts/okx-identity-demo.mjs`](../../scripts/okx-identity-demo.mjs).++Tests: [`tests/api/okx-identity-studio.test.js`](../../tests/api/okx-identity-studio.test.js) and [`tests/api/okx-3d-services.test.js`](../../tests/api/okx-3d-services.test.js).++## Related++- [`docs/okx-marketplace.md`](../../docs/okx-marketplace.md), the buyer-facing docs: endpoints, prices, payment walkthrough.+- [`api/okx/3d/[service].js`](../okx/3d/%5Bservice%5D.js), the route that fronts these engines (transport, x402, OKX 402 dialect, payment replay cache).+- [`../_lib/okx-catalog.js`](../_lib/okx-catalog.js), the single source of truth for services, prices, and schemas.+- [`STRUCTURE.md`](../../STRUCTURE.md), the OKX.AI marketplace row maps this whole surface.diff --git a/api/chat.js b/api/chat.jsindex d802b60d0..490665914 100644--- a/api/chat.js+++ b/api/chat.js@@ -557,12 +557,13 @@ export default wrap(async (req, res) => {}}- const systemPrompt = buildSystemPrompt(+ const sys = buildSystemPrompt(body.context,personaPrompt,recalledMemories,installedSkills,);+ const systemPrompt = sys.text;const history = body.history.map((m) => ({ role: m.role, content: m.content }));history.push({ role: 'user', content: body.message });@@ -621,7 +622,7 @@ export default wrap(async (req, res) => {method: 'POST',headers: reqHeaders,body: JSON.stringify(- route.buildPayload({ systemPrompt, history, maxTokens, includeTools }),+ route.buildPayload({ systemPrompt, systemParts: sys, history, maxTokens, includeTools }),),signal: ctrl.signal,});@@ -1275,11 +1276,20 @@ function makeRoute(name, cfg, apiKey, model) {url: vertexMessagesUrl(model, { stream: true }),style: 'anthropic',resolveHeaders: () => vertexRequestHeaders(),- buildPayload: ({ systemPrompt, history, maxTokens, includeTools = true }) =>+ buildPayload: ({ systemPrompt, systemParts, history, maxTokens, includeTools = true }) =>toVertexBody({model,- max_tokens: maxTokens,- system: systemPrompt,+ // Same thinking-budget floor and cached-stable-prefix split as the+ // first-party anthropic route below; Vertex serves the identical+ // wire format, prompt caching included.+ max_tokens: modelThinksByDefault(model) ? Math.max(maxTokens, HARD_MAX_TOKENS) : maxTokens,+ system:+ systemParts && systemParts.stable.length >= 4096+ ? [+ { type: 'text', text: systemParts.stable, cache_control: { type: 'ephemeral' } },+ ...(systemParts.volatile ? [{ type: 'text', text: systemParts.volatile }] : []),+ ]+ : systemPrompt,messages: history,...(includeTools ? { tools: ACTION_TOOLS } : {}),stream: true,@@ -1318,13 +1328,24 @@ function makeRoute(name, cfg, apiKey, model) {'anthropic-version': '2023-06-01','content-type': 'application/json',},- buildPayload: ({ systemPrompt, history, maxTokens, includeTools = true }) => ({+ buildPayload: ({ systemPrompt, systemParts, history, maxTokens, includeTools = true }) => ({model,- // Claude 5 models think by default and max_tokens caps thinking +- // visible text together — floor the budget so a small chat cap+ // Claude 5 models think by default and max_tokens caps thinking plus+ // visible text together; floor the budget so a small chat cap// can't be consumed entirely by thinking.max_tokens: modelThinksByDefault(model) ? Math.max(maxTokens, HARD_MAX_TOKENS) : maxTokens,- system: systemPrompt,+ // Prompt caching: the stable prefix (persona + skills + platform+ // knowledge) gets a breakpoint; recalled memories and live viewer+ // context ride after it so per-turn changes never invalidate the+ // cache. Below ~4096 chars the marker is silently ignored upstream,+ // so the split is always safe to send.+ system:+ systemParts && systemParts.stable.length >= 4096+ ? [+ { type: 'text', text: systemParts.stable, cache_control: { type: 'ephemeral' } },+ ...(systemParts.volatile ? [{ type: 'text', text: systemParts.volatile }] : []),+ ]+ : systemPrompt,messages: history,...(includeTools ? { tools: ACTION_TOOLS } : {}),stream: true,@@ -1572,6 +1593,11 @@ async function recallForChat(agentId, message, isOwner) {}));}+// Returns { text, stable, volatile }. `stable` is byte-identical across every+// turn of an agent's conversations (persona + skills + platform knowledge), so+// the Anthropic route can put a prompt-cache breakpoint after it; `volatile`+// (recalled memories + live viewer context) changes per message and stays+// after the breakpoint. `text` is the joined form every other provider uses.function buildSystemPrompt(ctx = {}, personaPrompt = null, recalled = [], installedSkills = []) {const loaded = ctx.modelName? `A model named "${ctx.modelName}" is loaded. Stats: ${fmt(ctx.vertices)} vertices, ${fmt(ctx.triangles)} triangles, ${fmt(ctx.materials)} materials, ${ctx.animations ?? 0} animations.`@@ -1584,13 +1610,6 @@ function buildSystemPrompt(ctx = {}, personaPrompt = null, recalled = [], instalconst lines = [];if (personaPrompt) lines.push(personaPrompt, '');- if (Array.isArray(recalled) && recalled.length) {- lines.push(- 'What you remember (recalled for this conversation — speak from it naturally, never read it back verbatim or mention "memory IDs"):',- ...recalled.map((m) => `- (${m.type}) ${m.snippet}`),- '',- );- }const skillsBlock = skillsPromptBlock(installedSkills);if (skillsBlock) lines.push(skillsBlock, '');lines.push(@@ -1611,12 +1630,21 @@ function buildSystemPrompt(ctx = {}, personaPrompt = null, recalled = [], instal'When the user asks to change the viewer ("enable wireframe", "make the background dark blue", "turn on auto rotate", "load this model"), CALL the matching tool — do not just describe what would happen.','When asked about the loaded model, use the context below as ground truth. Do not invent stats.','Keep replies tight: 2–3 sentences. Plain text, no markdown headers, no emoji.',- '',- loaded,- validation,- settings,);- return lines.join('\n');++ const volatileLines = [];+ if (Array.isArray(recalled) && recalled.length) {+ volatileLines.push(+ 'What you remember (recalled for this conversation, speak from it naturally, never read it back verbatim or mention "memory IDs"):',+ ...recalled.map((m) => `- (${m.type}) ${m.snippet}`),+ '',+ );+ }+ volatileLines.push(loaded, validation, settings);++ const stable = lines.join('\n');+ const volatile = volatileLines.join('\n');+ return { stable, volatile, text: `${stable}\n\n${volatile}` };}async function resolveAuth(req) {diff --git a/api/cron/economy-rebalance.js b/api/cron/economy-rebalance.jsindex 9e67c2b82..16ead49fd 100644--- a/api/cron/economy-rebalance.js+++ b/api/cron/economy-rebalance.js@@ -19,26 +19,10 @@ import { constantTimeEquals } from '../_lib/crypto.js';import { solanaConnection } from '../_lib/solana/connection.js';import { SOLANA_SIGNERS, resolveSignerPubkey, loadSignerKeypair } from '../_lib/solana-signers.js';import { solUsdPrice } from '../_lib/avatar-wallet.js';-import { planRebalance, executeSwap, REBALANCE, WSOL_MINT } from '../_lib/economy-rebalance.js';+import { planRebalance, executeSwap, REBALANCE, WSOL_MINT, USDC_WALLETS } from '../_lib/economy-rebalance.js';import { USDC_MINT_BY_NETWORK } from '../_lib/vault-jupiter.js';import { logAudit } from '../_lib/audit.js';-// Which engine wallets spend USDC and therefore want a USDC floor kept topped up-// from their SOL. floorUsd is env-overridable per role.-//-// selfPayFee: this wallet ALSO pays its own SOL network fee on every self-pay-// ring settle, so it has a second, independent need: SOL. Without it the-// planner only ever saw the USDC side, and a payer that drifted under the-// 0.02 SOL settle floor while holding plenty of USDC deadlocked the whole-// ring (July 2026, twice): the facilitator rejected every settle while the-// rebalancer reported "above_floor". The SOL leg only arms when the wallet is-// genuinely below its registry minSol (true starvation, not routine drift),-// and refills toward refillTo so one swap buys days of fee runway.-const USDC_WALLETS = [- { role: 'x402-ring-payer', floorEnv: 'ECONOMY_REBALANCE_RING_USDC_FLOOR', floorDflt: 10, selfPayFee: true },- { role: 'a2a-payer', floorEnv: 'ECONOMY_REBALANCE_A2A_USDC_FLOOR', floorDflt: 5 },-];-function requireCron(req, res) {const secret = process.env.CRON_SECRET || env.CRON_SECRET;if (!secret) {diff --git a/api/cron/free-model-audit.js b/api/cron/free-model-audit.jsnew file mode 100644index 000000000..0447d357b--- /dev/null+++ b/api/cron/free-model-audit.js@@ -0,0 +1,120 @@+// @ts-check+// GET/POST /api/cron/free-model-audit: liveness audit of every hardcoded+// OpenRouter `:free` model id against OpenRouter's live model list.+//+// OpenRouter retires `:free` endpoints with no notice, and a retired id 404s+// its whole LLM chain rung (see the free-tier block in api/_lib/chat-models.js:+// on 2026-07-27 every id that block listed vanished at once). The anonymous+// /chat lane now resolves models from the live list at request time+// (api/_lib/openrouter-free.js), but the catalog, DEFAULT_FREE_MODEL, and+// OPENROUTER_SIBLINGS still carry hardcoded ids that other rungs depend on.+// This cron diffs those ids against the live list every 6 hours and pages the+// ops channel (api/_lib/alerts.js, dashboard-always + Telegram-when-configured)+// as soon as one dies, so a rotting rung is fixed before users hit it.+//+// An EMPTY live list means OpenRouter itself was unreachable, not that the ids+// died: mirror isLiveFreeModel()'s semantics, report status 'unknown', and flag+// nothing dead. Never call a model dead on our own outage.++import { json, error, method, wrapCron } from '../_lib/http.js';+import { env } from '../_lib/env.js';+import { constantTimeEquals } from '../_lib/crypto.js';+import { MODEL_CATALOG, DEFAULT_FREE_MODEL, OPENROUTER_SIBLINGS } from '../_lib/chat-models.js';+import { listFreeModels } from '../_lib/openrouter-free.js';+import { sendOpsAlert } from '../_lib/alerts.js';++function requireCron(req, res) {+ const secret = process.env.CRON_SECRET || env.CRON_SECRET;+ if (!secret) {+ error(res, 503, 'not_configured', 'CRON_SECRET unset');+ return false;+ }+ const auth = req.headers['authorization'] || '';+ const presented = auth.startsWith('Bearer ') ? auth.slice(7) : '';+ if (!constantTimeEquals(presented, secret)) {+ error(res, 401, 'unauthorized', 'invalid cron secret');+ return false;+ }+ return true;+}++/**+ * Every OpenRouter `:free` id hardcoded in the codebase, with the constants+ * (and files) that reference it. Sources: MODEL_CATALOG's openrouter entries,+ * DEFAULT_FREE_MODEL (also the providerChain rung in api/_lib/llm.js via+ * OPENROUTER_FREE_MODEL), and OPENROUTER_SIBLINGS (the per-model failover list+ * consumed by api/chat.js).+ * @returns {{ id: string, refs: string[] }[]}+ */+export function collectHardcodedFreeIds() {+ /** @type {Map<string, string[]>} */+ const refs = new Map();+ const add = (id, ref) => {+ if (typeof id !== 'string' || !id.endsWith(':free')) return;+ const list = refs.get(id) || [];+ if (!list.includes(ref)) list.push(ref);+ refs.set(id, list);+ };++ for (const [id, entry] of Object.entries(MODEL_CATALOG)) {+ if (entry?.provider === 'openrouter') add(id, 'MODEL_CATALOG (api/_lib/chat-models.js)');+ }+ add(DEFAULT_FREE_MODEL, 'DEFAULT_FREE_MODEL (api/_lib/chat-models.js; providerChain rung in api/_lib/llm.js)');+ for (const id of OPENROUTER_SIBLINGS) {+ add(id, 'OPENROUTER_SIBLINGS (api/_lib/chat-models.js; failover list in api/chat.js)');+ }++ return [...refs.entries()].map(([id, r]) => ({ id, refs: r }));+}++/**+ * Pure diff of hardcoded ids against the live free-model id list. An empty+ * live list means OpenRouter was unreachable (listFreeModels' stale window+ * expired too), so the verdict is 'unknown' and nothing is flagged dead.+ * @param {string[]} hardcodedIds+ * @param {string[]} liveIds+ * @returns {{ checked: number, live: number, dead: string[], status: 'ok'|'dead_rungs'|'unknown' }}+ */+export function diffFreeModels(hardcodedIds, liveIds) {+ const checked = hardcodedIds.length;+ if (!liveIds.length) return { checked, live: 0, dead: [], status: 'unknown' };+ const liveSet = new Set(liveIds);+ const dead = hardcodedIds.filter((id) => !liveSet.has(id));+ return { checked, live: checked - dead.length, dead, status: dead.length ? 'dead_rungs' : 'ok' };+}++export default wrapCron(async (req, res) => {+ if (!method(req, res, ['GET', 'POST'])) return;+ if (!requireCron(req, res)) return;++ const hardcoded = collectHardcodedFreeIds();+ const liveModels = await listFreeModels();+ const result = diffFreeModels(+ hardcoded.map((h) => h.id),+ liveModels.map((m) => m.id),+ );+ const dead = result.dead.map((id) => hardcoded.find((h) => h.id === id)).filter(Boolean);++ if (result.status === 'dead_rungs') {+ const lines = dead.map((d) => `${d.id}\n referenced by: ${d.refs.join('; ')}`);+ // Cloud Run log line first: the alert push is best-effort, the log is not.+ console.warn(`[free-model-audit] ${dead.length} retired OpenRouter :free id(s):\n${lines.join('\n')}`);+ // sendOpsAlert always records to the ops dashboard; the Telegram push only+ // fires when TELEGRAM_BOT_TOKEN + TELEGRAM_ALERTS_CHAT_ID are configured,+ // so a missing credential degrades to log + dashboard, never a throw.+ await sendOpsAlert(+ `⚠️ OpenRouter retired ${dead.length} hardcoded :free model id(s)`,+ `${lines.join('\n')}\nUpdate the listed constants: each dead id 404s its LLM chain rung until replaced.`,+ { signature: 'llm:free-model-audit' },+ );+ } else if (result.status === 'unknown') {+ console.warn('[free-model-audit] OpenRouter model list unreachable; skipping liveness verdict this run');+ }++ return json(res, 200, {+ checked: result.checked,+ live: result.live,+ dead,+ status: result.status,+ });+});diff --git a/api/cron/treasury-topup.js b/api/cron/treasury-topup.jsindex cc6e7473f..40a1d7608 100644--- a/api/cron/treasury-topup.js+++ b/api/cron/treasury-topup.js@@ -35,6 +35,7 @@ import { SOLANA_SIGNERS, resolveSignerPubkey } from '../_lib/solana-signers.js';import { sweepTopUps, RESERVE_SOL, RUN_CAP_SOL, PER_TOPUP_MAX_SOL, ECONOMY_MASTER_ADDRESS } from '../_lib/economy-master.js';import { recordSweep } from '../_lib/economy-ledger.js';import { refuelMasterFromUsdc } from '../_lib/economy-fuel.js';+import { topUpUsdcEngines } from '../_lib/economy-usdc-topup.js';import { reclaimIdleSol, reclaimIdleAgentSol } from '../_lib/economy-sweepback.js';const LAMPORTS_PER_SOL = 1_000_000_000;@@ -220,6 +221,30 @@ export default wrapCron(async (req, res) => {);}+ // Self-healing, step 3 (the USDC side): the steps above keep SOL flowing, but+ // the ring/a2a payers SPEND USDC, and their only refill path used to be+ // swapping their own SOL on Jupiter. When a payer holds neither spare SOL nor+ // USDC while the master sits on idle USDC revenue, settles die with SPL+ // insufficient-funds inside arm's reach of the money (2026-07-28: payer at+ // ~5 USDC failing every $10 ring-settle leg, master idle at 48 USDC). Top the+ // engines up directly: no swap, no slippage, allowlist + caps + daily budget+ // inside economy-usdc-topup.js.+ let usdcTopup = { enabled: true, acted: false, reason: 'not_run' };+ try {+ usdcTopup = await topUpUsdcEngines({ connection, network: 'mainnet', dryRun });+ } catch (e) {+ usdcTopup = { enabled: true, acted: false, reason: `error: ${e?.message || 'usdc_topup_failed'}` };+ }+ if (usdcTopup.acted && !dryRun) {+ for (const s of usdcTopup.sent || []) {+ await sendOpsAlert(+ `💵 Economy master topped up ${s.name} with USDC`,+ `+$${s.sendUsd} USDC → ${s.pubkey}\ntx: ${s.signature}`,+ { signature: `economy-usdc-topup:${s.pubkey}:${s.signature}` },+ );+ }+ }+const result = await sweepTopUps({ connection, targets, network: 'mainnet', dryRun });if (dryRun) {return json(res, 200, {@@ -238,6 +263,7 @@ export default wrapCron(async (req, res) => {reclaim,agent_reclaim: agentReclaim,fuel,+ usdc_topup: usdcTopup,master_aliased: masterAliased,read_errors: errors,});@@ -333,6 +359,7 @@ export default wrapCron(async (req, res) => {reclaim,agent_reclaim: agentReclaim,fuel,+ usdc_topup: usdcTopup,master_aliased: masterAliased,read_errors: errors,run_id: runId,diff --git a/api/defi/README.md b/api/defi/README.mdnew file mode 100644index 000000000..0665dc7fa--- /dev/null+++ b/api/defi/README.md@@ -0,0 +1,63 @@+# `api/defi/` - DeFi market data endpoints (DeFiLlama-backed)++Read-only DeFi data endpoints behind the /defi section of the markets hub. Each file is its own HTTP route (`api/defi/protocols.js` serves `GET /api/defi/protocols`, see [`api/README.md`](../README.md) for the routing rules). Every handler proxies DeFiLlama's free, keyless APIs (`api.llama.fi`, `yields.llama.fi`, `stablecoins.llama.fi`), slims the multi-MB upstream payloads down to exactly what the page renders, and caches in-memory plus at the CDN. No API key exists anywhere in this directory: the whole surface runs with zero configuration.++Why this layer exists instead of calling DeFiLlama from the browser:++- **Payload shaping.** The raw upstream feeds are enormous (the yields `/pools` feed alone is a multi-MB dump of ~15k pools; a protocol profile carries 2k+ daily TVL points). Every handler returns only the fields its page renders, downsamples chart series server-side, and coerces non-finite numbers to `null` (never NaN in the UI).+- **Data hygiene.** DeFiLlama mixes centralized-exchange custody rows (category "CEX") into `/protocols`; the TVL leaderboard excludes them so Binance/OKX reserves never dwarf actual protocols. Synthetic per-chain TVL keys (`-borrowed`, `-staking`, `-pool2`, `-vesting`) are stripped from chain breakdowns so nothing double-counts. APY sorting enforces a $10k TVL floor so dust pools advertising five-digit APYs on three digits of liquidity never outrank real venues.+- **Caching and dedup.** In-memory caches (5 to 10 min per feed, bounded maps for per-slug/per-id lookups), in-flight request dedup on the heavy yields fetch, and CDN `s-maxage` with `stale-while-revalidate` keep upstream load at a handful of requests per instance per TTL regardless of traffic.+- **One implementation for free and paid.** The exported builder functions below are reused verbatim by the paid x402 Market Data API ([`api/_lib/market-data/fetch.js`](../_lib/market-data/fetch.js)), so the data agents pay for can never drift from what the site shows.++All endpoints are `GET`, CORS-open, and rate-limited per client IP via [`../_lib/rate-limit.js`](../_lib/rate-limit.js) (the shared `marketDataIp` limiter). Errors follow the platform shape from [`../_lib/http.js`](../_lib/http.js); upstream failures return `502 upstream_error`, never synthetic numbers.++## Endpoints++| Route | Powers | Source |+| --- | --- | --- |+| `GET /api/defi/protocols` | /defi TVL leaderboard (top 100 protocols plus whole-market totals, CEX excluded) | DeFiLlama `/protocols` |+| `GET /api/defi/protocol?slug=<slug>` | /protocol/:slug profile (TVL history, per-chain TVL, fees, revenue, DEX volume, raises, hallmarks, audits) | DeFiLlama `/protocol/{slug}` plus optional `/summary/fees/{slug}` and `/summary/dexs/{slug}` |+| `GET /api/defi/chains` | /chains cross-chain TVL board (top 100 with dominance share) | DeFiLlama `/v2/chains` |+| `GET /api/defi/chain?name=<chain>` | /chain/:name profile (TVL history, top protocols on the chain, stablecoin supply, DEX volume, fees) | DeFiLlama `/v2/chains`, `/v2/historicalChainTvl`, `/protocols`, stablecoin charts, per-chain dexs/fees overviews |+| `GET /api/defi/yields[?chain&project&stablecoin&search&minTvl&sort=tvl\|apy&limit&offset]` | /yields pool explorer (~15k pools, filters, facets, stats) | DeFiLlama `yields.llama.fi/pools` |+| `GET /api/defi/yields?pool=<uuid>` | /yields per-pool APY plus TVL history chart (downsampled to 300 points; unknown pools 404) | DeFiLlama `yields.llama.fi/chart/{pool}` |+| `GET /api/defi/stablecoins` | /stablecoins market-cap board (top 100 with peg health and mechanism) | DeFiLlama `stablecoins.llama.fi/stablecoins` |+| `GET /api/defi/stablecoin?id=<n>` | /stablecoin/:id profile (per-chain circulation, supply history, peg deviation) | DeFiLlama `stablecoins.llama.fi/stablecoin/{id}` |+| `GET /api/defi/dex-volumes` | /dex-volumes rankings (top 100 DEXs by 24h volume, market chart, share of market) | DeFiLlama `/overview/dexs` |+| `GET /api/defi/fees?type=fees\|revenue` | /fees rankings (what users pay vs. what protocols keep, top 100 plus market chart) | DeFiLlama `/overview/fees` |+| `GET /api/defi/hacks[?search&limit&offset]` | /hacks exploit database (searchable incident history plus headline stats) | DeFiLlama `/hacks` |++Frontend consumers live in `src/`: `defi.js`, `protocol-page.js`, `chains.js`, `chain-page.js`, `yields.js`, `stablecoins.js`, `stablecoin-page.js`, `dex-volumes.js`, `fees.js`, `hacks.js`. The public pages (/defi, /chains, /stablecoins, /yields, /fees, /dex-volumes, /hacks) are declared in [`data/pages.json`](../../data/pages.json) and linked from the /markets hub.++## Exports (the paid Market Data API contract)++Beyond their default HTTP handlers, seven modules export their builder functions for the x402 Market Data API ([`api/_lib/market-data/fetch.js`](../_lib/market-data/fetch.js) and [`api/_lib/market-data/datapoints.js`](../_lib/market-data/datapoints.js), documented in [`docs/market-data-api.md`](../../docs/market-data-api.md)):++- [`protocols.js`](./protocols.js) exports `buildProtocols()`, the TVL leaderboard behind the paid market-defi endpoint.+- [`chains.js`](./chains.js) exports `buildChains()`, the cross-chain TVL board behind market-chains.+- [`yields.js`](./yields.js) exports `queryYieldPools({ chain, project, stablecoin, search, minTvl, sort, limit, offset })` (filtered pool explorer), `queryYieldChart(pool)` (single-pool history; throws `{ status, code }` on bad or unknown uuids), and `loadYieldPools()` (the cached full pool set, used by the per-pool datapoint fabric).+- [`stablecoins.js`](./stablecoins.js) exports `buildStablecoins()`, the peg board behind market-stablecoins.+- [`dex-volumes.js`](./dex-volumes.js) exports `buildDexVolumes()`, the DEX rankings behind market-dex-volumes.+- [`fees.js`](./fees.js) exports `buildFees(type)` with `type` either `'fees'` or `'revenue'`.+- [`hacks.js`](./hacks.js) exports `queryHacks({ search, limit, offset })`, the exploit database behind market-hacks.++The three detail handlers (`protocol.js`, `chain.js`, `stablecoin.js`) export only their default HTTP handler.++## Usage++No install step: these deploy with the rest of `api/` and run locally under the dev server (`npm run dev`, port 3000, Vite proxies `/api`). No env vars, required or optional; the DeFiLlama upstreams are keyless.++Example, straight from the route contract at the top of [`yields.js`](./yields.js) (list mode with filters, APY sort, and the $10k TVL dust-pool floor):++```sh+curl -s 'https://three.ws/api/defi/yields?chain=solana&sort=apy&limit=5'+```++Returns `{ "pools": [ 5 Solana pools ordered by APY, each with tvl_usd, apy, apy_base, apy_reward, il_risk, outlook ], "total": <matching pool count>, "facets": { top chains and projects for the dropdowns }, "stats": { pool_count, total_tvl, median_apy }, "updated_at": <ms> }`. Add `?pool=<uuid>` instead for that pool's downsampled APY plus TVL history, or swap the path for any endpoint in the table above.++## Related++- [`api/README.md`](../README.md), how routing, `_lib/`, and crons work across the whole API surface.+- [`api/coin/README.md`](../coin/README.md), the sibling CoinGecko-backed layer serving /coins and the broader markets pages.+- [`docs/market-data-api.md`](../../docs/market-data-api.md), the paid x402 endpoints these builders also power.+- [`STRUCTURE.md`](../../STRUCTURE.md), the map of every product surface.diff --git a/api/irl/README.md b/api/irl/README.mdnew file mode 100644index 000000000..df7ff17e0--- /dev/null+++ b/api/irl/README.md@@ -0,0 +1,66 @@+# `api/irl/` - agents in the real world (AR surface backend)++The backend for [/irl](../../pages/irl.html): place a 3D agent at a real GPS coordinate, let passers-by discover it in AR, and route everything that happens around it (taps, messages, payments, money drops, proof-of-presence quests) back to the owner. Each file is its own HTTP route per the repo routing rules in [`api/README.md`](../README.md); the subpath routes (`/api/irl/drops/:id/claim`, `/api/irl/world-lines/nearby`, `/irl/s/:token`, ...) are mapped in `vercel.json`.++Why this layer is shaped the way it is:++- **Location privacy is the product constraint.** A pin database is a map of where people stand. The only surface that ever reveals a precise coordinate is the fix-gated nearby read: callers must first mint a short-lived, HMAC-signed proof that they physically have a GPS fix in a coarse (~150 m) cell ([`../_lib/irl-presence.js`](../_lib/irl-presence.js)), and every other projection (share pages, drop reads for non-owners, World Line browse, notifications, logs) is coordinate-free or coarsened. The full analysis lives in [`docs/irl/THREAT-MODEL.md`](../../docs/irl/THREAT-MODEL.md).+- **Anonymous-friendly identity.** Every endpoint accepts a session user OR an anonymous device token ([`../_lib/irl-auth.js`](../_lib/irl-auth.js), sent in the `x-irl-device` header, body for mutations, never a query string), so placing and discovering agents needs no account while ownership stays enforceable.+- **Real money, real custody.** Drops escrow real SOL/USDC in a fresh per-drop wallet, funded by the creator's own signed transfer and released on a presence-proven claim ([`../_lib/irl-drops.js`](../_lib/irl-drops.js)). Nothing is simulated.+- **Bounded data retention.** Interaction rows snapshot a location trail, so the hourly reaper ([`../cron/irl-reap.js`](../cron/irl-reap.js)) cascade-deletes them with their pin and ages everything out at 180 days, and the privacy center makes deletion self-serve.++## Endpoints++| Route | What it does |+| --- | --- |+| `POST /api/irl/fix-token` `{ lat, lng, accuracy? }` | Mints the proof-of-presence token (`{ token, expires_in, cell }`) that gates every nearby read. Stateless, coordinate never logged, response no-store. [`fix-token.js`](./fix-token.js) |+| `GET /api/irl/pins?lat=&lng=&radius=40` | Nearby pins for the caller's proven cell (`x-irl-fix` header when enforcement is on). [`pins.js`](./pins.js) |+| `GET /api/irl/pins/mine?deviceToken=` / `?mine=1` | The caller's own pins (device token or auth). |+| `POST /api/irl/pins` `{ lat, lng, heading, avatarUrl, avatarName, caption, agentId }` | Place an agent. Moderation-gated (profanity floor + Granite Guardian tier, $THREE-only coin guard), density-capped per geocell and per owner. |+| `PATCH /api/irl/pins` | Owner edits: caption/avatar/location, AR pose calibration (`calibrate`), whole-room alignment (`calibrateRoom`), pinch scale. |+| `DELETE /api/irl/pins?id=` / `?all=1&deviceToken=` | Remove one pin, or purge every pin from a device. |+| `POST /api/irl/pins/interact` `{ pinId, event, deviceToken }` | Log a lightweight tap/view against a pin. |+| `POST /api/irl/interactions` | The full encounter record: `view` / `tap` / `message` / `pay` (settlement-signature-verified, $THREE/USDC only), owner replies via `replyTo`. Fans out owner/visitor notifications. [`interactions.js`](./interactions.js) |+| `GET /api/irl/interactions?mine=1[&unread=1]` / `?pinId=` | Owner inbox (newest first, joined with pin identity), or a public per-pin count. |+| `GET /api/irl/interactions-stream` | SSE tail of the owner's inbox: one shared adaptive poll loop per warm instance fans new rows to every connected owner within ~1 s. Consumed by [`src/dashboard-next/pages/irl-placements.js`](../../src/dashboard-next/pages/irl-placements.js). [`interactions-stream.js`](./interactions-stream.js) |+| `GET/POST /api/irl/drops...` | Money Drops and bounties: create (`POST /api/irl/drops` returns `{ drop, escrow_address }`), fund (`POST /api/irl/drops/:id/fund { signature }`), presence-gated claim (`POST /api/irl/drops/:id/claim`), owner cancel with real refund, nearby/mine/single reads. [`drops.js`](./drops.js) |+| `GET/POST /api/irl/world-lines...` | Agent-placed proof-of-presence AR quests: create, fix-gated `nearby`, coordinate-free `browse`, creator `mine`, earned `collectibles`, `challenge` nonce, `complete` ceremony (the agent's own wallet signs the proof), public `verify/:proofId`. [`world-lines.js`](./world-lines.js) |+| `GET /api/irl/agent-card?agent_id=` (or `?pin=`) | The rich tap-popup card in one round-trip: agent record + Solana attestation reputation (derived tier and 0-100 score) + the agent's paid x402 services. Public, cached. [`agent-card.js`](./agent-card.js) |+| `GET /api/irl/agent-summary?mine=1` | One row per owned pin (identity + derived activity + `status`) so the owner dashboard paints without N calls. Auth required. [`agent-summary.js`](./agent-summary.js) |+| `GET /api/irl/analytics` | Site-wide usage rollup (pins placed, nearby reads, shares, drop claims) for [/admin/irl-analytics](../../pages/admin/irl-analytics.html). Ops-gated (admin session or `OPS_SECRET`). [`analytics.js`](./analytics.js) |+| `GET/PATCH/DELETE /api/irl/privacy` | The privacy center: plain-language data summary, `?export=1` full JSON export, unpublish/republish a pin, delete one pin / everything / forget-this-device (purges interactions the device authored elsewhere too). [`privacy.js`](./privacy.js) |+| `POST /api/irl/report` `{ pinId, reason, deviceToken? }` | Community moderation: distinct-reporter dedup, per-pin 24 h ceiling, threshold hide (never delete, owner can appeal). [`report.js`](./report.js) |+| `POST /api/irl/share?pinId=&deviceToken=` | Owner uploads their composite AR photo (raw PNG body) and mints a permanent share token: `{ token, url, imageUrl }`. [`share.js`](./share.js) |+| `GET /irl/s/:token` | The unfurlable share page (real `og:image` of the capture, caption and agent name only, never coordinates). [`share/[token].js`](./share/%5Btoken%5D.js) |++## Usage++No install step: these deploy with the rest of `api/` and run locally under the dev server (`npm run dev`, port 3000, Vite proxies `/api`). Presence enforcement follows `fixEnforced()` in [`../_lib/irl-presence.js`](../_lib/irl-presence.js): with the signing secret unset (local dev) the nearby reads answer without a token; in production the `x-irl-fix` header is required.++Example, straight from the route contracts at the top of [`fix-token.js`](./fix-token.js) and [`pins.js`](./pins.js): mint a presence proof for where you are standing, then read the pins around you.++```sh+TOKEN=$(curl -s -X POST https://three.ws/api/irl/fix-token \+ -H 'content-type: application/json' \+ -d '{"lat":40.7580,"lng":-73.9855,"accuracy":12}' | jq -r .token)++curl -s 'https://three.ws/api/irl/pins?lat=40.7580&lng=-73.9855&radius=40' \+ -H "x-irl-fix: $TOKEN"+```++The first call returns `{ token, expires_in, cell }`; the second returns the public pin projection (avatar URL, caption, heading, anchor scale) for agents placed within 40 m of the proven cell. A token minted for a different cell gets an empty answer, which is the whole point.++## Shared internals++- [`../_lib/irl-presence.js`](../_lib/irl-presence.js): `mintFixToken`, `verifyFixToken`, `fixEnforced` (the HMAC presence proof).+- [`../_lib/irl-auth.js`](../_lib/irl-auth.js): `readDeviceToken` (anonymous ownership, null-guarded so an empty token can never match another owner's rows).+- [`../_lib/irl-drops.js`](../_lib/irl-drops.js): drop escrow lifecycle (`createDrop`, `confirmFunding`, `reserveClaim`, `releaseFromEscrow`, refund sweep).+- [`../_lib/irl-analytics.js`](../_lib/irl-analytics.js): `logIrlEvent` and `getIrlAnalyticsSummary` over `irl_events`.+- [`../_lib/geohash.js`](../_lib/geohash.js): the geocell encoding behind density caps and coarse cells (shared with [`packages/irl/`](../../packages/irl)).++## Related++- Product doc (Money Drops, World Lines, the full user flow): [`docs/irl.md`](../../docs/irl.md)+- Privacy threat model: [`docs/irl/THREAT-MODEL.md`](../../docs/irl/THREAT-MODEL.md)+- Frontend: [`src/irl.js`](../../src/irl.js) behind [`pages/irl.html`](../../pages/irl.html) (`/irl`)+- SDK for third-party geofenced presence: [`packages/irl/`](../../packages/irl)diff --git a/api/llm/anthropic.js b/api/llm/anthropic.jsindex cf2e225aa..1c8482ace 100644--- a/api/llm/anthropic.js+++ b/api/llm/anthropic.js@@ -128,6 +128,13 @@ export function sanitizeAnthropicBody(body, modelId) {if (modelThinksByDefault(modelId) && (out.max_tokens ?? 0) < 4096) {out.max_tokens = 4096;}+ // Embed system prompts are stable per agent and resent every turn; a cache+ // breakpoint on a large one bills repeat turns at ~0.1x input price. Below+ // each model's cacheable minimum the marker is silently ignored, so this is+ // always safe to send. Callers already sending block arrays are left alone.+ if (typeof out.system === 'string' && out.system.length >= 4096) {+ out.system = [{ type: 'text', text: out.system, cache_control: { type: 'ephemeral' } }];+ }const t = out.thinking;if (t && typeof t === 'object') {if (ALWAYS_THINKING_MODELS.has(modelId)) {diff --git a/api/news/README.md b/api/news/README.mdnew file mode 100644index 000000000..366e54cb2--- /dev/null+++ b/api/news/README.md@@ -0,0 +1,70 @@+# `api/news/` - native crypto news aggregation endpoints++The crypto-news backend behind /markets/news, /markets/digest, /markets/archive, and the story permalinks. Each file is its own HTTP route (`api/news/feed.js` serves `GET /api/news/feed`, see [`api/README.md`](../README.md) for the routing rules). Aggregation is first-party: every article comes from the source registry in [`../_lib/news-sources.js`](../_lib/news-sources.js), 191 live publisher feeds across 27 categories (33 international feeds in 17 languages), each one fetched and parsed before it was listed. There is no third-party news API anywhere in the path.++Why this layer exists instead of buying a news API:++- **Ownership of the pipeline.** The registry was ported from the cryptocurrency.cv aggregator (same team) and revalidated feed by feed. Fetching, parsing, ticker detection, sentiment, curation, and clustering all run in [`../_lib/news.js`](../_lib/news.js) and this directory, so the feed cannot be rate-limited, repriced, or discontinued by a vendor.+- **The agents read from it.** Every fully extracted story lands in the durable knowledge corpus ([`../_lib/news-knowledge-store.js`](../_lib/news-knowledge-store.js)), the grounding surface the platform's 3D agents use to answer market questions with sourced, recent context instead of a hallucination.+- **Rights are enforced in one place.** [`../_lib/news-rights.js`](../_lib/news-rights.js) is the single boundary: the reader serves a bounded lead excerpt plus our own analysis and links out to the publisher; withdrawn stories answer 410 Gone everywhere (feed, knowledge, permalinks, sitemap).+- **Editorial curation without losing coverage.** [`../_lib/news-curation.js`](../_lib/news-curation.js) is a display filter, not an ingestion filter: broad outlets (CNBC, world desks, regulators) stay in the pipeline for the archive and the agents, but only their crypto-relevant articles reach a human feed.++All endpoints are `GET`, CORS-open, and rate-limited per client IP via [`../_lib/rate-limit.js`](../_lib/rate-limit.js). Errors follow the platform shape from [`../_lib/http.js`](../_lib/http.js).++## Endpoints++| Route | Powers | What it does |+| --- | --- | --- |+| `GET /api/news/feed?category&source&lang&q&featured=1&limit&offset&meta=1` | /markets/news, the /markets hub strip | Live aggregated headlines across the registry. `lang` defaults to `en` (international feeds are opt-in), `featured=1` narrows to the majors, `meta=1` returns the source/category/language lists, `raw=1` bypasses curation for parity checks. Per-source results cached 5 min in [`../_lib/news.js`](../_lib/news.js), CDN 120s. |+| `GET /api/news/digest?hours=24&limit=8` | /markets/digest, the /markets/news digest rail | The window's coverage clustered into narratives, each with a title, plain-language summary, stance, tickers, and every citing article. LLM clustering via the platform chain ([`../_lib/llm.js`](../_lib/llm.js)) when configured, agglomerative ticker+token overlap clustering otherwise; `engine` in the response says which ran. Nothing is fabricated: a narrative with no real cited articles cannot exist. |+| `GET /api/news/article?url=<link>` | /markets/news/article reader | Full extraction ladder ([`../_lib/article-extract.js`](../_lib/article-extract.js)) plus analysis: bounded lead excerpt, summary, key points, entities, sentiment, tickers with live prices ([`../_lib/news-coins.js`](../_lib/news-coins.js)), related coverage. Records every analyzed story to the knowledge corpus. Works keyless with extractive analysis, labelled via `analysis_provider`. |+| `GET /api/news/archive?q&ticker&source&category&sentiment&lang&start_date&end_date&limit&offset` | /markets/archive | Historical corpus: 662,047 enriched articles from September 2017 onward on the platform's own GCS bucket, extended hourly by [`api/cron/news-archive-append.js`](../cron/news-archive-append.js). `?stats=true`, `?months=true`, and `?trending=true` are always free; searches carry a free per-IP daily quota, then an x402 challenge ($0.001 USDC, env `X402_PRICE_NEWS_ARCHIVE`). |+| `GET /api/news/knowledge?id\|ticker\|q&full=1` | Agent grounding, /markets/news story context | Read side of the knowledge corpus: one full record by 16-hex id, recent stories mentioning a ticker, free-text search, or latest records plus corpus stats. Same rights boundary as the reader on the way out. |+| `GET /api/news/rss?category&limit` | RSS readers, downstream aggregators | RSS 2.0 mirror of the curated feed, linked as `rel="alternate"` from /markets/news. The source count in the channel description is derived from the registry, never hardcoded. |+| `GET /api/news/image?url=<link>` | /markets/news card images | Preview-image resolver for the ~20% of feeds that ship text-only RSS. Only resolves links the aggregator actually served (not an open resolver), extracts og:image with an SSRF-hardened fetcher, and 302s to the same-origin `/api/img` proxy. Both hits and misses are cached. |+| `GET /markets/news/<YYYY-MM>/<id16>[-slug]` | Story permalinks, crawlers, link previews | Server-rendered by `story-page.js` (routed in `vercel.json`): real title/canonical/OpenGraph tags, NewsArticle JSON-LD, and a crawler-visible body in the same shell the client reader hydrates. The query-param reader stays noindex; this page is the indexable one. |++Frontend consumers live in `src/`: [`markets-news.js`](../../src/markets-news.js), [`news-digest.js`](../../src/news-digest.js), [`news-article.js`](../../src/news-article.js), [`news-archive.js`](../../src/news-archive.js), with shared link helpers in [`src/shared/news-links.js`](../../src/shared/news-links.js). The public pages are declared in [`data/pages.json`](../../data/pages.json) (/markets/news, /markets/news/article).++## The source registry++[`../_lib/news-sources.js`](../_lib/news-sources.js) is the single source of truth for what gets aggregated. Its exports:++- `NEWS_SOURCES` - the registry object, keyed by `source_key` (keys match the cryptocurrency.cv archive so historical and live records line up). Each entry: `name`, `url`, `category`, optional `kind` (`'json'` for adapter-shaped sources), `tier` + `credibility` (drives refresh priority and the quality floor), `language` + `region` (international feeds).+- `NEWS_CATEGORIES` - the 27 canonical categories (`general`, `bitcoin`, `defi`, `security`, `etf`, ...).+- `NEWS_LANGUAGES` - the 17 tagged languages; English feeds carry no `language` field.+- `sourcesForCategory(category)` / `sourcesForLanguage(lang)` - key filters (`'all'` returns everything; `'en'` means the untagged English feeds).+- `sourcePriority(key)` - refresh ordering for the aggregator's bounded worker pool (lower refreshes first, so a deadline-truncated cold start still returns the highest-credibility outlets).+- `isFeaturedSource(key)` - the Featured bar gate: tier1/tier2 upstream or credibility at or above 0.85.++The registry changes as feeds live and die. Re-validate it with [`scripts/news-sources-probe.mjs`](../../scripts/news-sources-probe.mjs), which fetches every listed feed and exits non-zero when one has died. Derive counts from the registry at runtime (as `rss.js` does); never hardcode them.++## Shared internals++- [`../_lib/news.js`](../_lib/news.js) - the aggregation engine. `getNews({ category, source, lang, q, limit, offset, featured, curated })` fans out across the registry with per-source 5-minute caching; also exports `parseFeed`, `findArticle`, `searchNews`, `articleId`, `extractTickers`, `lexiconSentiment`, `extractOgImage`, and the text utilities the endpoints share.+- [`../_lib/news-rights.js`](../_lib/news-rights.js) - `suppression`, `isSuppressed`, `excerptParagraphs`, `excerptText`: takedown enforcement and the standing excerpt bound.+- [`../_lib/news-knowledge-store.js`](../_lib/news-knowledge-store.js) - `recordExtraction`, `getExtraction`, `queryKnowledge`, `knowledgeStats` over the durable `news_knowledge` table.+- [`../_lib/news-archive-store.js`](../_lib/news-archive-store.js) - `getStats`, `getMonths`, `loadMonth`: month-file access to the GCS archive (`articles/YYYY-MM.jsonl`, `meta/stats.json`, indexes), shared with the story pages and the news sitemap.+- [`../_lib/news-story.js`](../_lib/news-story.js) - `resolveStory`, `validStoryKey`: resolves a `<month>/<id16>` permalink against the live feed and the archive.++## Usage++No install step: these deploy with the rest of `api/` and run locally under the dev server (`npm run dev`, port 3000, Vite proxies `/api`). The feed, digest heuristic engine, image resolver, RSS, and knowledge endpoints work with zero configuration. Optional env:++- LLM provider keys (see [`../_lib/llm.js`](../_lib/llm.js)) upgrade the digest to semantic clustering and the reader to generated summaries; without them both fall back to real heuristic/extractive analysis, never fabrication.+- `NEWS_MIN_CREDIBILITY` tunes the curation quality floor at runtime.+- `X402_PRICE_NEWS_ARCHIVE` overrides the archive's per-search price.++Example, straight from the route contract at the top of [`feed.js`](./feed.js) (`GET /api/news/feed` with a category filter):++```sh+curl -s 'https://three.ws/api/news/feed?category=defi&limit=5' | head -c 600+```++Returns `{ "articles": [ { id, title, link, source, pub_date, tickers, sentiment, image, ... } ], "total": ..., "limit": 5, "offset": 0, "lang": "en", "sources_ok": ..., "sources_total": ..., "fetched_at": "..." }`. Add `&meta=1` for the full source/category/language lists, `&featured=1` for the majors only, or `&lang=ja` for one of the 17 international languages.++## Related++- [`api/README.md`](../README.md), how routing, `_lib/`, and crons work across the whole API surface.+- [`api/coin/README.md`](../coin/README.md), the market-data endpoints the reader's live coin prices come from.+- [`STRUCTURE.md`](../../STRUCTURE.md), the map of every product surface.diff --git a/api/notifications/README.md b/api/notifications/README.mdnew file mode 100644index 000000000..7cf8562b1--- /dev/null+++ b/api/notifications/README.md@@ -0,0 +1,55 @@+# `api/notifications/` - the in-app notification inbox++Authenticated endpoints behind the notification bell: list the caller's recent notifications, mark one or all as read, dismiss (delete) one, record delivery-funnel events, and read or edit the category-by-channel preference matrix. Each file is its own HTTP route (`api/notifications/read-all.js` serves `POST /api/notifications/read-all`, see [`api/README.md`](../README.md) for the routing rules). Mapped in [`STRUCTURE.md`](../../STRUCTURE.md) under "Notification bell & preferences".++Why this layer exists: notifications are written once into the `user_notifications` table by [`../_lib/feed.js`](../_lib/feed.js) (`publishUserEvent()`) from every producing feature (remixes, DMs, coin graduations, follows, sales, purchases, IRL, market alerts, account events), and fan out to the extra channels through [`../_lib/notify.js`](../_lib/notify.js). These endpoints are the read/manage side of that pipeline: one inbox contract that the bell dropdown, the full `/notifications` page, the dashboard settings panel, and the [`packages/notifications-mcp`](../../packages/notifications-mcp/README.md) MCP server all share.++Every route requires authentication and answers `401 { "error": "unauthorized" }` without it. Reads and writes accept a session cookie or a bearer credential (API key / OAuth) via `getRequestUser()`; state-changing routes also require CSRF for cookie sessions ([`../_lib/csrf.js`](../_lib/csrf.js)), which self-exempts bearer callers. All rows are account-scoped: every query filters on the caller's `user_id`, so one user can never read, mark, or delete another's notifications. Rate limits are per user via [`../_lib/rate-limit.js`](../_lib/rate-limit.js); errors follow the platform shape from [`../_lib/http.js`](../_lib/http.js).++## Endpoints++| Route | Does | Notes |+| --- | --- | --- |+| `GET /api/notifications?limit&type&before` | List recent notifications, newest first | `limit` 1..50 (default 20); `type` filters one notification type (e.g. `?type=pump_alert`, validated against `^[a-z0-9_]{1,40}$`); `before` is a `created_at` cursor for "load more" on [`pages/notifications.html`](../../pages/notifications.html). Returns `{ notifications, unread_count, has_more }` |+| `POST /api/notifications/:id/read` | Mark a single notification as read | Idempotent (`read_at = coalesce(read_at, now())`); returns `{ id, read_at }`, 404 if the row is not the caller's. Handler: [`[id]/read.js`](./%5Bid%5D/read.js) |+| `DELETE /api/notifications/:id` | Permanently remove one notification | The bell's dismiss action and the MCP `delete_notification` tool; returns `{ ok, id, deleted }`. Handler: [`[id]/index.js`](./%5Bid%5D/index.js) |+| `POST /api/notifications/read-all` | Mark every unread notification as read | Returns `{ marked_read: <count> }` |+| `POST /api/notifications/track` | Record a re-engagement funnel event | Body `{ notification_id?, channel: 'push'\|'in_app', event: 'opened'\|'returned' }`. Closes the sent-to-opened-to-returned loop: the service worker ([`public/push-sw.js`](../../public/push-sw.js)) fires `opened` on push click, the app fires `returned` when it boots from `?source=push`. Session-auth only, CSRF-exempt idempotent beacon (deduped by a partial unique index); `sent` rows are written server-side by [`../_lib/notify.js`](../_lib/notify.js) |+| `GET /api/notifications/preferences` | Read the full resolved preference matrix | Returns `{ categories, channels, prefs, push: { subscribed_devices } }`, everything the settings UI renders from |+| `PUT /api/notifications/preferences` | Save preference overrides | Body `{ categories: { <cat>: { <channel>: bool } }, telegram_chat_id? }`; sanitised sparse overlay, unknown keys dropped, returns the re-resolved matrix |++## The preference matrix++Defaults and resolution live in [`../_lib/notify-prefs.js`](../_lib/notify-prefs.js), the shared module both `preferences.js` and the delivery pipeline import:++- `CATEGORIES`: the seven user-facing groups every notification type maps into: `sales`, `purchases`, `social`, `irl`, `alerts`, `creations`, `account` (each with a label and description for the UI). `categoryForType()` maps any notification `type` to its category; unmapped types fall back to `account` so a new type is never silently undeliverable.+- `CHANNELS`: `in_app` (the bell inbox, on by default for every category), `push` (Web Push, on by default but only reaches users who subscribed a device), `email` (defaults on only for money and security categories), `telegram` (opt-in, needs a linked chat id).+- `resolvePrefs(userId)` overlays the user's stored sparse prefs (table `notification_preferences`) onto the defaults, so a user who has never saved gets a sensible matrix and new categories appear automatically. `channelEnabled(prefs, type, channel)` is the single delivery gate the send path consults.++## Consumers++- Bell dropdown client: [`src/notifications.js`](../../src/notifications.js) (poll, unread badge, per-item read/dismiss, `track` beacon).+- Full notification center: [`pages/notifications.html`](../../pages/notifications.html), served at `/notifications` (route table in [`vercel.json`](../../vercel.json)), uses the `before` cursor for paging.+- Preference editor: [`src/dashboard-next/pages/settings.js`](../../src/dashboard-next/pages/settings.js) at `/dashboard/settings`.+- Push plumbing: [`src/push-notifications.js`](../../src/push-notifications.js) and [`public/push-sw.js`](../../public/push-sw.js) report funnel events into `track`.+- Machine clients: [`packages/notifications-mcp`](../../packages/notifications-mcp/README.md) exposes the same endpoints as MCP tools over bearer auth.++## Usage++No install step: these deploy with the rest of `api/` and run locally under the dev server (`npm run dev`, port 3000, Vite proxies `/api`). No extra env vars; the endpoints use the platform database (`DATABASE_URL`) and session/auth stack already configured for `api/`.++Example, straight from the route contract at the top of [`index.js`](./index.js) (`GET /api/notifications` lists recent notifications for the authenticated user):++```sh+curl -s 'https://three.ws/api/notifications?limit=5' \+ -H 'Cookie: session=<your session cookie>'+```++Returns `{ "notifications": [ { "id", "type", "payload", "read_at", "created_at" } ], "unread_count": <int>, "has_more": <bool> }`. Add `&type=pump_alert` to scope to one notification type, or pass the last row's `created_at` as `&before=` to page further back. Unauthenticated calls answer `401 { "error": "unauthorized", "message": "sign in required" }`.++## Related++- [`api/README.md`](../README.md), how routing, `_lib/`, and auth work across the whole API surface.+- [`docs/social-layer.md`](../../docs/social-layer.md), the product-level doc for the social features that feed this inbox.+- [`packages/notifications-mcp/README.md`](../../packages/notifications-mcp/README.md), the MCP server built on these endpoints.+- [`STRUCTURE.md`](../../STRUCTURE.md), the map of every product surface.diff --git a/api/users/me/feed.js b/api/users/me/feed.jsindex f4bb6903c..a4c782579 100644--- a/api/users/me/feed.js+++ b/api/users/me/feed.js@@ -1,7 +1,8 @@// GET /api/users/me/feed — the platform activity feed: reverse-chronological// creation events (avatars, agents, coin launches, forged 3D models, saved-// worlds) plus follow activity, merged from the same public records every-// profile page already exposes (no separate event log to keep in sync).+// worlds, Material Studio restyles) plus follow activity, merged from the+// same public records every profile page already exposes (no separate event+// log to keep in sync).//// ?scope=following (default) — only accounts the signed-in viewer follows.// Requires a session; anonymous callers get 401@@ -26,6 +27,7 @@ import { limits, clientIp } from '../../_lib/rate-limit.js';import { publicUrl, thumbnailUrl } from '../../_lib/r2.js';import { listRecentCreations } from '../../_lib/forge-store.js';import { listDioramas } from '../../_lib/diorama-store.js';+import { listRecentRestyles } from '../../_lib/material-restyle-store.js';const SITE = 'https://three.ws';@@ -68,7 +70,7 @@ export default wrap(async (req, res) => {return json(res, 200, { items: [], following_count: 0, scope, next: null });}- const [avatarRows, agentRows, coinRows, modelRows, worldRows, followRows] = await Promise.all([+ const [avatarRows, agentRows, coinRows, modelRows, worldRows, restyleRaw, followRows] = await Promise.all([sql`select a.id, a.name, a.thumbnail_key, a.created_at,u.username, u.display_name, u.avatar_url@@ -129,6 +131,20 @@ export default wrap(async (req, res) => {order by d.created_at desclimit ${perKind}`,+ // Fail-soft: the material_restyles migration may not have landed on+ // every deployment yet — a missing table must never 500 the feed.+ sql`+ select mr.id, mr.action, mr.label, mr.instruction, mr.preset,+ mr.result_url, mr.created_at,+ u.username, u.display_name, u.avatar_url+ from material_restyles mr+ join user_follows f on f.following_id = mr.user_id and f.follower_id = ${viewer.id}+ join users u on u.id = mr.user_id and u.deleted_at is null and u.username is not null+ where mr.user_id is not null+ ${before ? sql`and mr.created_at < ${before}` : sql``}+ order by mr.created_at desc+ limit ${perKind}+ `.catch(() => []),sql`select f.created_at,uf.username as follower_username, uf.display_name as follower_display, uf.avatar_url as follower_avatar,@@ -144,7 +160,25 @@ export default wrap(async (req, res) => {`.catch(() => []),]);- const items = mergeItems({ avatarRows, agentRows, coinRows, modelRows, worldRows, followRows });+ const items = mergeItems({+ avatarRows,+ agentRows,+ coinRows,+ modelRows,+ worldRows,+ restyleRows: restyleRaw.map((r) => ({+ id: r.id,+ created_at: r.created_at,+ glb_url: r.result_url,+ prompt: r.instruction || r.preset || null,+ action: r.action,+ category: r.action === 'variants' ? 'colorway variant' : 'AI restyle',+ username: r.username,+ display_name: r.display_name,+ avatar_url: r.avatar_url,+ })),+ followRows,+ });items.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));const page = items.slice(0, limit);@@ -158,7 +192,7 @@ export default wrap(async (req, res) => {}// scope === 'all': platform-wide recent activity, no follow graph, no auth.- const [avatarRows, agentRows, coinRows, modelRows, worldRows, followRows] = await Promise.all([+ const [avatarRows, agentRows, coinRows, modelRows, worldRows, restyleRecent, followRows] = await Promise.all([sql`select a.id, a.name, a.thumbnail_key, a.created_at,u.username, u.display_name, u.avatar_url@@ -193,6 +227,7 @@ export default wrap(async (req, res) => {`,listRecentCreations({ limit: perKind, before }),listDioramas({ scope: 'recent', limit: perKind, before }),+ listRecentRestyles({ limit: perKind, before }),sql`select f.created_at,uf.username as follower_username, uf.display_name as follower_display, uf.avatar_url as follower_avatar,@@ -231,6 +266,17 @@ export default wrap(async (req, res) => {display_name: w.creatorDisplayName || w.creatorUsername,avatar_url: w.creatorAvatarUrl,})),+ restyleRows: restyleRecent.map((r) => ({+ id: r.id,+ created_at: r.createdAt,+ glb_url: r.glbUrl,+ prompt: r.prompt,+ action: r.action,+ category: r.category,+ username: r.username,+ display_name: r.displayName,+ avatar_url: r.avatarUrl,+ })),followRows,});items.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));@@ -244,7 +290,7 @@ export default wrap(async (req, res) => {});});-function mergeItems({ avatarRows, agentRows, coinRows, modelRows, worldRows, followRows }) {+function mergeItems({ avatarRows, agentRows, coinRows, modelRows, worldRows, restyleRows = [], followRows }) {const items = [];for (const r of avatarRows) {@@ -316,6 +362,21 @@ function mergeItems({ avatarRows, agentRows, coinRows, modelRows, worldRows, fol});}+ for (const r of restyleRows) {+ items.push({+ kind: 'restyle',+ id: r.id,+ created_at: r.created_at,+ actor: actorFrom(r),+ title: r.prompt || (r.action === 'variants' ? 'Colorway variant' : 'Restyled model'),+ subtitle: r.category || null,+ href: `${SITE}/viewer?src=${encodeURIComponent(r.glb_url)}`,+ // result_url is a GLB, not a raster image — render the kind glyph+ // instead of a guaranteed-broken <img>.+ image: null,+ });+ }+for (const r of followRows) {items.push({kind: 'follow',diff --git a/api/web-search.js b/api/web-search.jsnew file mode 100644index 000000000..36a974994--- /dev/null+++ b/api/web-search.js@@ -0,0 +1,60 @@+// GET /api/web-search?q=<text>&sources=<n>+// ---------------------------------------------------------------------------+// Public grounded web search. Until now three.ws had no live web-search+// endpoint at all: /api/search federates the platform's OWN entities+// (avatars/agents/models/worlds/coins) and the intel surfaces run on RSS.+// This endpoint answers open-web questions with cited sources, backed by+// Vertex Gemini's Google Search grounding (api/_lib/web-search.js) — the same+// credits-funded GCP surface as the chat anchor, so it needs no third-party+// key and no per-seat quota.+//+// Response 200: { enabled, q, answer, sources: [{title,url,domain}], queries }+// When the deployment has no GCP project (local dev without credentials) the+// endpoint degrades to { enabled: false } rather than a 500 — same designed+// "warming up" state as /api/search without a database.++import { cors, json, method, wrap, rateLimited } from './_lib/http.js';+import { limits, clientIp } from './_lib/rate-limit.js';+import { groundedSearch, webSearchAvailable } from './_lib/web-search.js';++export default wrap(async (req, res) => {+ if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;+ if (!method(req, res, ['GET'])) return;++ const rl = await limits.publicIp(clientIp(req));+ if (!rl.success) return rateLimited(res, rl);++ const url = new URL(req.url, 'http://x');+ // Same control-character guard as /api/search: this string is forwarded to+ // an upstream API and echoed back in the response.+ // eslint-disable-next-line no-control-regex+ const q = (url.searchParams.get('q') || '')+ .replace(/[\u0000-\u001F\u007F-\u009F]/g, '')+ .trim()+ .slice(0, 400);+ const rawSources = parseInt(url.searchParams.get('sources') || '8', 10);+ const maxSources = Number.isFinite(rawSources) ? Math.min(Math.max(rawSources, 1), 20) : 8;++ if (!webSearchAvailable()) return json(res, 200, { enabled: false, q, sources: [] });+ if (!q) return json(res, 400, { error: 'q required' });++ let result;+ try {+ result = await groundedSearch(q, { maxSources });+ } catch (err) {+ // Upstream failure is a real error state, not an empty result — tell the+ // caller it can retry, and keep the message generic (the raw upstream+ // detail goes to logs, not to the public).+ console.error('[web-search]', err?.message || err);+ return json(res, 502, { error: 'search upstream failed, retry shortly' });+ }++ return json(+ res,+ 200,+ { enabled: true, q, ...result },+ // Grounded answers are not personalized; a short edge cache absorbs+ // repeat queries (each miss is a billed Gemini call).+ { 'cache-control': 'public, s-maxage=60, stale-while-revalidate=300' },+ );+});diff --git a/api/x402/fact-check.js b/api/x402/fact-check.jsindex 0e103cf2d..1ffa77687 100644--- a/api/x402/fact-check.js+++ b/api/x402/fact-check.js@@ -98,6 +98,22 @@ function cacheKey(claim, strictness, imageUrl) {// ── Verdict logic ─────────────────────────────────────────────────────────────+// Verdict = direction of the stance-BEARING evidence, gated by how much of the+// evidence engaged the claim at all. The previous version divided by TOTAL+// weight (neutral sources included), so three tangential results could drown+// two clear confirmations below the 0.65 bar, and an all-neutral result set+// still returned "mixed" — which is how the 2026-07-08 benchmark collapsed to+// 20% (every class predicted "mixed"). Rules now:+// • <2 sources, zero weight, or zero stance-bearing weight → insufficient:+// evidence that never engages the claim is absence of evidence, not+// disagreement.+// • A single stance-bearing source lost in otherwise-silent evidence+// (coverage <30%) is also insufficient — one loosely-matched page must not+// decide a verdict on its own.+// • Direction is judged over stance-bearing weight only: ≥70% one way →+// supported/contradicted; a real split → mixed.+// • Confidence blends dominance with coverage, so a unanimous verdict from+// thin engagement scores lower than one from broad engagement.function computeVerdict(sources) {if (sources.length < 2) {return { verdict: 'insufficient', confidence: 0.2 };@@ -106,27 +122,41 @@ function computeVerdict(sources) {let weightedSupport = 0;let weightedContra = 0;let totalWeight = 0;+ let stanceBearing = 0;for (const s of sources) {totalWeight += s.weight;- if (s.stance === 'supports') weightedSupport += s.weight;- else if (s.stance === 'contradicts') weightedContra += s.weight;+ if (s.stance === 'supports') {+ weightedSupport += s.weight;+ stanceBearing++;+ } else if (s.stance === 'contradicts') {+ weightedContra += s.weight;+ stanceBearing++;+ }}- if (totalWeight === 0) {- return { verdict: 'insufficient', confidence: 0.2 };+ const stanceWeight = weightedSupport + weightedContra;+ if (totalWeight === 0 || stanceWeight === 0) {+ return { verdict: 'insufficient', confidence: 0.3 };+ }++ const coverage = stanceWeight / totalWeight;+ if (stanceBearing === 1 && coverage < 0.3) {+ return { verdict: 'insufficient', confidence: 0.35 };}- const supportRatio = weightedSupport / totalWeight;- const contraRatio = weightedContra / totalWeight;+ const supportRatio = weightedSupport / stanceWeight;+ const contraRatio = weightedContra / stanceWeight;+ const confidence = (dominance) =>+ Math.round(Math.min(0.98, dominance * (0.6 + 0.4 * Math.min(1, coverage * 2))) * 100) / 100;- if (supportRatio > 0.65) {- return { verdict: 'supported', confidence: Math.round(supportRatio * 100) / 100 };+ if (supportRatio >= 0.7) {+ return { verdict: 'supported', confidence: confidence(supportRatio) };}- if (contraRatio > 0.65) {- return { verdict: 'contradicted', confidence: Math.round(contraRatio * 100) / 100 };+ if (contraRatio >= 0.7) {+ return { verdict: 'contradicted', confidence: confidence(contraRatio) };}- return { verdict: 'mixed', confidence: 0.5 };+ return { verdict: 'mixed', confidence: confidence(Math.max(supportRatio, contraRatio)) };}// ── Core fact-check pipeline ───────────────────────────────────────────────────diff --git a/apps-sdk/embodiment/README.md b/apps-sdk/embodiment/README.mdnew file mode 100644index 000000000..85bdfe8f7--- /dev/null+++ b/apps-sdk/embodiment/README.md@@ -0,0 +1,14 @@+# apps-sdk/embodiment - the living-agent-body engine++The `EmbodimentStage` engine and its chrome: a generated, rigged avatar that renders inline in a panel, lip-syncs the assistant's replies, shows the matching emotion, plays body gestures, idles between turns, and reacts while a tool runs. Framework-agnostic: give it a DOM container and a persona (name + GLB URL) and it mounts and drives a Three.js scene.++Full documentation for this directory lives one level up in [../README.md](../README.md) (the `embodiment` section), including what does NOT live here (the ChatGPT inline `<model-viewer>` widget is [api/_mcp-studio/component.js](../../api/_mcp-studio/component.js)). This file is the in-place map:++| File | What it does |+| --- | --- |+| [embodiment-stage.js](./embodiment-stage.js) | `EmbodimentStage`, the engine. State machine loading → idle ⇄ listening ⇄ thinking ⇄ speaking → (error), observable via `opts.onState`. Body animation rides the platform canonicalize/retarget pipeline so any humanoid rig plays the baked clip library; non-humanoid rigs get a gentle alive-idle, never a frozen T-pose. |+| [overlay.js](./overlay.js) | The designed DOM chrome around the body: name plate, conversational-state chip, loading skeleton, actionable error card. Pure DOM + CSS, reduced-motion aware. |+| [chain-visuals.js](./chain-visuals.js) | Pure mapping from a persona's on-chain identity ([api/_lib/persona-wallet.js](../../api/_lib/persona-wallet.js)) to visuals: reputation tier → aura, holdings tier → badge, low balance → muted state. No DOM, no network; unit-testable on its own. |+| [face-expression.js](./face-expression.js) | Re-export of the canonical `FaceExpression` from [src/embodiment/face-expression.js](../../src/embodiment/face-expression.js) so there is one implementation in the codebase. |++Consumed by the hosted embed [pages/embodiment/embed.html](../../pages/embodiment/embed.html) (`/embodiment/embed`, framable by ChatGPT, Claude, and any other host). The reply-to-rig core (lip-sync lanes, emotion classifier, rig-mode gate) lives in [src/embodiment/](../../src/embodiment/) with its own [README](../../src/embodiment/README.md).diff --git a/avatar-sources/README.md b/avatar-sources/README.mdnew file mode 100644index 000000000..500888b25--- /dev/null+++ b/avatar-sources/README.md@@ -0,0 +1,7 @@+# avatar-sources/++Source data for avatar bases that are baked into shipped assets at build time. Nothing here is served directly.++| Directory | What it is |+|---|---|+| [anny/](anny/README.md) | CC0 parametric body data, baked into `public/avatars/parametric-base.glb` by `node scripts/build-parametric-base.mjs`. Provenance and license in its README and [LICENSE.md](anny/LICENSE.md). |diff --git a/contracts/agent-invocation/README.md b/contracts/agent-invocation/README.mdnew file mode 100644index 000000000..d32168080--- /dev/null+++ b/contracts/agent-invocation/README.md@@ -0,0 +1,137 @@+# agent_invocation: verifiable agent-to-agent skill invocations (Solana / Anchor)++When one three.ws agent calls a skill on another agent, this program records+that call on-chain as a **verifiable event**. Anyone can replay the transaction+log and prove who invoked what, on whom, with which parameters, and when,+without trusting our database or either agent's own claims.++```+agent A (signer) --> invoke_skill("summarize", params) --> SkillInvoked event+ |+ +-- invoker_agent PDA ["agent", A] (proves A is A)+ +-- target_agent PDA ["agent", B] (proves B exists)+```++The program is intentionally non-trust-bearing: it moves no funds and grants no+capability. Its single job is identity-checked event emission, which makes it+the audit rail under three.ws agent-to-agent (A2A) coordination. This is the+"On-chain agent invocation" surface in [STRUCTURE.md](../../STRUCTURE.md); the+published client is [`@three-ws/agent-protocol-sdk`](../../agent-protocol-sdk/README.md).++Program id (same on every cluster, baked into `declare_id!`):+**[`AgEntJDMi1A7UadCoYcx6Fm3gusNk8SHLCi7vSUa4Zfo`](https://explorer.solana.com/address/AgEntJDMi1A7UadCoYcx6Fm3gusNk8SHLCi7vSUa4Zfo)**++## Agent identity: PDAs, not registrations++An agent's on-chain identity is a program-derived address, computed from the+wallet that controls it:++| Account | Seeds | Notes |+|---|---|---|+| `invoker_agent` | `["agent", invoker_authority]` | Re-derived and verified by Anchor `seeds`/`bump` constraints. The authority must sign, so a caller can only ever act as their own agent. |+| `target_agent` | `["agent", target_authority]` | Same derivation for the target. The target authority does not sign; only its pubkey is needed to re-derive the PDA. |++Because both agent accounts are constrained PDAs rather than raw `AccountInfo`,+an attacker cannot substitute an arbitrary account and have downstream+consumers trust it. There is no registration instruction and no rent: the PDA+derivation itself is the identity scheme. The SDK mirrors it in+[`deriveAgentPda`](../../agent-protocol-sdk/src/index.ts).++## Instructions++| Instruction | Signer | Effect |+|---|---|---|+| `invoke_skill(skill_name, parameters)` | `invoker_authority` | Validates lengths, verifies both agent PDAs, and emits a `SkillInvoked` event. No state is written. |++Limits enforced on-chain (and re-checked client-side by the SDK):+`skill_name` is 1 to 64 bytes, `parameters` is at most 512 bytes (typically a+JSON blob). Violations fail with `EmptySkillName`, `SkillNameTooLong`, or+`ParametersTooLong` from the program's `InvocationError` enum.++## The `SkillInvoked` event++Emitted via Anchor `emit!`, decodable with `anchor.EventParser` and the IDL:++| Field | Type | Meaning |+|---|---|---|+| `invoker_agent` | `Pubkey` | PDA of the calling agent |+| `target_agent` | `Pubkey` | PDA of the agent whose skill was invoked |+| `invoker_authority` | `Pubkey` | Wallet that signed the invocation |+| `skill_name` | `String` | Skill identifier (max 64 bytes) |+| `parameters` | `String` | Opaque parameter blob (max 512 bytes) |+| `timestamp` | `i64` | Cluster unix time at emission |++The hand-maintained IDL lives at+[`../idl/agent_invocation.json`](../idl/agent_invocation.json), kept in sync+with [`src/lib.rs`](src/lib.rs) and shipped inside the SDK as its `IDL` export.++## Usage++Most callers should not build instructions by hand; use the SDK:++```bash+npm install @three-ws/agent-protocol-sdk @solana/web3.js @coral-xyz/anchor+```++This example is the core of the devnet smoke test+([`scripts/agent-invocation-smoke.mjs`](../../scripts/agent-invocation-smoke.mjs)),+which runs it end-to-end against the live program and asserts every event field:++```js+import { Connection, Keypair, PublicKey } from '@solana/web3.js';+import { invokeSkill, deriveAgentPda } from '@three-ws/agent-protocol-sdk';++const connection = new Connection('https://api.devnet.solana.com', 'confirmed');++const invokerAuthority = Keypair.generate(); // must hold SOL; it signs and pays the fee+const targetAuthority = Keypair.generate().publicKey; // wallet owning the target agent++// The PDAs that will appear in the emitted event.+const [invokerAgent] = deriveAgentPda(invokerAuthority.publicKey);+const [targetAgent] = deriveAgentPda(targetAuthority);++const signature = await invokeSkill({+ connection,+ invokerAuthority,+ targetAuthority,+ skillName: 'summarize',+ parameters: JSON.stringify({ url: 'https://three.ws', lang: 'en' }),+});++console.log(`SkillInvoked: ${invokerAgent} -> ${targetAgent}`);+console.log(`https://explorer.solana.com/tx/${signature}?cluster=devnet`);+```++`invokeSkill` validates the length limits locally, derives both PDAs, builds+the `invoke_skill` instruction, and returns the confirmed signature. Pass+`programId` only when targeting a deployment other than the default id above.++## Build, test, deploy++The crate is a self-contained Cargo workspace (see [Cargo.toml](Cargo.toml)),+so builds here never walk up into an unrelated parent workspace:++```bash+anchor build # compile + verify against the IDL+anchor deploy --provider.cluster devnet # program keypair = declare_id+anchor run smoke # devnet smoke test (defined in Anchor.toml)+```++The smoke test funds a fresh synthetic invoker (devnet airdrop, or a+`SMOKE_FUNDER_KEYPAIR` payer on other clusters), submits a real+`invoke_skill`, then parses the transaction logs and asserts each+`SkillInvoked` field matches what was sent. It exits non-zero on any mismatch.+Cluster config, program ids per cluster, and the deploy wallet path are in+[Anchor.toml](Anchor.toml); the deploy authority keypair is kept out of the+repo (Secret Manager: `AGENT_INVOCATION_DEPLOY_AUTHORITY`).++## Related surfaces++- [`agent-protocol-sdk/`](../../agent-protocol-sdk/README.md): the npm client+ (`invokeSkill`, `deriveAgentPda`, `IDL`, `AGENT_INVOCATION_PROGRAM_ID`,+ `MAX_SKILL_NAME_LEN`, `MAX_PARAMETERS_LEN`).+- [`../skill-license/`](../skill-license/README.md): sibling Anchor program+ minting on-chain skill-ownership NFTs; it follows this program's IDL+ convention.+- [`../README.md`](../README.md): the EVM contracts that share this+ `contracts/` directory.diff --git a/docs/README.md b/docs/README.mdnew file mode 100644index 000000000..55902f66a--- /dev/null+++ b/docs/README.md@@ -0,0 +1,16 @@+# docs/++Product and developer documentation for three.ws. Individual docs are served on the live site under `/docs/<slug>` and `/tutorials/<slug>`.++Start points:++- [start-here.md](start-here.md): the front door for both creators and developers, with the reference shelf at the bottom.+- [introduction.md](introduction.md) and [quick-start.md](quick-start.md): the developer track.+- [ALL.md](ALL.md): generated single-file aggregate of the public docs (regenerate with `node scripts/combine-docs.mjs`; edit source files, never ALL.md).+- [api-reference.md](api-reference.md): the REST API surface, with dedicated docs for the larger API families (crypto, 3D, market data, MCP).++Subdirectories: [tutorials/](tutorials/) (step-by-step guides served on-site), [specs/](specs/) (proposed contracts), [api/](api/), [erc8004/](erc8004/), [agent-abilities/](agent-abilities/), [ux-flows/](ux-flows/) (the UX Flow Atlas), [content/](content/) (use-case narratives), [partners/](partners/).++Private trees, excluded from the public site build and from ALL.md by `vite.config.js` and `scripts/combine-docs.mjs`: [ops/](ops/README.md) (production runbooks), [security/](security/) (review records), [internal/](internal/). Do not link to them from public docs.++Writing rules are in [CLAUDE.md](../CLAUDE.md) (Documentation section): every feature ships with its doc, every code sample runs, every link resolves, update rather than duplicate.diff --git a/docs/api-reference.md b/docs/api-reference.mdindex 5a57f806e..f2975c924 100644--- a/docs/api-reference.md+++ b/docs/api-reference.md@@ -3624,10 +3624,25 @@ Returns public platform configuration. No auth required. CORS open.```json{- "walletConnectProjectId": "..."+ "walletConnectProjectId": "...",+ "privyAppId": "...",+ "samlEnabled": false,+ "samlLabel": "Single sign-on (SSO)",+ "pushEnabled": false,+ "vapidPublicKey": "",+ "features": {+ "avatarReconstruct": true,+ "avatarReconstructMode": "platform",+ "avatarByokProviders": [],+ "avatarRigging": true,+ "videoAvatar": false,+ "liveBodyMocap": false+ }}```+`features` reports which optional avatar pipelines this deployment has configured, so clients can gate their UI honestly (e.g. `avatarReconstructMode` is `"platform"` when the server holds provider credentials, `"byok"` when the user must supply a key).+---## Version APIdiff --git a/docs/ops/production-log-triage.md b/docs/ops/production-log-triage.mdindex 1eea3869d..b38dd5e67 100644--- a/docs/ops/production-log-triage.md+++ b/docs/ops/production-log-triage.md@@ -510,6 +510,47 @@ ERROR 502 POST /api/pump/launch-agent---+## 🟢 `Error: seat reservation expired.` (Colyseus, three-ws-multiplayer) — `colyseus-seat-expired`++- **Source:** `@colyseus/ws-transport` `WebSocketServer.onConnection`, on the+ `three-ws-multiplayer` service.+- **What it means:** matchmaking handed the client a seat, and the client did+ not complete the WebSocket upgrade within the reservation TTL (slow network,+ a closed tab, a mobile browser backgrounding the page mid-join). The server+ correctly refuses the stale ticket; the client's next join request gets a+ fresh seat. Observed cadence is a handful per week, which is normal churn+ for public rooms.+- **Resolve:** 🟢 nothing required. Investigate only if it spikes together+ with real "can't join" reports (then suspect load-balancer or WebSocket+ upgrade latency in front of the service, not Colyseus itself).+- **Monitor signature:** `colyseus-seat-expired` in+ [scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs), `self-healing`.++---++## 🟢 `Uncaught signal: 10, pid=…, tid=…, fault_addr=0.` (three-ws-redis-proxy ONLY) — `redis-proxy-srh-crash`++- **Source:** the pinned third-party image `hiett/serverless-redis-http:0.0.10`+ (SRH, the Upstash-protocol HTTP proxy in front of Redis) running as+ `three-ws-redis-proxy`.+- **What it means:** the SRH runtime aborts sporadically (observed ~3x/day) and+ Cloud Run restarts the instance. `minScale 2` keeps a warm sibling serving+ during the restart, and the API's cache layer rides the blip via its circuit+ breaker + in-memory fallback (see §cache above) — healthz `cache` stays `ok`+ through these events, so there is no user impact at the observed rate.+- **Resolve:** 🟢 nothing required day-to-day. The durable fix is bumping the+ SRH image tag on `three-ws-redis-proxy`, which changes a running binary and+ therefore waits for owner approval like any deploy. Investigate only if the+ crash rate climbs to many per hour or healthz `cache` degrades.+- **Scope note:** the monitor classifies this **only** for+ `three-ws-redis-proxy`. An identical `Uncaught signal` line from any other+ service stays `investigate` — do not generalize this signature.+- **Monitor signature:** `redis-proxy-srh-crash` in+ [scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs), `self-healing`+ (service-scoped via its `services` field).++---+## The owner runbook — every fix as an exact commandEverything red/yellow above, condensed to the actions only the owner can take,diff --git a/examples/README.md b/examples/README.mdindex 9a0d63bf1..50feca317 100644--- a/examples/README.md+++ b/examples/README.md@@ -1,7 +1,68 @@# Examples-This directory contains examples of how to use the 3D-Agent application and SDKs.+Runnable demos for the three.ws SDKs and agent runtime. Two kinds live here:-## Overview+1. **Single-file HTML demos** in this directory. Each one exercises a real web component or embed surface against the live code in [src/](../src/), with no build step.+2. **Example projects** in subdirectories. Each is a self-contained agent, skill bundle, or end-to-end script with its own README, which is the authoritative doc for that project.-...+Use these as working references when embedding three.ws on your own site (see [docs/embedding.md](../docs/embedding.md) and [docs/web-component.md](../docs/web-component.md)) or when defining an agent as files (see [coach-leo/](./coach-leo/)).++## Run the HTML demos++Start the dev server from the repo root, then open any demo by path:++```bash+npm run dev # port 3000+# then visit e.g. http://localhost:3000/examples/bare-avatar.html+```++The demos import the framework source directly (`../src/element.js`, `../src/lib.js`), so edits to `src/` hot-reload into them. Two demos are different on purpose: [embed-test.html](./embed-test.html) loads the published production bundle from `https://three.ws/dist-lib/agent-3d.js` to verify the shipped artifact, and [monicas-apartment/index.html](./monicas-apartment/index.html) opens directly in a browser with no server at all.++## HTML demos++| Demo | What it shows | Loads |+|---|---|---|+| [bare-avatar.html](./bare-avatar.html) | The default `<agent-3d>` output: just the avatar on a transparent background, no chat UI. A checkerboard body proves the transparency. | [src/element.js](../src/element.js) |+| [one-line-demo.html](./one-line-demo.html) | One `<agent-3d chat>` tag turns a page into a full conversational 3D agent (body, instructions, brain, chat UI). | [src/element.js](../src/element.js) |+| [minimal.html](./minimal.html) | `<agent-3d>` dropped into an ordinary landing-page layout. | [src/element.js](../src/element.js) |+| [web-component.html](./web-component.html) | The `<mv-viewer>` custom element: three viewers with different attributes plus its event log. | [src/components/ModelViewerElement.js](../src/components/ModelViewerElement.js) |+| [two-agents.html](./two-agents.html) | `<agent-stage formation="row">` hosting two `<agent-3d>` elements in one shared scene, with a chat input that addresses both. | [src/lib.js](../src/lib.js) |+| [three-concierge.html](./three-concierge.html) | Trinity, a complete agent mounted live from [three-concierge/manifest.json](./three-concierge/manifest.json): body, voice, skills, and scene tools resolved from JSON. | [src/element.js](../src/element.js) |+| [agent-presence.html](./agent-presence.html) | Standalone harness for the `<agent-presence>` studio element and its store. | [src/studio/agent-presence.js](../src/studio/agent-presence.js) |+| [agent-wallet-embed.html](./agent-wallet-embed.html) | `<agent-3d wallet>` on a deliberately unstyled "stranger's blog" page: the portable custodial wallet with live balance and tip flow. | `/dist-lib/agent-3d.js` |+| [embed-test.html](./embed-test.html) | Production-bundle smoke test: `<agent-3d chat>` from the live CDN plus the `<three-ws-widget type="kol-trades">` smart-money widget. | `https://three.ws/dist-lib/agent-3d.js`, [src/widgets/kol-trades.js](../src/widgets/kol-trades.js) |+| [widget-rpc.html](./widget-rpc.html) | Driving the `/widget` iframe from a host page over its JSON-RPC `postMessage` API. | the `/widget` route in an iframe |++## Example projects++| Directory | What it is |+|---|---|+| [coach-leo/](./coach-leo/) | The smallest complete agent defined entirely as files: an `agent-manifest/0.1` manifest, a system prompt, and one installed skill. The template to copy for your own agent. |+| [three-concierge/](./three-concierge/) | Trinity, the reference agent for manifest spec `agent-manifest/0.2`: multiple pump.fun skills, extended thinking, and an ERC-8004 style discovery card. |+| [pump-fun-agent/](./pump-fun-agent/) | An agent manifest composing all four production skills from [pump-fun-skills/](../pump-fun-skills/): swap, coin creation, creator fees, and token payments. |+| [skills/](./skills/) | Six installable skill bundles (`wave`, `solana-wallet`, `pump-fun`, `pump-fun-trade`, `pump-fun-compose`, `pump-fun-strategy`). Each `SKILL.md` documents its tools, config, and safety caps. |+| [agent-native-3d/](./agent-native-3d/) | A Node script that drives the free `/api/mcp-studio` MCP server end to end: generate a mesh, rig it, save it as a persistent agent persona, speak through it, and emit every distribution snippet. |+| [agenc-task-roundtrip/](./agenc-task-roundtrip/) | End-to-end AgenC coordination-protocol demo on Solana devnet: two wallets register, post, claim, and complete a task with real on-chain transactions. |+| [metamask-agent-wallet/](./metamask-agent-wallet/) | A localhost bridge plus single page that gives an agent a real server-side wallet through the authenticated MetaMask Agentic CLI. |+| [monicas-apartment/](./monicas-apartment/) | A walkable first-person Three.js scene in one self-contained HTML file: procedural textures, AABB collision, pointer-lock controls. |++More SDK-specific examples live next to their SDKs: [concierge-sdk/examples/](../concierge-sdk/examples/) and [assistant-sdk/examples/](../assistant-sdk/examples/).++## The one-tag embed, from [bare-avatar.html](./bare-avatar.html)++The core pattern every `<agent-3d>` demo builds on is two lines:++```html+<agent-3d body="/avatars/cz.glb" width="420px" height="560px"></agent-3d>++<script type="module" src="../src/element.js"></script>+```++That renders the animated avatar alone: no chat, no input, no name-plate, transparent background. Add the `chat` attribute (as [one-line-demo.html](./one-line-demo.html) does) to opt into the conversational UI. On a third-party site, replace the module source with the published bundle `https://three.ws/dist-lib/agent-3d.js`, exactly as [embed-test.html](./embed-test.html) does.++## Related docs++- [docs/embedding.md](../docs/embedding.md): all the ways to put a three.ws avatar on another site.+- [docs/web-component.md](../docs/web-component.md): the `<agent-3d>` attribute and API reference.+- [specs/EMBED_SPEC.md](../specs/EMBED_SPEC.md): the embed protocol contract.+- [STRUCTURE.md](../STRUCTURE.md): where every product surface lives in the repo.diff --git a/marketing/brand/brand-assets.html b/marketing/brand/brand-assets.htmlnew file mode 100644index 000000000..227081a15--- /dev/null+++ b/marketing/brand/brand-assets.html@@ -0,0 +1,68 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<title>three.ws brand assets</title>+<link rel="stylesheet" href="/fonts/fonts.css" />+<style>+ * { box-sizing: border-box; margin: 0; padding: 0; }+ body {+ background: #5a5a62;+ font-family: 'Space Grotesk', Inter, sans-serif;+ display: flex; flex-direction: column; align-items: flex-start; gap: 32px; padding: 40px;+ }++ /* Every asset renders on a transparent ground: scripts/render-brand-assets.mjs+ screenshots each .asset with omitBackground, so the page background here is+ only a working surface to judge contrast against. Boxes are sized to the+ artwork, with no padding, so the exported PNG has no dead margin. */+ .asset { display: inline-flex; align-items: center; }++ .mark img { display: block; height: 512px; width: auto; }++ .lockup { gap: 40px; }+ .lockup img { display: block; height: 200px; width: auto; }+ .lockup .word {+ font-size: 150px; font-weight: 600; letter-spacing: -0.045em; line-height: 1;+ padding-bottom: 12px; /* optical: the wordmark sits low against the cube */+ }+ .lockup.on-dark .word { color: #ffffff; }+ .lockup.on-light .word { color: #0b0d0c; }++ .stack { flex-direction: column; gap: 28px; }+ .stack img { height: 300px; }+ .stack .word { font-size: 104px; padding: 0; }+</style>+</head>+<body>++<!-- The mark on its own: the chrome cube, trimmed of transparent margin. -->+<div class="asset mark" id="mark">+ <img src="/marketing/openai-select-partner/cards/three-ws-mark.png" alt="three.ws" />+</div>++<!-- Horizontal lockup, light type, for dark grounds. -->+<div class="asset lockup on-dark" id="lockup-dark">+ <img src="/marketing/openai-select-partner/cards/three-ws-mark.png" alt="" />+ <span class="word">three.ws</span>+</div>++<!-- Horizontal lockup, dark type, for light grounds. -->+<div class="asset lockup on-light" id="lockup-light">+ <img src="/marketing/openai-select-partner/cards/three-ws-mark.png" alt="" />+ <span class="word">three.ws</span>+</div>++<!-- Stacked lockup, for square crops and avatars. -->+<div class="asset lockup stack on-dark" id="stack-dark">+ <img src="/marketing/openai-select-partner/cards/three-ws-mark.png" alt="" />+ <span class="word">three.ws</span>+</div>++<div class="asset lockup stack on-light" id="stack-light">+ <img src="/marketing/openai-select-partner/cards/three-ws-mark.png" alt="" />+ <span class="word">three.ws</span>+</div>++</body>+</html>diff --git a/package-lock.json b/package-lock.jsonindex 73c579c79..032c9a2a1 100644--- a/package-lock.json+++ b/package-lock.json@@ -91,6 +91,7 @@"@grpc/proto-loader": "^0.8.1","@jaames/iro": "^5.5.2","@jup-ag/api": "^6.0.48",+ "@leeoniya/ufuzzy": "^1.0.19","@mediapipe/tasks-vision": "^0.10.35","@metaplex-foundation/mpl-agent-registry": "^0.2.5","@metaplex-foundation/mpl-core": "^1.10.0",@@ -151,7 +152,9 @@"cockatiel": "^4.0.0","colyseus.js": "0.16.22","compression": "^1.8.1",+ "cron-parser": "^5.6.2","dat.gui": "^0.7.9",+ "dompurify": "^3.4.12","draco3dgltf": "^1.5.7","esbuild": "^0.28.1","ethers": "^6.16.0",@@ -160,16 +163,21 @@"fast-xml-parser": "^5.7.3","gltf-validator": "^2.0.0-dev.3.10","helius-sdk": "^3.0.0",+ "idb-keyval": "^6.3.0","jose": "^5.9.6","lightweight-charts": "^5.2.0",+ "lil-gui": "^0.21.0","livekit-client": "^2.19.2","livepeer": "^3.5.0",+ "lru-cache": "^11.5.2",+ "marked": "^18.0.7","meshoptimizer": "^1.1.1","mppx": "^0.6.31","multiformats": "^9.9.0","nanoid": "^3.3.11","nipplejs": "^1.0.4","node-html-parser": "^7.1.0",+ "p-limit": "^7.3.1","postprocessing": "^6.39.1","puppeteer-core": "^25.1.0","qrcode": "^1.5.4",@@ -949,16 +957,6 @@"zod": ">= 3"}},- "character-studio/node_modules/lru-cache": {- "version": "11.5.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",- "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",- "dev": true,- "license": "BlueOak-1.0.0",- "engines": {- "node": "20 || >=22"- }- },"character-studio/node_modules/magic-string": {"version": "0.30.21","resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",@@ -1966,16 +1964,6 @@"lru-cache": "^11.2.5"}},- "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": {- "version": "11.5.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",- "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",- "dev": true,- "license": "BlueOak-1.0.0",- "engines": {- "node": "20 || >=22"- }- },"node_modules/@asamuzakjp/dom-selector": {"version": "6.8.1","resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-6.8.1.tgz",@@ -1990,16 +1978,6 @@"lru-cache": "^11.2.6"}},- "node_modules/@asamuzakjp/dom-selector/node_modules/lru-cache": {- "version": "11.5.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",- "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",- "dev": true,- "license": "BlueOak-1.0.0",- "engines": {- "node": "20 || >=22"- }- },"node_modules/@asamuzakjp/generational-cache": {"version": "1.0.1","resolved": "https://registry.npmjs.org/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz",@@ -2742,6 +2720,15 @@"node": ">=6.9.0"}},+ "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "license": "ISC",+ "dependencies": {+ "yallist": "^3.0.2"+ }+ },"node_modules/@babel/helper-create-class-features-plugin": {"version": "7.28.6","resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz",@@ -4442,6 +4429,13 @@"license": "MIT","optional": true},+ "node_modules/@base-org/account/node_modules/idb-keyval": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz",+ "integrity": "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==",+ "license": "Apache-2.0",+ "optional": true+ },"node_modules/@base-org/account/node_modules/ox": {"version": "0.6.9","resolved": "https://registry.npmjs.org/ox/-/ox-0.6.9.tgz",@@ -11420,6 +11414,12 @@"integrity": "sha512-H66m/cIqdVIA0qLI2X76UOhuMXkS/+uI6e4KQuU3fn6FSBhCX/9fwt/4IdwES4KWXwGtvqhsg2ExkB9tRtNhyA==","license": "MIT"},+ "node_modules/@leeoniya/ufuzzy": {+ "version": "1.0.19",+ "resolved": "https://registry.npmjs.org/@leeoniya/ufuzzy/-/ufuzzy-1.0.19.tgz",+ "integrity": "sha512-0pikDeYt0IHEUPza5RTCDXc/17S1pTrYnReEMp8Aa6k1ovzw5QdZLwicW8TjljwEZRb6oYag0xmALohrcq/yOQ==",+ "license": "MIT"+ },"node_modules/@leichtgewicht/ip-codec": {"version": "2.0.5","resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz",@@ -14480,6 +14480,15 @@"setimmediate": "^1.0.5"}},+ "node_modules/@nomicfoundation/ethereumjs-blockchain/node_modules/lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "license": "ISC",+ "dependencies": {+ "yallist": "^3.0.2"+ }+ },"node_modules/@nomicfoundation/ethereumjs-common": {"version": "4.0.0","resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.0.tgz",@@ -27011,9 +27020,9 @@}},"node_modules/baseline-browser-mapping": {- "version": "2.10.19",- "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.19.tgz",- "integrity": "sha512-qCkNLi2sfBOn8XhZQ0FXsT1Ki/Yo5P90hrkRamVFRS7/KV9hpfA4HkoWNU152+8w0zPjnxo5psx5NL3PSGgv5g==",+ "version": "2.11.6",+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.6.tgz",+ "integrity": "sha512-69D/imtToCsIcAl8WBS2YaRwA4jO/j0HhU+hELqMEu9f54MoUtI6+XH5mrKU8rEFNEk/Ui1I2MK4/JkWacclGw==","license": "Apache-2.0","bin": {"baseline-browser-mapping": "dist/cli.cjs"@@ -27926,9 +27935,9 @@}},"node_modules/caniuse-lite": {- "version": "1.0.30001788",- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001788.tgz",- "integrity": "sha512-6q8HFp+lOQtcf7wBK+uEenxymVWkGKkjFpCvw5W25cmMwEDU45p1xQFBQv8JDlMMry7eNxyBaR+qxgmTUZkIRQ==",+ "version": "1.0.30001806",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz",+ "integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==","funding": [{"type": "opencollective",@@ -29798,6 +29807,18 @@"dev": true,"license": "MIT"},+ "node_modules/cron-parser": {+ "version": "5.6.2",+ "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-5.6.2.tgz",+ "integrity": "sha512-yJ/G1LVir6CnlkLI40CsampPLKl1SprGGlUagWtGJxewytRVYezv5xVyzzbT+Pvzx+VIRvZVF7/a0eEMTxdnTA==",+ "license": "MIT",+ "dependencies": {+ "luxon": "^3.7.2"+ },+ "engines": {+ "node": ">=18"+ }+ },"node_modules/cross-fetch": {"version": "3.2.0","resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz",@@ -30674,6 +30695,15 @@"url": "https://github.com/fb55/domhandler?sponsor=1"}},+ "node_modules/dompurify": {+ "version": "3.4.12",+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.12.tgz",+ "integrity": "sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==",+ "license": "(MPL-2.0 OR Apache-2.0)",+ "optionalDependencies": {+ "@types/trusted-types": "^2.0.7"+ }+ },"node_modules/domutils": {"version": "3.2.2","resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",@@ -30768,9 +30798,9 @@}},"node_modules/electron-to-chromium": {- "version": "1.5.336",- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.336.tgz",- "integrity": "sha512-AbH9q9J455r/nLmdNZes0G0ZKcRX73FicwowalLs6ijwOmCJSRRrLX63lcAlzy9ux3dWK1w1+1nsBJEWN11hcQ==",+ "version": "1.5.398",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.398.tgz",+ "integrity": "sha512-AsvhAxopJGh6museTDMIjn6JpDYOfgu4RLlygomt87MUwBUqTfd/1EiPtx10/LZE8xpTvkP2E9Gafq7lkLtodQ==","license": "ISC"},"node_modules/elliptic": {@@ -34665,9 +34695,9 @@"license": "ISC"},"node_modules/idb-keyval": {- "version": "6.2.1",- "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz",- "integrity": "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==",+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.3.0.tgz",+ "integrity": "sha512-um+2dgAWmYsu615EXpWVwSmapJhON0G43t3Ka/EVaohzPQXSMqKEqeDK/oIW3Ow+BXaF2PvSc+oBTFp793A5Ow==","license": "Apache-2.0"},"node_modules/ieee754": {@@ -38241,16 +38271,6 @@"node": ">=18"}},- "node_modules/jsdom/node_modules/lru-cache": {- "version": "11.5.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",- "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",- "dev": true,- "license": "BlueOak-1.0.0",- "engines": {- "node": "20 || >=22"- }- },"node_modules/jsdom/node_modules/tr46": {"version": "6.0.0","resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz",@@ -38984,6 +39004,12 @@"fancy-canvas": "2.1.0"}},+ "node_modules/lil-gui": {+ "version": "0.21.0",+ "resolved": "https://registry.npmjs.org/lil-gui/-/lil-gui-0.21.0.tgz",+ "integrity": "sha512-tpvxN7v1GvE/Tv+GRopfOp0W7fVEjF4PltkuX8vOCIfim22rD1ztvfkoEMcv9lzQeuNUSeIrUmUjBwmlW/oUew==",+ "license": "MIT"+ },"node_modules/lilconfig": {"version": "3.1.3","resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",@@ -40446,12 +40472,21 @@"license": "MIT"},"node_modules/lru-cache": {- "version": "5.1.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",- "license": "ISC",- "dependencies": {- "yallist": "^3.0.2"+ "version": "11.5.2",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",+ "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": "20 || >=22"+ }+ },+ "node_modules/luxon": {+ "version": "3.7.2",+ "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz",+ "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==",+ "license": "MIT",+ "engines": {+ "node": ">=12"}},"node_modules/lz-string": {@@ -40511,6 +40546,18 @@"tmpl": "1.0.5"}},+ "node_modules/marked": {+ "version": "18.0.7",+ "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.7.tgz",+ "integrity": "sha512-iDVQ5ldaiKXn6b2JroX5kgRfmwgqolW7NpaEzTl1k/2Zh1njIEN9yniyLV/mOvWwtsE8OGgkjsCYvijuPk1dtA==",+ "license": "MIT",+ "bin": {+ "marked": "bin/marked.js"+ },+ "engines": {+ "node": ">= 20"+ }+ },"node_modules/material-colors": {"version": "1.2.6","resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.6.tgz",@@ -41774,10 +41821,13 @@}},"node_modules/node-releases": {- "version": "2.0.37",- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.37.tgz",- "integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==",- "license": "MIT"+ "version": "2.0.51",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz",+ "integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }},"node_modules/node-stdlib-browser": {"version": "1.3.1",@@ -42395,15 +42445,27 @@}},"node_modules/p-limit": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",+ "version": "7.3.1",+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.3.1.tgz",+ "integrity": "sha512-0trZaiG7Y7kN/Egy9a8j47t9osC0Tch4PaIWd9yGF6bvmlk7muExRvGNYb8sXBwEKMoNKsbNN9P8EefuQekE4Q==","license": "MIT","dependencies": {- "p-try": "^2.0.0"+ "yocto-queue": "^1.2.1"},"engines": {- "node": ">=6"+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-limit/node_modules/yocto-queue": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz",+ "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==",+ "license": "MIT",+ "engines": {+ "node": ">=12.20"},"funding": {"url": "https://github.com/sponsors/sindresorhus"@@ -42421,6 +42483,21 @@"node": ">=8"}},+ "node_modules/p-locate/node_modules/p-limit": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",+ "license": "MIT",+ "dependencies": {+ "p-try": "^2.0.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/p-map": {"version": "4.0.0","resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",@@ -42738,16 +42815,6 @@"url": "https://github.com/sponsors/isaacs"}},- "node_modules/path-scurry/node_modules/lru-cache": {- "version": "11.3.5",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.3.5.tgz",- "integrity": "sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw==",- "dev": true,- "license": "BlueOak-1.0.0",- "engines": {- "node": "20 || >=22"- }- },"node_modules/path-to-regexp": {"version": "6.3.0","resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",@@ -49807,15 +49874,6 @@}}},- "node_modules/unstorage/node_modules/lru-cache": {- "version": "11.5.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",- "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",- "license": "BlueOak-1.0.0",- "engines": {- "node": "20 || >=22"- }- },"node_modules/upath": {"version": "1.2.0","resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",diff --git a/package.json b/package.jsonindex d4df05ab0..dc3d83a7b 100644--- a/package.json+++ b/package.json@@ -227,6 +227,7 @@"lint:fix": "eslint . --fix","check:dist": "node scripts/check-dist.mjs","check:pages": "node scripts/check-pages.mjs",+ "check:claude": "node scripts/check-claude-md.mjs","smoke:prod": "node scripts/check-pages.mjs --base https://three.ws","deploy": "npm run build:all && npm run check:dist && vercel --local-config vercel.json --prod","build:info": "node scripts/write-build-info.mjs",@@ -289,6 +290,7 @@"@grpc/proto-loader": "^0.8.1","@jaames/iro": "^5.5.2","@jup-ag/api": "^6.0.48",+ "@leeoniya/ufuzzy": "^1.0.19","@mediapipe/tasks-vision": "^0.10.35","@metaplex-foundation/mpl-agent-registry": "^0.2.5","@metaplex-foundation/mpl-core": "^1.10.0",@@ -349,7 +351,9 @@"cockatiel": "^4.0.0","colyseus.js": "0.16.22","compression": "^1.8.1",+ "cron-parser": "^5.6.2","dat.gui": "^0.7.9",+ "dompurify": "^3.4.12","draco3dgltf": "^1.5.7","esbuild": "^0.28.1","ethers": "^6.16.0",@@ -358,16 +362,21 @@"fast-xml-parser": "^5.7.3","gltf-validator": "^2.0.0-dev.3.10","helius-sdk": "^3.0.0",+ "idb-keyval": "^6.3.0","jose": "^5.9.6","lightweight-charts": "^5.2.0",+ "lil-gui": "^0.21.0","livekit-client": "^2.19.2","livepeer": "^3.5.0",+ "lru-cache": "^11.5.2",+ "marked": "^18.0.7","meshoptimizer": "^1.1.1","mppx": "^0.6.31","multiformats": "^9.9.0","nanoid": "^3.3.11","nipplejs": "^1.0.4","node-html-parser": "^7.1.0",+ "p-limit": "^7.3.1","postprocessing": "^6.39.1","puppeteer-core": "^25.1.0","qrcode": "^1.5.4",diff --git a/pages/agent-screen.html b/pages/agent-screen.htmlindex 57f62c3a6..7c1dfbea2 100644--- a/pages/agent-screen.html+++ b/pages/agent-screen.html@@ -7,6 +7,8 @@<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="theme-color" content="#0a0a0b" /><meta name="description" content="Watch your agent in real time — see their screen and avatar as they autonomously trade, browse, and act." data-i18n-attr="content:agent_screen.meta_description"/>+ <meta name="robots" content="noindex" />+ <link rel="canonical" href="https://three.ws/agent-screen" /><meta property="og:type" content="website" /><meta property="og:url" content="https://three.ws/agent-screen" />diff --git a/pages/agent-studio.html b/pages/agent-studio.htmlindex 3e100d328..a3472cc12 100644--- a/pages/agent-studio.html+++ b/pages/agent-studio.html@@ -19,6 +19,20 @@content="Agent Studio — author your AI agent's brain, memory, body, money, and skills in one place, with a live 3D avatar that updates everywhere as you edit."data-i18n-attr="content:agent_studio.meta_description"/><meta name="robots" content="noindex" />+ <link rel="canonical" href="https://three.ws/agent-studio" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:url" content="https://three.ws/agent-studio" />+ <meta property="og:title" content="Agent Studio · three.ws" />+ <meta property="og:description" content="Author your agent's brain, memory, body, money, and skills in one place, with a live 3D avatar that updates everywhere as you edit." />+ <meta property="og:image" content="https://three.ws/api/page-og?s=build&t=Agent+Studio&d=Author+your+agent%27s+brain%2C+memory%2C+body%2C+money%2C+and+skills+in+one+place%2C+with+a+live+3D+avatar+that+updates+everywhere+as+you+edit.&p=%2Fagent-studio" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Agent Studio · three.ws" />+ <meta name="twitter:description" content="Author your agent's brain, memory, body, money, and skills in one place, with a live 3D avatar that updates everywhere as you edit." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=build&t=Agent+Studio&d=Author+your+agent%27s+brain%2C+memory%2C+body%2C+money%2C+and+skills+in+one+place%2C+with+a+live+3D+avatar+that+updates+everywhere+as+you+edit.&p=%2Fagent-studio" /><link rel="stylesheet" href="/nav.css" /><link rel="stylesheet" href="/footer.css" />diff --git a/pages/autopilot-activity.html b/pages/autopilot-activity.htmlindex 766c02e56..418e18c4a 100644--- a/pages/autopilot-activity.html+++ b/pages/autopilot-activity.html@@ -7,9 +7,20 @@<meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="autopilot_activity.meta_title">Autopilot Activity — three.ws</title><meta name="description" content="Every autonomous action your three.ws agent took — each with the memory that motivated it, a signed receipt, and a one-tap undo. Explainable autonomy you can trust." data-i18n-attr="content:autopilot_activity.meta_description"/>+ <link rel="canonical" href="https://three.ws/autopilot-activity" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:url" content="https://three.ws/autopilot-activity" /><meta property="og:title" content="Autopilot Activity — three.ws" data-i18n-attr="content:autopilot_activity.meta_og_title"/><meta property="og:description" content="Explainable autonomy: every action your agent took, with the memory that motivated it and a signed receipt." data-i18n-attr="content:autopilot_activity.meta_og_description"/>+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&t=Autopilot+Activity&d=Explainable+autonomy%3A+every+action+your+agent+took%2C+with+the+memory+that+motivated+it+and+a+signed+receipt.&p=%2Fautopilot-activity" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" /><meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Autopilot Activity · three.ws" />+ <meta name="twitter:description" content="Explainable autonomy: every action your agent took, with the memory that motivated it and a signed receipt." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&t=Autopilot+Activity&d=Explainable+autonomy%3A+every+action+your+agent+took%2C+with+the+memory+that+motivated+it+and+a+signed+receipt.&p=%2Fautopilot-activity" /><link rel="icon" href="/favicon.ico" sizes="any" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="manifest" href="/manifest.webmanifest" />diff --git a/pages/forge.html b/pages/forge.htmlindex 4f066a556..708ec10d7 100644--- a/pages/forge.html+++ b/pages/forge.html@@ -2812,6 +2812,10 @@<header class="forge-head"><h1 data-i18n="forge.forge">Forge</h1><p data-i18n-html="forge.free_text_or_photos_textured_3d_model"><span class="forge-free-tag">Free</span> text or photos → textured 3D model. Orbit, AR, download.</p>+ <noscript>+ <p>The Forge turns a text prompt or photos into a downloadable, textured 3D model in your browser, and that generation pipeline needs JavaScript. Enable JavaScript and reload to forge. The same lane is also callable as a keyless API: <a href="/3d">the free 3D API</a>.</p>+ <p><a href="/">three.ws home</a> · <a href="/docs">Read the docs</a></p>+ </noscript></header><div class="forge-workspace">diff --git a/pages/home.html b/pages/home.htmlindex 5b1d5306a..a0049bfd5 100644--- a/pages/home.html+++ b/pages/home.html@@ -46,2722 +46,7 @@<link rel="stylesheet" href="/buttons.css" /><link rel="stylesheet" href="/nav.css" /><link rel="stylesheet" href="/economy-ticker.css" />- <style>- :root {- color-scheme: dark;- /* Home-local names track the canonical /tokens.css vocabulary so this- page reads as one product with the rest of the site AND flips cleanly- between themes. --bg / --text / --text-2..4 / --hairline* are the- shared "nav-source" tokens: declared here for the dark brand palette- and remapped by [data-theme='light'] in tokens.css. --surface-1..3 and- --accent are NOT re-forked here — they inherit their canonical values- (which already flip). The three home-only tokens canonical can't reach- (--surface-0 / --green / --accent-2) get their light values in the- scoped [data-theme='light'] block just below. */- --bg: var(--bg-0); /* #0a0a0a — same near-black as the app shell */- --surface-0: #0e0e0f; /* opaque card / panel fill; light value set below */- --hairline: var(--stroke);- --hairline-strong: var(--stroke-strong);- --text: #f6f6f6;- --text-2: #a8a8a8;- --text-3: #8a8a8a; /* AA: ≥4.5:1 on dark surfaces for secondary text */- --text-4: #6e6e6e; /* AA: ≥3:1 (large/decorative only) */- --accent-2: var(--accent);- --green: var(--ink);- --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;- --font-body: 'Inter', system-ui, sans-serif;- --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;- }-- /* ── Light theme (home-local) ───────────────────────────────────────────- Dark is the primary brand palette. tokens.css already flips the shared- nav-source tokens under [data-theme='light']; these rules cover the- home-only tokens and the handful of hardcoded surfaces canonical can't- reach, so the page stays fully legible and on-brand in light mode. */- :root[data-theme='light'] {- --surface-0: var(--bg-1); /* #f3f4f6 — light card/panel on the white page */- }- /* Selection-state chips hardcode white tints — re-map to ink tints on light- so the active/selected control stays visible. */- [data-theme='light'] .pg-chip.active {- border-color: var(--stroke-strong); background: var(--surface-3); color: var(--ink);- }- [data-theme='light'] .hero-chip[data-active="true"] {- border-color: var(--stroke-strong); background: var(--surface-3); color: var(--ink);- }- /* Code-editor syntax spans hardcode light greys (legible only on a dark- pane). On a light pane, re-map them to dark inks + the accent for strings. */- [data-theme='light'] .pg-editor pre .tag,- [data-theme='light'] .code-pane pre .tag { color: var(--ink); }- [data-theme='light'] .pg-editor pre .attr,- [data-theme='light'] .code-pane pre .attr { color: var(--ink-dim); }- [data-theme='light'] .pg-editor pre .str,- [data-theme='light'] .code-pane pre .str,- [data-theme='light'] .dev-code .str,- [data-theme='light'] .bento-code .str { color: var(--accent); }- [data-theme='light'] .dev-code .num { color: var(--ink-dim); }- /* Selection states that use pure-white tints (correct on dark) need ink- equivalents on light so the active control stays visible. */- [data-theme='light'] .bento-pill-btn.active {- border-color: var(--stroke-strong); background: var(--surface-3); color: var(--ink);- }- [data-theme='light'] #home-sniper .snipe-stage.active .snipe-node,- [data-theme='light'] #home-sniper .snipe-stage.flow .snipe-node {- border-color: var(--accent); color: var(--accent);- }- * { box-sizing: border-box; }- html { scroll-behavior: smooth; }- html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }- body {- font-size: 15.5px; line-height: 1.55;- min-height: 100vh; overflow-x: hidden;- -webkit-font-smoothing: antialiased;- text-rendering: optimizeLegibility;- }- a { color: inherit; text-decoration: none; }- button { font-family: inherit; cursor: pointer; }- ::selection { background: var(--text); color: var(--bg); }- main#main-content { display: block; outline: none; }- .skip-link {- position: fixed; top: 12px; left: 12px; z-index: 1000;- transform: translateY(-150%);- padding: 10px 16px; border-radius: 8px;- background: var(--text); color: var(--bg);- font-family: var(--font-mono); font-size: 13px; font-weight: 600;- text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,0.5);- transition: transform 0.18s ease;- }- .skip-link:focus-visible { transform: translateY(0); outline: 2px solid var(--accent); outline-offset: 2px; }- .wrap-1280 { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }- .wrap-1440 { max-width: 1440px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }- @media (max-width: 720px) { .wrap-1280, .wrap-1440 { padding-left: 20px; padding-right: 20px; } }-- /* Header/nav styles live in /nav.css (loaded by /nav.js). */-- /* Buttons: canonical shared system — see public/buttons.css (loaded above). */- .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }-- /* ── HERO ────────────────────────────────────────────────── */- .hero {- display: grid; grid-template-columns: 1.05fr 1fr;- gap: 0; min-height: calc(100vh - 57px); position: relative;- }- .hero::after {- content: ""; position: absolute; left: 50%; top: 0; bottom: 0;- width: 1px; background: var(--hairline);- }- @media (max-width: 980px) { .hero { grid-template-columns: 1fr; min-height: 0; } .hero::after { display: none; } .hero-text, .hero-stage { min-width: 0; } }- .hero-text {- padding: 96px 48px 96px 72px;- display: flex; flex-direction: column; justify-content: center;- }- @media (max-width: 980px) { .hero-text { padding: 64px 20px 32px; } }- .eyebrow {- display: inline-flex; align-items: center; gap: 10px;- font-family: var(--font-mono); font-size: 11.5px;- text-transform: uppercase; letter-spacing: 0.18em;- color: var(--text-3); margin-bottom: 32px;- }- .eyebrow::before {- content: ""; width: 6px; height: 6px; border-radius: 50%;- background: var(--green); box-shadow: 0 0 6px var(--green);- animation: pulse-green 2.4s ease-in-out infinite;- }- @keyframes pulse-green { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }- a.eyebrow {- color: var(--text-2); text-decoration: none;- padding: 7px 14px 7px 12px; margin-left: -12px;- border: 1px solid var(--hairline); border-radius: 999px;- transition: color 0.15s, border-color 0.15s, background 0.15s;- }- a.eyebrow .eyebrow-arrow { display: inline-block; transition: transform 0.15s; }- a.eyebrow:hover, a.eyebrow:focus-visible {- color: var(--text); border-color: var(--hairline-strong);- background: rgba(255, 255, 255, 0.03);- }- a.eyebrow:hover .eyebrow-arrow, a.eyebrow:focus-visible .eyebrow-arrow { transform: translateX(3px); }- h1.hero-h {- font-family: var(--font-display);- font-size: clamp(52px, 6.8vw, 108px);- line-height: 0.92; letter-spacing: -0.045em;- font-weight: 600; margin: 0 0 32px; color: var(--text);- }- h1.hero-h em { font-style: normal; color: var(--text-3); font-weight: 500; }- .hero-sub {- font-size: 18px; color: var(--text-2);- max-width: 500px; margin: 0 0 36px; line-height: 1.55; font-weight: 400;- }- .hero-bullets {- list-style: none; padding: 0; margin: 0 0 40px;- display: flex; flex-direction: column; gap: 10px;- }- .hero-bullets li {- display: flex; align-items: center; gap: 12px;- font-size: 15px; color: var(--text-2);- min-width: 0;- }- .hero-bullets li::before {- content: ""; width: 5px; height: 5px; border-radius: 50%;- background: var(--text-3); flex-shrink: 0;- }- /* On phones a bullet's sentence must wrap as one paragraph. Flex would- split <strong>/glossary spans into separate wrapping items, so switch- the row to normal inline flow with the dot as an inline marker. */- @media (max-width: 560px) {- .hero-bullets li {- display: block; padding-left: 17px; position: relative;- }- .hero-bullets li::before {- position: absolute; left: 0; top: 0.62em; transform: translateY(-50%);- }- }- .hero-bullets li strong { color: var(--text); font-weight: 550; }-- /* ── Hero forge bar: the primary hero affordance ───────────────────── */- .hero-forge {- display: flex; align-items: center; gap: 10px;- width: 100%; max-width: 560px; margin: 4px 0 12px;- padding: 7px 7px 7px 16px; border-radius: 14px;- background:- linear-gradient(var(--surface-0), var(--surface-0)) padding-box,- linear-gradient(120deg, rgba(255,180,84,.55), rgba(255,106,213,.55) 38%, rgba(139,92,246,.55) 64%, rgba(79,195,255,.55)) border-box;- border: 1.5px solid transparent;- box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 8px 30px -18px rgba(139,92,246,.5);- transition: box-shadow .25s ease, transform .25s ease;- }- .hero-forge:focus-within {- box-shadow: 0 0 0 4px rgba(139,92,246,.16), 0 10px 34px -16px rgba(139,92,246,.6);- transform: translateY(-1px);- }- .hero-forge-glyph {- font-size: 15px; line-height: 1; flex: 0 0 auto;- background: linear-gradient(120deg, #ffb454, #ff6ad5 40%, #8b5cf6 66%, #4fc3ff);- -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;- animation: hero-forge-glyph-spin 8s linear infinite;- }- @keyframes hero-forge-glyph-spin { to { transform: rotate(360deg); } }- .hero-forge-input {- flex: 1 1 auto; min-width: 0;- background: transparent; border: 0; outline: 0; padding: 8px 2px;- color: var(--text); font-family: var(--font-body); font-size: 15px; letter-spacing: -0.01em;- }- .hero-forge-input::placeholder { color: var(--text-3); }- .hero-forge-go {- flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;- padding: 10px 16px; border-radius: 9px; cursor: pointer;- font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: -0.01em;- color: #0a0a0a; border: 0;- background: linear-gradient(120deg, #ffb454, #ff6ad5 40%, #8b5cf6 66%, #4fc3ff);- background-size: 160% 160%; background-position: 0% 50%;- transition: background-position .5s ease, box-shadow .25s ease, transform .12s ease, opacity .2s ease;- }- .hero-forge-go .arrow { transition: transform .2s ease; }- .hero-forge-go:hover { background-position: 100% 50%; box-shadow: 0 0 22px -4px rgba(139,92,246,.55); }- .hero-forge-go:hover .arrow { transform: translateX(3px); }- .hero-forge-go:active { transform: translateY(1px); }- .hero-forge-go:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }- .hero-forge-go[data-busy="1"] { opacity: .72; cursor: progress; }- .hero-forge-go .btn-forge-dot { background: rgba(10,10,10,.85); }- .hero-forge-tries {- display: flex; align-items: center; gap: 8px; flex-wrap: wrap;- margin: 0 0 14px; font-size: 12.5px;- }- .hero-forge-tries-label {- font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;- text-transform: uppercase; color: var(--text-4);- }- .hero-try {- padding: 5px 11px; border-radius: 999px; cursor: pointer;- background: var(--surface-0); border: 1px solid var(--hairline);- color: var(--text-2); font-family: var(--font-body); font-size: 12.5px;- transition: color .15s ease, border-color .15s ease, background .15s ease, transform .12s ease;- }- .hero-try:hover { color: var(--text); border-color: var(--hairline-strong); transform: translateY(-1px); }- .hero-try:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }- .hero-forge-note { font-size: 12.5px; color: var(--text-3); margin: 0 0 20px; }- .hero-forge-note a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--hairline-strong); }- .hero-forge-note a:hover { color: var(--text); }- @media (prefers-reduced-motion: reduce) {- .hero-forge-glyph { animation: none; }- .hero-forge:focus-within { transform: none; }- }- .hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }- .hero-reassure {- display: inline-flex; align-items: center; gap: 9px;- font-size: 13.5px; line-height: 1.5; color: var(--text-3);- margin: 0 0 52px; max-width: 460px;- }- .hero-reassure svg {- width: 15px; height: 15px; flex-shrink: 0; color: var(--green);- }- .hero-reassure strong { color: var(--text-2); font-weight: 600; }- .hero-reassure a {- color: var(--text-2); text-decoration: none;- border-bottom: 1px solid var(--hairline-strong);- transition: color 0.15s, border-color 0.15s;- }- .hero-reassure a:hover, .hero-reassure a:focus-visible {- color: var(--text); border-bottom-color: var(--text-3);- }- .hero-reassure a:focus-visible {- outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));- outline-offset: var(--focus-ring-offset,2px); border-radius: 2px;- }-- .metrics {- display: flex; gap: 28px; flex-wrap: wrap;- padding-top: 28px; border-top: 1px solid var(--hairline);- font-family: var(--font-mono); font-size: 12px;- color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em;- }- .metric { display: flex; align-items: baseline; gap: 7px; }- .metric strong {- font-family: var(--font-display); color: var(--text); font-weight: 600;- font-size: 17px; letter-spacing: -0.02em; text-transform: none;- font-variant-numeric: tabular-nums;- }-- /* ── Hero stage ──────────────────────────────────────────── */- .hero-stage {- position: relative; overflow: hidden; container-type: inline-size;- background:- radial-gradient(118% 78% at 50% 20%, rgba(255,255,255,0.075) 0%, rgba(255,255,255,0.022) 36%, transparent 60%),- radial-gradient(72% 48% at 50% 104%, rgba(0,0,0,0.6) 0%, transparent 72%),- var(--bg);- }- .hero-stage agent-3d {- position: absolute; inset: 0; display: block; width: 100%; height: 100%;- }- .hero-stage-inner {- position: absolute; inset: 0;- transform-style: preserve-3d;- transition: transform 0.35s cubic-bezier(.2,.7,.3,1);- will-change: transform;- }- .hero-stage-fallback {- position: absolute; inset: 0;- display: flex; flex-direction: column;- align-items: center; justify-content: center;- gap: 12px; text-align: center; padding: 24px;- }- .hero-stage-fallback p {- margin: 0; color: var(--text-3); font-size: 13.5px; max-width: 240px;- }-- /* Hero loading state. The stage is the site's single most important first- impression, and it used to be a silent near-black void for up to 15s while- the GLB and the <agent-3d> CDN loader resolve on a cold cache. A breathing- agent silhouette + "summoning" copy keeps it alive and on-brand; it fades- out the instant agent:ready fires (bootHeroAvatar). */- .hero-stage-loading {- position: absolute; inset: 0; z-index: 3;- display: flex; flex-direction: column;- align-items: center; justify-content: center;- gap: 16px; pointer-events: none;- transition: opacity 0.5s ease;- }- .hero-stage-loading.is-hiding { opacity: 0; }- .hero-stage-loading-figure {- position: relative;- width: clamp(84px, 26cqw, 138px); height: auto;- color: var(--text-4);- animation: hero-load-breathe 2.4s ease-in-out infinite;- }- .hero-stage-loading-figure::before {- content: ''; position: absolute; left: 50%; top: 46%;- width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%);- background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 62%);- z-index: -1;- }- @keyframes hero-load-breathe {- 0%, 100% { opacity: 0.34; transform: translateY(0) scale(1); }- 50% { opacity: 0.72; transform: translateY(-2px) scale(1.015); }- }- .hero-stage-loading-copy {- font-size: 12.5px; letter-spacing: 0.02em; color: var(--text-3);- }- .hero-stage-loading-copy .dot { animation: hero-load-dot 1.4s ease-in-out infinite; }- .hero-stage-loading-copy .dot:nth-child(2) { animation-delay: 0.18s; }- .hero-stage-loading-copy .dot:nth-child(3) { animation-delay: 0.36s; }- @keyframes hero-load-dot { 0%, 65%, 100% { opacity: 0.2; } 30% { opacity: 1; } }- @media (prefers-reduced-motion: reduce) {- .hero-stage-loading-figure { animation: none; opacity: 0.5; }- .hero-stage-loading-copy .dot { animation: none; opacity: 0.6; }- .hero-stage-loading { transition: none; }- }-- /* ── CAPABILITY STRIP ──────────────────────────────────── */- .capability-strip {- position: relative;- overflow: hidden;- border-top: 1px solid var(--hairline);- border-bottom: 1px solid var(--hairline);- background: var(--surface-0);- padding: 13px 0;- cursor: default;- user-select: none;- }- .capability-strip:hover .cap-track { animation-play-state: paused; }- .cap-track {- display: flex;- width: max-content;- animation: cap-scroll 55s linear infinite;- will-change: transform;- }- .cap-inner {- display: flex;- align-items: center;- flex-shrink: 0;- }- .cap-item {- font-family: var(--font-mono);- font-size: 11.5px;- letter-spacing: 0.04em;- color: var(--text-3);- white-space: nowrap;- padding: 0 2px;- transition: color 0.15s;- }- .cap-item:hover { color: var(--text-2); }- .cap-sep {- font-size: 10px;- color: var(--text-4);- padding: 0 16px;- flex-shrink: 0;- pointer-events: none;- }- @keyframes cap-scroll {- from { transform: translateX(0); }- to { transform: translateX(-50%); }- }- .cap-fade {- position: absolute;- top: 0; bottom: 0;- width: 120px;- z-index: 2;- pointer-events: none;- }- .cap-fade--l {- left: 0;- background: linear-gradient(to right, var(--surface-0) 30%, transparent);- }- .cap-fade--r {- right: 0;- background: linear-gradient(to left, var(--surface-0) 30%, transparent);- }-- /* ── PARTNER / PRESS STRIP ───────────────────────────────── */- .press-strip { padding: 38px 0 42px; }- .press-strip-cap {- font-family: var(--font-mono); font-size: 10.5px;- letter-spacing: 0.2em; text-transform: uppercase;- color: var(--text-3); text-align: center; margin-bottom: 24px;- }- .press-row {- display: flex; flex-wrap: wrap; justify-content: center;- gap: 18px 38px; align-items: center; max-width: 1000px; margin: 0 auto;- }- .press-logo {- display: inline-flex; align-items: center; gap: 9px;- /* Dim the ICON only, never the label: text-3 at 0.7 link opacity- measured 3.7:1 on the dark bg (axe AA needs 4.5:1); undimmed- text-3 is 5.7:1. */- color: var(--text-3); text-decoration: none;- font-family: var(--font-display); font-size: 15px; font-weight: 500;- letter-spacing: -0.02em;- transition: opacity 0.15s, color 0.15s;- }- .press-logo .ico { opacity: 0.7; transition: opacity 0.15s; }- .press-logo:hover .ico, .press-logo:focus-visible .ico { opacity: 1; }- .press-logo:hover, .press-logo:focus-visible { color: var(--text); }- .press-logo:focus-visible {- outline: 1px solid var(--hairline-strong); outline-offset: 4px; border-radius: 4px;- }- .press-logo .ico {- width: 17px; height: 17px; flex: 0 0 auto; background: currentColor;- -webkit-mask: var(--logo) center / contain no-repeat;- mask: var(--logo) center / contain no-repeat;- }- @media (max-width: 720px) {- .press-row { gap: 16px 26px; }- .press-logo { font-size: 13.5px; }- }-- /* ── SECTION FRAME ───────────────────────────────────────── */- section.block { padding: 112px 0; border-top: 1px solid var(--hairline); }- @media (max-width: 720px) { section.block { padding: 72px 0; } }- .block-head { margin-bottom: 60px; max-width: 800px; }- .block-eyebrow {- font-family: var(--font-mono); font-size: 11.5px;- letter-spacing: 0.2em; text-transform: uppercase;- color: var(--text-3); margin: 0 0 16px;- }- .block-eyebrow .num { color: var(--text); margin-right: 12px; }- .block-h {- font-family: var(--font-display);- font-size: clamp(34px, 4vw, 58px);- line-height: 1.0; letter-spacing: -0.035em;- font-weight: 600; margin: 0 0 20px;- }- .block-h em { font-style: normal; color: var(--text-3); font-weight: 500; }- .block-lede {- font-size: 17px; color: var(--text-2);- max-width: 600px; line-height: 1.55; margin: 0;- }-- /* ── EMBED SHOWCASE ──────────────────────────────────────── */- .embed-grid {- display: grid; grid-template-columns: 1fr 1fr; gap: 1px;- background: var(--hairline); border: 1px solid var(--hairline);- border-radius: 14px; overflow: hidden;- }- @media (max-width: 980px) { .embed-grid { grid-template-columns: 1fr; } }- .pane { background: var(--surface-0); min-height: 420px; display: flex; flex-direction: column; }- .pane-head {- display: flex; align-items: center; justify-content: space-between;- padding: 14px 18px; border-bottom: 1px solid var(--hairline);- font-family: var(--font-mono); font-size: 12px; color: var(--text-3);- }- .pane-head .tabs { display: flex; gap: 4px; }- .pane-head .tab {- padding: 5px 11px; border-radius: 5px;- font-family: var(--font-mono); font-size: 11.5px;- color: var(--text-3); background: transparent; border: 0; cursor: pointer;- }- .pane-head .tab.active { background: var(--surface-2); color: var(--text); }- .code-pane pre {- margin: 0; padding: 28px;- font-family: var(--font-mono); font-size: 13px; line-height: 1.75;- color: var(--text); overflow-x: auto; flex: 1; background: var(--surface-0);- }- .code-pane pre .tag { color: #d3d3d3; }- .code-pane pre .attr { color: #989898; }- .code-pane pre .str { color: #f6f6f6; }- .code-pane pre .com { color: var(--text-4); }- .code-pane .pane-foot { padding: 14px 18px; border-top: 1px solid var(--hairline); }- .copy-btn {- background: transparent; color: var(--text);- border: 1px solid var(--hairline-strong); cursor: pointer;- padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 500;- }- .copy-btn:hover { border-color: var(--text); }- .copy-btn.copied { background: var(--text); color: var(--bg); border-color: var(--text); }- .render-pane { position: relative; padding: 0; }- .render-pane agent-3d, .render-pane .live-agent-slot {- position: absolute; inset: 49px 0 0; display: block;- width: 100%; height: calc(100% - 49px);- }-- /* ── THREE DOORS ─────────────────────────────────────────── */-- .doors {- display: grid; grid-template-columns: repeat(3, 1fr);- gap: 1px; background: var(--hairline);- border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;- }- @media (max-width: 980px) { .doors { grid-template-columns: 1fr; } }- .door {- background: var(--surface-0); padding: 44px 36px 38px;- display: flex; flex-direction: column; transition: background 0.15s;- }- .door:hover { background: var(--surface-1); }- .door-num {- font-family: var(--font-mono); font-size: 11.5px;- letter-spacing: 0.18em; color: var(--text-3); margin-bottom: 28px;- display: flex; justify-content: space-between; align-items: baseline;- }- .door-num .lbl { color: var(--text-3); }- .door h3 {- font-family: var(--font-display); font-size: 26px; line-height: 1.1;- letter-spacing: -0.025em; font-weight: 600; margin: 0 0 14px;- }- .door p { color: var(--text-2); margin: 0 0 28px; font-size: 15px; line-height: 1.55; flex: 1; }- .door .door-cta {- font-size: 14px; font-weight: 500; color: var(--text);- display: inline-flex; align-items: center; gap: 8px;- }- .door .door-cta::after { content: "→"; transition: transform 0.18s; }- .door:hover .door-cta::after { transform: translateX(4px); }- .door-screenshot {- margin: 0 0 24px; border-radius: 8px; overflow: hidden;- border: 1px solid var(--hairline-strong);- aspect-ratio: 16/9; background: var(--surface-2);- }- .door-screenshot img { width: 100%; height: 100%; object-fit: cover; display: block; }-- /* ── START PATH (lite entry: three steps under the hero) ─── */- .start-path { border-top: 1px solid var(--hairline); padding: 44px 0 48px; }- .start-path-head {- display: flex; align-items: baseline; justify-content: space-between;- gap: 16px; flex-wrap: wrap; margin-bottom: 20px;- }- .start-path-eyebrow {- font-family: var(--font-mono); font-size: 11.5px;- letter-spacing: 0.2em; text-transform: uppercase;- color: var(--text-3); margin: 0;- }- .start-path-note { font-size: 13px; color: var(--text-3); margin: 0; }- .start-path-note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }- .start-path-note a:hover, .start-path-note a:focus-visible { color: var(--text); }- .start-steps {- display: grid; grid-template-columns: repeat(3, 1fr);- gap: 1px; background: var(--hairline);- border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;- }- @media (max-width: 980px) { .start-steps { grid-template-columns: 1fr; } }- .start-step {- background: var(--surface-0); padding: 24px 26px 22px;- display: flex; flex-direction: column; gap: 9px;- transition: background 0.15s;- }- .start-step:hover { background: var(--surface-1); }- .start-step:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; background: var(--surface-1); }- .start-step-num {- font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em;- color: var(--text-3); display: flex; justify-content: space-between; align-items: baseline;- }- .start-step-num .time { letter-spacing: 0.06em; text-transform: none; }- .start-step h3 {- font-family: var(--font-display); font-size: 21px; font-weight: 600;- letter-spacing: -0.02em; line-height: 1.15; margin: 0;- display: flex; align-items: center; gap: 10px;- }- .start-step h3 .arrow { color: var(--text-3); transition: transform 0.18s, color 0.18s; }- .start-step:hover h3 .arrow { transform: translateX(4px); color: var(--text); }- .start-step p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }-- /* ── ADVANCED TIER (progressive disclosure) ────────────────- html.home-lite is applied pre-paint from localStorage; the gate- section (#advanced-gate) toggles it and persists the choice. */- html.home-lite [data-tier="advanced"] { display: none; }- .adv-gate { border-top: 1px solid var(--hairline); padding: 64px 0; }- .adv-gate-card {- border: 1px solid var(--hairline-strong); border-radius: 14px;- background: var(--surface-0); padding: 36px 38px;- display: flex; flex-wrap: wrap; align-items: center;- justify-content: space-between; gap: 28px;- transition: padding 0.2s;- }- @media (max-width: 720px) { .adv-gate-card { padding: 26px 24px; } }- .adv-gate-text { max-width: 680px; }- .adv-gate-eyebrow {- font-family: var(--font-mono); font-size: 11.5px;- letter-spacing: 0.2em; text-transform: uppercase;- color: var(--text-3); margin: 0 0 12px;- }- .adv-gate-h {- font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px);- line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 12px;- }- .adv-gate-h em { font-style: normal; color: var(--text-3); font-weight: 500; }- .adv-gate-desc { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); max-width: 560px; }- .adv-gate-topics { display: flex; flex-wrap: wrap; gap: 8px; }- .adv-topic {- font-family: var(--font-mono); font-size: 12px; color: var(--text-2);- padding: 6px 12px; border: 1px solid var(--hairline-strong); border-radius: 999px;- background: transparent; transition: color 0.15s, border-color 0.15s, background 0.15s;- }- .adv-topic:hover, .adv-topic:focus-visible { color: var(--text); border-color: var(--text); background: var(--surface-1); }- .adv-toggle {- flex-shrink: 0; cursor: pointer;- background: var(--text); color: var(--bg); border: 1px solid var(--text);- padding: 13px 22px; border-radius: 9px; font-size: 14px; font-weight: 600;- display: inline-flex; align-items: center; gap: 10px;- transition: opacity 0.15s, transform 0.15s;- }- .adv-toggle:hover { opacity: 0.88; }- .adv-toggle:active { transform: translateY(1px); }- .adv-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }- .adv-toggle .adv-toggle-hide { display: none; }- /* Expanded state: the gate compacts into a slim divider with a collapse control. */- html:not(.home-lite) .adv-gate { padding: 36px 0; }- html:not(.home-lite) .adv-gate-card { padding: 20px 24px; }- html:not(.home-lite) .adv-gate-h,- html:not(.home-lite) .adv-gate-desc,- html:not(.home-lite) .adv-gate-topics { display: none; }- html:not(.home-lite) .adv-gate-eyebrow { margin: 0; }- html:not(.home-lite) .adv-toggle {- background: transparent; color: var(--text); border-color: var(--hairline-strong);- font-weight: 500; padding: 9px 16px; font-size: 13px;- }- html:not(.home-lite) .adv-toggle:hover { border-color: var(--text); opacity: 1; }- html:not(.home-lite) .adv-toggle .adv-toggle-show { display: none; }- html:not(.home-lite) .adv-toggle .adv-toggle-hide { display: inline; }-- /* ── BENTO GRID ──────────────────────────────────────────── */- .bento {- display: grid;- grid-template-columns: repeat(3, 1fr);- grid-template-rows: auto;- gap: 1px; background: var(--hairline);- border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;- }- @media (max-width: 1080px) { .bento { grid-template-columns: repeat(2, 1fr); } }- @media (max-width: 680px) { .bento { grid-template-columns: 1fr; } }- .bento-card {- background: var(--surface-0);- padding: 36px 32px 32px;- display: flex; flex-direction: column; gap: 12px;- transition: background 0.15s;- position: relative; overflow: hidden;- }- .bento-card:hover { background: var(--surface-1); }- .bento-card.span2 { grid-column: span 2; }- @media (max-width: 1080px) { .bento-card.span2 { grid-column: span 1; } }- .bento-icon {- font-size: 22px; line-height: 1; margin-bottom: 4px;- display: flex; align-items: center; gap: 10px;- }- .bento-icon .dot {- width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;- }- .bento-title {- font-family: var(--font-display); font-size: 20px;- font-weight: 600; letter-spacing: -0.02em; margin: 0;- }- .bento-desc {- font-size: 14.5px; color: var(--text-2);- line-height: 1.55; margin: 0; flex: 1;- }- .bento-tag {- display: inline-flex; align-items: center;- font-family: var(--font-mono); font-size: 10.5px;- letter-spacing: 0.15em; text-transform: uppercase;- color: var(--text-3); border: 1px solid var(--hairline-strong);- padding: 4px 9px; border-radius: 99px;- margin-top: 4px; width: fit-content;- }- .bento-screenshot {- border-radius: 7px; overflow: hidden;- border: 1px solid var(--hairline-strong);- margin-top: 8px; background: var(--surface-2);- }- .bento-screenshot img { width: 100%; display: block; }- .bento-pills {- display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;- }- .bento-pill {- font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.1em; text-transform: uppercase;- color: var(--text-3); border: 1px solid var(--hairline-strong);- padding: 3px 8px; border-radius: 4px;- }- .bento-code {- font-family: var(--font-mono); font-size: 12.5px;- background: var(--surface-2); border: 1px solid var(--hairline-strong);- border-radius: 7px; padding: 14px 16px; color: var(--text-2);- line-height: 1.7; margin-top: 8px; overflow-x: auto;- }- .bento-code .kw { color: var(--text-3); }- .bento-code .val { color: var(--text); }- .bento-code .str { color: #c8c8c8; }-- /* ── FEATURE SPLIT SECTIONS ──────────────────────────────── */- .feat-split {- display: grid; grid-template-columns: 1fr 1fr;- gap: 80px; align-items: center;- }- @media (max-width: 980px) { .feat-split { grid-template-columns: 1fr; gap: 48px; } }- .feat-split.rev { direction: rtl; }- .feat-split.rev > * { direction: ltr; }- @media (max-width: 980px) { .feat-split.rev { direction: ltr; } }- .feat-text { display: flex; flex-direction: column; gap: 20px; }- .feat-eyebrow {- font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3);- }- .feat-h {- font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 44px);- line-height: 1.05; letter-spacing: -0.03em;- font-weight: 600; margin: 0; color: var(--text);- }- .feat-h em { font-style: normal; color: var(--text-3); font-weight: 500; }- .feat-body { font-size: 16px; color: var(--text-2); line-height: 1.6; margin: 0; }- .feat-list {- list-style: none; padding: 0; margin: 0;- display: flex; flex-direction: column; gap: 10px;- }- .feat-list li {- display: flex; align-items: flex-start; gap: 12px;- font-size: 14.5px; color: var(--text-2); line-height: 1.5;- }- .feat-list li::before {- content: ""; width: 5px; height: 5px; border-radius: 50%;- background: var(--text-3); flex-shrink: 0; margin-top: 7px;- }- .feat-list li strong { color: var(--text); font-weight: 550; }- .feat-visual {- border: 1px solid var(--hairline-strong);- border-radius: 14px; overflow: hidden;- background: var(--surface-0);- position: relative;- }- .feat-visual img { width: 100%; display: block; }- .feat-visual-inner {- padding: 28px; display: flex; flex-direction: column; gap: 16px;- }- .feat-visual-label {- font-family: var(--font-mono); font-size: 10.5px;- letter-spacing: 0.18em; text-transform: uppercase;- color: var(--text-3); padding: 14px 18px;- border-bottom: 1px solid var(--hairline);- }-- /* Walk embed preview */- .walk-preview-wrap {- display: flex; flex-direction: column; gap: 0;- }- .walk-preview-canvas-area {- position: relative; aspect-ratio: 16 / 9;- background: #0f0f0f; overflow: hidden; cursor: grab;- }- .walk-preview-canvas-area:active { cursor: grabbing; }- .walk-preview-canvas {- display: block; width: 100%; height: 100%;- }- .walk-preview-loading {- position: absolute; inset: 0; display: flex;- flex-direction: column; align-items: center;- justify-content: center; gap: 12px;- background: #0f0f0f; z-index: 4;- font-family: var(--font-mono); font-size: 11px;- color: var(--text-3); letter-spacing: 0.1em;- transition: opacity 0.5s ease;- }- .walk-preview-loading.is-done { opacity: 0; pointer-events: none; }- .walk-preview-retry {- margin-top: 4px; padding: 7px 16px;- font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;- text-transform: uppercase; color: var(--text-1);- background: transparent; border: 1px solid var(--hairline-strong);- border-radius: 6px; cursor: pointer;- transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;- }- .walk-preview-retry:hover { border-color: var(--text-2); background: rgba(255,255,255,0.04); }- .walk-preview-retry:active { transform: translateY(1px); }- .walk-preview-retry:focus-visible { outline: 2px solid var(--text-2); outline-offset: 2px; }- .walk-preview-spinner {- width: 24px; height: 24px; border: 2px solid var(--hairline-strong);- border-top-color: var(--text-2); border-radius: 50%;- animation: walk-spin 0.8s linear infinite;- }- @keyframes walk-spin { to { transform: rotate(360deg); } }- .walk-preview-hint {- position: absolute; bottom: 10px; left: 50%;- transform: translateX(-50%); display: flex; gap: 14px;- font-family: var(--font-mono); font-size: 9.5px;- color: var(--text-2); letter-spacing: 0.06em;- opacity: 0.85; pointer-events: none; z-index: 3;- white-space: nowrap;- }- .walk-preview-hint kbd {- display: inline-block; padding: 1px 4px;- border: 1px solid var(--hairline-strong);- border-radius: 3px; font-family: var(--font-mono);- font-size: 9px; color: var(--text-3);- background: var(--surface-2); margin: 0 1px;- }- .walk-preview-joystick {- position: absolute; bottom: 14px; right: 14px;- width: 90px; height: 90px; z-index: 5;- }- @media (min-width: 768px) {- .walk-preview-joystick { display: none; }- }- @media (max-width: 767px) {- .walk-preview-hint { display: none; }- .walk-preview-joystick { display: block; }- }-- /* Buy/sell semantic colors — the one place on the page we go full color.- Everything else is monochrome; trading flow earns real green/red. */- :root { --buy: #2ecc71; --sell: #ff5c5c; }-- /* Pump.fun earn rows */- .earn-rows { display: flex; flex-direction: column; gap: 1px; }- .earn-row {- background: var(--surface-1); padding: 14px 18px;- display: flex; justify-content: space-between; align-items: center;- border-bottom: 1px solid var(--hairline);- animation: earn-row-in 0.32s cubic-bezier(.22,.68,0,.98);- }- @keyframes earn-row-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }- .earn-row:last-child { border-bottom: none; }- .earn-row-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }- .earn-row-name { font-size: 14px; font-weight: 500; color: var(--text); }- .earn-row-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }- .earn-row-amount { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--green); display: flex; align-items: baseline; gap: 7px; }- .earn-row-amount.buy { color: var(--buy); }- .earn-row-amount.sell { color: var(--sell); }- .hlt-usd { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--text-3); }- .hlt-side { font-weight: 700; }- .hlt-side.buy { color: var(--buy); }- .hlt-side.sell { color: var(--sell); }- .hlt-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--buy); box-shadow: 0 0 6px var(--buy); margin-right: 7px; vertical-align: middle; animation: hlt-pulse 1.4s ease-in-out infinite; }- @keyframes hlt-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }- .hlt-idle .earn-row-name { color: var(--text-3); font-weight: 500; }- .hlt-skel { pointer-events: none; }- .hlt-skel-bar { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2, #1a1a1a) 25%, rgba(255,255,255,0.06) 50%, var(--surface-2, #1a1a1a) 75%); background-size: 200% 100%; animation: hlt-shimmer 1.3s linear infinite; }- @keyframes hlt-shimmer { to { background-position: -200% 0; } }-- /* Token card */- .token-card {- background: var(--surface-1); border: 1px solid var(--hairline-strong);- border-radius: 10px; padding: 18px; display: flex; gap: 14px; align-items: center;- }- .token-avatar {- width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; overflow: hidden;- background: linear-gradient(135deg, #2b2b2b 0%, #161616 100%);- display: flex; align-items: center; justify-content: center;- font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fff;- }- .token-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }- .token-info { flex: 1; min-width: 0; }- .token-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }- .token-ticker { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }- .token-price { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--green); white-space: nowrap; transition: color .25s; }- .token-price.up { color: var(--buy); }- .token-price.down { color: var(--sell); }- a.token-price { text-decoration: none; }-- /* ── STEPS ───────────────────────────────────────────────── */- .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 64px; }- @media (max-width: 980px) { .steps { grid-template-columns: 1fr; gap: 48px; } }- .step { border-top: 1px solid var(--hairline-strong); padding-top: 28px; }- .step-num { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em; color: var(--text-3); margin-bottom: 22px; }- .step-title { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 12px; }- .step-body { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0; }-- /* ── SHOWCASE 3D ─────────────────────────────────────────── */- .showcase-3d { perspective: 1200px; perspective-origin: 50% 40%; }- .showcase-3d-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }- @media (max-width: 1080px) { .showcase-3d-grid { grid-template-columns: repeat(2, 1fr); } }- @media (max-width: 560px) { .showcase-3d-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; } }- .showcase-agent-card {- position: relative; aspect-ratio: 3 / 4; border-radius: 16px;- overflow: hidden; background: var(--surface-0); border: 1px solid var(--hairline);- transform-style: preserve-3d;- transform: rotateX(0) rotateY(0) translateZ(0);- transition: transform 0.45s cubic-bezier(.22,.68,0,.98), box-shadow 0.4s, border-color 0.3s;- cursor: pointer; text-decoration: none; display: block;- }- .showcase-agent-card:hover {- transform: translateZ(24px) scale(1.03);- border-color: rgba(255,255,255,0.12);- box-shadow: 0 20px 60px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);- }- .showcase-agent-card agent-3d {- position: absolute; inset: 0; width: 100%; height: 100%;- display: block; opacity: 0; transition: opacity 0.6s ease;- }- .showcase-agent-card agent-3d.loaded { opacity: 1; }- .showcase-card-grad { position: absolute; inset: 0; z-index: 0; opacity: 0.5; transition: opacity 0.4s; }- .showcase-agent-card:hover .showcase-card-grad { opacity: 0.7; }- .showcase-card-floor {- position: absolute; bottom: 0; left: 0; right: 0; height: 50%;- background: linear-gradient(180deg, transparent 0%, rgba(5,5,5,0.95) 100%);- z-index: 1; pointer-events: none;- }- .showcase-card-meta {- position: absolute; bottom: 0; left: 0; right: 0;- padding: 18px 16px; z-index: 3; color: var(--text);- }- .showcase-card-name {- font-family: var(--font-display); font-size: 15px; font-weight: 600;- letter-spacing: -0.015em; margin: 0 0 3px;- white-space: nowrap; overflow: hidden; text-overflow: ellipsis;- }- .showcase-card-sub {- font-family: var(--font-mono); font-size: 10px; color: var(--text-3);- letter-spacing: 0.08em; text-transform: uppercase;- }- .showcase-card-tag {- position: absolute; top: 12px; left: 12px; z-index: 4;- font-family: var(--font-mono); font-size: 9.5px;- letter-spacing: 0.18em; text-transform: uppercase; color: var(--text);- padding: 3px 8px; background: rgba(5,5,5,0.55);- border: 1px solid var(--hairline-strong); border-radius: 99px; backdrop-filter: blur(6px);- }- .showcase-card-anim-tag {- position: absolute; top: 12px; right: 12px; z-index: 4;- font-family: var(--font-mono); font-size: 9px;- letter-spacing: 0.08em; color: rgba(255,255,255,0.35); text-transform: lowercase;- }- .showcase-card-skel {- position: absolute; inset: 0;- display: flex; align-items: center; justify-content: center; z-index: 0;- }- .showcase-card-skel-ring {- width: 32px; height: 32px;- border: 2px solid rgba(255,255,255,0.08); border-top-color: rgba(255,255,255,0.25);- border-radius: 50%; animation: showcase-spin 0.9s linear infinite;- }- @keyframes showcase-spin { to { transform: rotate(360deg); } }- .showcase-cta-card {- position: relative; aspect-ratio: 3 / 4; border-radius: 16px;- overflow: hidden; border: 1px solid var(--hairline);- display: flex; flex-direction: column; align-items: center; justify-content: center;- text-align: center; text-decoration: none; background: var(--surface-0);- transition: transform 0.35s cubic-bezier(.22,.68,0,.98), border-color 0.3s, background 0.3s;- cursor: pointer; gap: 10px; padding: 24px;- }- .showcase-cta-card:hover {- transform: translateZ(12px) scale(1.02);- border-color: rgba(255,255,255,0.15); background: var(--surface-1);- }- .showcase-cta-icon { font-size: 28px; opacity: 0.4; transition: opacity 0.3s; }- .showcase-cta-card:hover .showcase-cta-icon { opacity: 0.7; }- .showcase-cta-label {- font-family: var(--font-display); font-size: 15px; font-weight: 600;- color: var(--text); letter-spacing: -0.01em;- }- .showcase-cta-sub {- font-family: var(--font-mono); font-size: 10px; color: var(--text-3);- letter-spacing: 0.06em; text-transform: uppercase;- }-- /* ── DEVELOPER SECTION / API PLAYGROUND ──────────────────── */- .dev-grid {- display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1px;- background: var(--hairline); border: 1px solid var(--hairline);- border-radius: 14px; overflow: hidden;- }- @media (max-width: 980px) { .dev-grid { grid-template-columns: 1fr; } }- .dev-pane { background: var(--surface-0); padding: 0; }- .dev-pane-head {- padding: 14px 20px; border-bottom: 1px solid var(--hairline);- font-family: var(--font-mono); font-size: 11.5px;- letter-spacing: 0.12em; color: var(--text-3);- display: flex; justify-content: space-between; align-items: center;- }- .dev-tabs {- display: flex; gap: 0; border-bottom: 1px solid var(--hairline);- }- .dev-tab {- padding: 10px 18px; font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);- cursor: pointer; border-bottom: 2px solid transparent;- transition: color 0.15s, border-color 0.15s; user-select: none;- background: none; border-top: none; border-left: none; border-right: none;- }- .dev-tab:hover { color: var(--text-2); }- .dev-tab:focus-visible { outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent)); outline-offset: -2px; }- .dev-tab.active { color: var(--text); border-bottom-color: var(--text); }- .dev-tab-content { display: none; }- .dev-tab-content.active { display: block; }- .dev-code {- font-family: var(--font-mono); font-size: 12.5px;- line-height: 1.8; padding: 24px 24px; color: var(--text-2);- overflow-x: auto;- }- .dev-code .kw { color: var(--text-3); }- .dev-code .fn { color: var(--text); font-weight: 500; }- .dev-code .str { color: #c5c5c5; }- .dev-code .cmt { color: var(--text-4); }- .dev-code .num { color: #b0b0b0; }- .dev-links { padding: 16px 24px; border-top: 1px solid var(--hairline); }- .dev-links-row { display: flex; gap: 10px; flex-wrap: wrap; }- .dev-link {- display: inline-flex; align-items: center; gap: 7px;- padding: 7px 13px; border-radius: 6px;- border: 1px solid var(--hairline-strong);- font-size: 13px; font-weight: 500; color: var(--text-2);- transition: border-color 0.15s, color 0.15s;- }- .dev-link:hover { border-color: var(--text); color: var(--text); }- .dev-right { display: flex; flex-direction: column; }- .dev-api-row {- width: 100%; text-align: left; font: inherit; color: inherit;- background: transparent; border: none;- padding: 14px 20px; border-bottom: 1px solid var(--hairline);- display: flex; flex-direction: column; gap: 4px;- cursor: pointer; transition: background 0.15s;- }- .dev-api-row:hover { background: var(--surface-1); }- .dev-api-row:focus-visible {- outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));- outline-offset: -2px;- }- .dev-api-row.active {- background: var(--surface-2);- box-shadow: inset 3px 0 0 var(--text-3);- }- .dev-api-method {- font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);- }- .dev-api-path {- font-family: var(--font-mono); font-size: 13px; color: var(--text);- }- .dev-api-desc { font-size: 12px; color: var(--text-3); }- .dev-badge {- display: inline-block; font-family: var(--font-mono); font-size: 10px;- letter-spacing: 0.1em; text-transform: uppercase;- padding: 2px 7px; border-radius: 4px; font-weight: 700;- min-width: 36px; text-align: center;- }- .dev-badge.get { background: rgba(74,222,128,0.12); color: var(--success); }- .dev-badge.post { background: rgba(96,165,250,0.12); color: #60a5fa; }- .dev-badge.mcp { background: rgba(255,92,168,0.12); color: #ff8cc8; }-- /* ── Playground request builder ──────────────────────────── */- .pg-request { padding: 20px 24px; }- .pg-field { margin-bottom: 14px; }- .pg-field-label {- font-family: var(--font-mono); font-size: 10.5px;- letter-spacing: 0.12em; text-transform: uppercase;- color: var(--text-3); margin-bottom: 6px; display: block;- }- .pg-input {- width: 100%; background: var(--surface-2); border: 1px solid var(--hairline-strong);- border-radius: 6px; padding: 9px 12px; color: var(--text);- font-family: var(--font-mono); font-size: 12.5px; outline: none;- transition: border-color 0.15s;- }- .pg-input:focus { border-color: var(--text-3); }- .pg-input:focus-visible, .pg-url-path:focus-visible {- outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));- outline-offset: var(--focus-ring-offset,2px);- }- .pg-input::placeholder { color: var(--text-4); }- textarea.pg-input { min-height: 80px; resize: vertical; line-height: 1.6; }- .pg-url-bar {- display: flex; align-items: center; gap: 0;- background: var(--surface-2); border: 1px solid var(--hairline-strong);- border-radius: 6px; overflow: hidden; margin-bottom: 16px;- }- .pg-url-method {- padding: 9px 12px; font-family: var(--font-mono); font-size: 11px;- font-weight: 700; letter-spacing: 0.08em; color: var(--success);- border-right: 1px solid var(--hairline-strong); background: var(--surface-1);- min-width: 52px; text-align: center; user-select: none;- }- .pg-url-method.post { color: #60a5fa; }- .pg-url-path {- flex: 1; padding: 9px 12px; font-family: var(--font-mono); font-size: 12.5px;- color: var(--text-2); background: transparent; border: none; outline: none;- }- .pg-url-path::placeholder { color: var(--text-4); }- .pg-send {- padding: 9px 20px; background: var(--text); color: var(--bg);- font-family: var(--font-mono); font-size: 11px; font-weight: 700;- letter-spacing: 0.1em; text-transform: uppercase; border: none;- border-radius: 6px; cursor: pointer; transition: opacity 0.15s;- }- .pg-send:hover { opacity: 0.85; }- .pg-send:active { opacity: 0.7; }- .pg-send:disabled { opacity: 0.4; cursor: not-allowed; }- .pg-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }- .pg-status {- font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.05em; color: var(--text-3);- }- .pg-status.ok { color: var(--success); }- .pg-status.err { color: var(--danger); }- .pg-status.warn { color: var(--warn); }- .pg-status.err::before { background: var(--danger); box-shadow: 0 0 5px var(--danger); }- .pg-status.warn::before { background: var(--warn); box-shadow: 0 0 5px var(--warn); }- .pg-key-field { margin-bottom: 16px; }- .pg-key-hint {- float: right; text-transform: none; letter-spacing: 0;- color: var(--text-3); text-decoration: none; font-size: 10.5px;- transition: color 0.15s;- }- .pg-key-hint:hover { color: var(--text); }- .pg-response {- background: var(--surface-1); border: 1px solid var(--hairline);- border-radius: 8px; overflow: hidden;- }- .pg-response-head {- padding: 10px 16px; border-bottom: 1px solid var(--hairline);- font-family: var(--font-mono); font-size: 10.5px;- letter-spacing: 0.1em; text-transform: uppercase;- color: var(--text-3); display: flex; justify-content: space-between;- }- .pg-response-body {- padding: 16px; font-family: var(--font-mono); font-size: 12px;- line-height: 1.7; color: var(--text-2); max-height: 260px;- overflow-y: auto; white-space: pre-wrap; word-break: break-all;- }- .pg-response-body::-webkit-scrollbar { width: 5px; }- .pg-response-body::-webkit-scrollbar-track { background: transparent; }- .pg-response-body::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 3px; }- .pg-empty {- padding: 40px 24px; text-align: center; color: var(--text-3);- font-size: 13px; line-height: 1.6;- }- .pg-empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.3; }- .pg-response-body .json-key { color: #60a5fa; }- .pg-response-body .json-str { color: var(--success); }- .pg-response-body .json-num { color: var(--warn); }- .pg-response-body .json-bool { color: var(--accent); }- .pg-response-body .json-null { color: var(--text-4); }- .pg-curl-code {- font-family: var(--font-mono); font-size: 12px;- line-height: 1.8; padding: 24px; color: var(--text-2);- white-space: pre-wrap; word-break: break-all;- }- .pg-copy {- padding: 4px 10px; background: var(--surface-2); border: 1px solid var(--hairline-strong);- border-radius: 4px; color: var(--text-3); font-family: var(--font-mono);- font-size: 10px; letter-spacing: 0.1em; cursor: pointer;- transition: color 0.15s, border-color 0.15s;- }- .pg-copy:hover { color: var(--text); border-color: var(--text-3); }-- /* ── BOTTOM CTA ──────────────────────────────────────────── */- .cta-card {- padding: 80px 64px; border: 1px solid var(--hairline-strong);- border-radius: 16px; text-align: center; background: var(--surface-0);- }- .cta-card h2 {- font-family: var(--font-display); font-size: clamp(30px, 4vw, 50px);- line-height: 1.0; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 18px;- }- .cta-card p { color: var(--text-2); font-size: 17px; margin: 0 0 36px; }- .cta-card .cta-row { justify-content: center; }- @media (max-width: 720px) { .cta-card { padding: 48px 24px; } }-- /* ── FOOTER ──────────────────────────────────────────────── */- footer { border-top: 1px solid var(--hairline); padding: 60px 0 52px; }- .foot-cols {- display: grid;- grid-template-columns: repeat(6, 1fr);- gap: 32px; margin-bottom: 44px;- padding-bottom: 40px; border-bottom: 1px solid var(--hairline);- }- .foot-col { display: flex; flex-direction: column; gap: 9px; }- .foot-col-h {- font-family: var(--font-mono); font-size: 10px; font-weight: 400;- text-transform: uppercase; letter-spacing: 0.18em;- color: var(--text-3); margin: 0 0 6px;- }- .foot-col a {- color: var(--text-3); font-size: 13px;- transition: color 0.14s;- }- .foot-col a:hover, .foot-col a:focus-visible { color: var(--text); }- @media (max-width: 880px) {- .foot-cols { grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }- }- @media (max-width: 460px) {- .foot-cols { grid-template-columns: 1fr 1fr; }- }- .foot-inner {- display: flex; justify-content: space-between; align-items: center;- gap: 20px; flex-wrap: wrap;- color: var(--text-3); font-size: 12px; font-family: var(--font-mono);- letter-spacing: 0.04em;- }- .foot-ca {- display: flex; align-items: center; gap: 8px;- background: var(--surface-1); border: 1px solid var(--stroke);- border-radius: 999px; padding: 5px 11px 5px 10px; cursor: pointer;- font-family: var(--font-mono); font-size: 11px; color: var(--text-3);- transition: background .15s, border-color .15s, color .15s;- }- .foot-ca:hover, .foot-ca:focus-visible {- background: var(--surface-2); border-color: var(--stroke-strong);- color: var(--text);- }- .foot-ca-label {- color: #7ec8f8; font-weight: 700; font-size: 10.5px;- text-transform: uppercase; letter-spacing: 0.10em;- }- /* No opacity dim: text-3 at .55 measured ~2.5:1 (axe AA needs 4.5:1),- and the $THREE contract address should be legible anyway. */- .foot-ca-addr { font-size: 10.5px; }- .foot-ca { min-width: 0; max-width: 100%; }- .foot-ca-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }- @media (max-width: 480px) { .foot-inner { flex-direction: column; align-items: flex-start; } .foot-ca { width: 100%; justify-content: flex-start; } }-- /* ── HERO LOADING ───────────────────────────────────────── */- /* Suppress the in-element skeleton silhouette on the hero — it lives in- the component's shadow DOM, so a light-DOM `.skeleton` selector can't- reach it; `::part(loading)` pierces the boundary. The hero fades the- whole agent-3d in on `agent:ready`, so the model never appears under a- stale skeleton. */- .hero-stage agent-3d::part(loading) { display: none !important; }- .hero-stage agent-3d {- position: absolute; inset: 0; display: block; width: 100%; height: 100%;- opacity: 0; transition: opacity 0.8s cubic-bezier(.2,.7,.3,1);- }- .hero-stage agent-3d.loaded { opacity: 1; }-- /* ── REVEAL ANIMATIONS ──────────────────────────────────── */- .reveal {- opacity: 0; transform: translateY(32px);- transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);- }- .reveal.vis { opacity: 1; transform: translateY(0); }- .reveal-d1 { transition-delay: 0.08s; }- .reveal-d2 { transition-delay: 0.16s; }-- /* ── HERO TEXT ENTRANCE ──────────────────────────────────── */- .hero-text > * {- opacity: 0; transform: translateY(24px);- transition: opacity 0.6s cubic-bezier(.2,.7,.3,1), transform 0.6s cubic-bezier(.2,.7,.3,1);- }- .hero-text.entered > * { opacity: 1; transform: translateY(0); }- .hero-text > *:nth-child(1) { transition-delay: 0.05s; }- .hero-text > *:nth-child(2) { transition-delay: 0.12s; }- .hero-text > *:nth-child(3) { transition-delay: 0.22s; }- .hero-text > *:nth-child(4) { transition-delay: 0.32s; }- .hero-text > *:nth-child(5) { transition-delay: 0.42s; }-- /* ── BENTO GLOW ─────────────────────────────────────────── */- .bento-card { --bx: 50%; --by: 50%; }- .bento-card::before {- content: ""; position: absolute; inset: 0; pointer-events: none;- background: radial-gradient(600px circle at var(--bx) var(--by), rgba(255,255,255,0.04), transparent 40%);- opacity: 0; transition: opacity 0.3s;- }- .bento-card:hover::before { opacity: 1; }-- /* ── ENHANCED INTERACTIVE STATES ─────────────────────────── */- .copy-btn:focus-visible {- outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px;- }- .door-screenshot img[src] { transition: transform 0.4s cubic-bezier(.2,.7,.3,1); }- .door:hover .door-screenshot img { transform: scale(1.03); }-- @keyframes stat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }- .stat-animated { animation: stat-in 0.5s cubic-bezier(.2,.7,.3,1) both; }-- /* ── ACCESSIBILITY ──────────────────────────────────────── */- @media (prefers-reduced-motion: reduce) {- .reveal, .hero-text > * { opacity: 1 !important; transform: none !important; transition: none !important; }- .hero-stage agent-3d { opacity: 1 !important; transition: none !important; }- }-- /* ── HERO ANIMATION CHIPS ────────────────────────────────── */- .hero-chips-wrap {- position: absolute;- bottom: 0; left: 0; right: 0;- z-index: 10;- display: flex;- flex-direction: column;- align-items: center;- gap: 8px;- padding: 32px 20px 20px;- background: linear-gradient(0deg, rgba(5,5,5,0.75) 0%, transparent 100%);- pointer-events: none;- }- .hero-chips-wrap > * { pointer-events: auto; }- .hero-chips-label {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 0.22em;- text-transform: uppercase;- color: var(--text-3);- display: flex;- align-items: center;- gap: 8px;- }- .hero-chips-label::before {- content: "";- display: inline-block;- width: 5px; height: 5px;- border-radius: 50%;- background: var(--text-3);- box-shadow: 0 0 5px var(--text-3);- animation: pulse-green 2.4s ease-in-out infinite;- }- .hero-chips {- display: flex;- flex-wrap: wrap;- justify-content: center;- gap: 6px;- }- .hero-chip {- display: inline-flex;- align-items: center;- gap: 6px;- padding: 7px 13px;- border-radius: 999px;- background: rgba(5,5,5,0.6);- backdrop-filter: blur(12px);- -webkit-backdrop-filter: blur(12px);- border: 1px solid var(--hairline-strong);- color: var(--text-3);- font: 500 12.5px/1 var(--font-body);- cursor: pointer;- transition: border-color 0.15s, color 0.15s, background 0.15s;- user-select: none;- }- .hero-chip:hover {- border-color: rgba(255,255,255,0.4);- color: var(--text);- background: rgba(255,255,255,0.06);- }- .hero-chip[data-active="true"] {- border-color: rgba(255,255,255,0.55);- color: var(--text);- background: rgba(255,255,255,0.1);- }- .hero-chips-counter {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 0.12em;- color: var(--text-3);- }- .hero-chips-counter strong { color: var(--text-3); font-weight: 600; }- @media (max-width: 980px) {- .hero-chips-label, .hero-chips { display: none; }- .hero-chips-wrap { padding: 20px; background: linear-gradient(0deg, rgba(5,5,5,0.7) 0%, transparent 100%); }- }- @media (prefers-reduced-motion: reduce) {- .hero-chips-label::before { animation: none !important; }- }-- /* ── 3D STACK GRID ───────────────────────────────────────────── */- .stack-3d {- perspective: 1400px;- perspective-origin: 50% 40%;- }- .stack-3d-scene {- display: grid;- grid-template-columns: repeat(3, 1fr);- gap: 1px;- background: var(--hairline);- border: 1px solid var(--hairline);- border-radius: 14px;- overflow: hidden;- transform-style: preserve-3d;- transform: rotateX(0deg) rotateY(0deg);- transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);- will-change: transform;- }- .stack-card {- position: relative;- background: var(--surface-0);- padding: 40px 32px 36px;- display: flex;- flex-direction: column;- gap: 10px;- text-decoration: none;- color: var(--text);- transition:- background 0.3s ease,- opacity 0.35s ease;- cursor: pointer;- overflow: hidden;- min-height: 210px;- }- .stack-card::before {- content: '';- position: absolute;- inset: 0;- opacity: 0;- background: radial-gradient(- 600px circle at var(--mx, 50%) var(--my, 50%),- rgba(255,255,255,0.045),- transparent 40%- );- transition: opacity 0.4s ease;- pointer-events: none;- z-index: 1;- }- .stack-card:hover::before { opacity: 1; }- .stack-card::after {- content: '';- position: absolute;- inset: -1px;- border-radius: inherit;- opacity: 0;- background: radial-gradient(- 400px circle at var(--mx, 50%) var(--my, 50%),- rgba(255,255,255,0.13),- transparent 40%- );- mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);- mask-composite: exclude;- -webkit-mask-composite: xor;- padding: 1px;- transition: opacity 0.4s ease;- pointer-events: none;- z-index: 2;- }- .stack-card:hover::after { opacity: 1; }- .stack-card:hover {- background: var(--surface-1);- z-index: 3;- }- .stack-3d-scene:hover .stack-card:not(:hover) {- opacity: 0.55;- }- .stack-card-num {- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 0.18em;- color: var(--text-3);- margin-bottom: 6px;- }- .stack-card-title {- font-family: var(--font-display);- font-size: clamp(22px, 2.2vw, 30px);- font-weight: 600;- letter-spacing: -0.025em;- line-height: 1.1;- margin: 0;- }- .stack-card-desc {- color: var(--text-2);- font-size: 14px;- line-height: 1.55;- margin: 0;- flex: 1;- }- .stack-card-arrow {- font-family: var(--font-mono);- font-size: 16px;- color: var(--text-4);- align-self: flex-end;- transition: color 0.25s, transform 0.25s;- }- .stack-card:hover .stack-card-arrow {- color: var(--text);- transform: translate(4px, -4px);- }- /* staggered entrance */- .stack-3d .stack-card {- opacity: 0;- transform: translateY(30px);- transition:- background 0.3s ease,- opacity 0.55s cubic-bezier(0.23, 1, 0.32, 1),- transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);- }- .stack-3d.vis .stack-card {- opacity: 1;- transform: translateY(0);- }- .stack-3d.vis .stack-card:nth-child(1) { transition-delay: 0.04s; }- .stack-3d.vis .stack-card:nth-child(2) { transition-delay: 0.09s; }- .stack-3d.vis .stack-card:nth-child(3) { transition-delay: 0.14s; }- .stack-3d.vis .stack-card:nth-child(4) { transition-delay: 0.19s; }- .stack-3d.vis .stack-card:nth-child(5) { transition-delay: 0.24s; }- .stack-3d.vis .stack-card:nth-child(6) { transition-delay: 0.29s; }- .stack-3d.vis.settled .stack-card { transition-delay: 0s; }- @media (max-width: 980px) {- .stack-3d-scene { grid-template-columns: repeat(2, 1fr); }- .stack-3d { perspective: 1000px; }- }- @media (max-width: 600px) {- .stack-3d-scene { grid-template-columns: 1fr; }- .stack-3d { perspective: none; }- .stack-card { min-height: auto; padding: 28px 24px 24px; }- .stack-3d .stack-card,- .stack-3d .stack-card:hover,- .stack-3d-scene:hover .stack-card:not(:hover) {- transform: none !important; opacity: 1 !important;- }- }- @media (prefers-reduced-motion: reduce) {- .stack-card, .stack-3d-scene { transition: none !important; }- .stack-3d .stack-card { opacity: 1 !important; transform: none !important; }- }-- /* ── WHAT YOU GET ────────────────────────────────────────────── */- .wyg-head {- text-align: center; margin-bottom: 64px;- }- .wyg-eyebrow {- font-family: var(--font-mono); font-size: 11.5px;- letter-spacing: 0.22em; text-transform: uppercase;- color: var(--text-3); margin: 0 0 20px;- }- .wyg-title {- font-family: var(--font-display);- font-size: clamp(36px, 4.8vw, 64px);- line-height: 1.0; letter-spacing: -0.04em;- font-weight: 600; margin: 0; color: var(--text);- }- .wyg-grid {- display: grid;- grid-template-columns: 1.15fr 0.85fr;- gap: 1px;- background: var(--hairline);- border: 1px solid var(--hairline);- border-radius: 16px;- overflow: hidden;- }- @media (max-width: 1080px) { .wyg-grid { grid-template-columns: 1fr; } }-- .wyg-viewer {- background: var(--surface-0);- position: relative;- min-height: 640px;- display: flex; flex-direction: column;- }- @media (max-width: 1080px) { .wyg-viewer { min-height: 480px; } }- @media (max-width: 600px) { .wyg-viewer { min-height: 380px; } }- .wyg-viewer agent-3d {- position: absolute; inset: 0; width: 100%; height: 100%;- display: block;- opacity: 0; transition: opacity 0.6s ease;- }- .wyg-viewer agent-3d.loaded { opacity: 1; }- .wyg-viewer-skel {- position: absolute; inset: 0;- display: flex; align-items: center; justify-content: center;- }- .wyg-viewer-skel-ring {- width: 32px; height: 32px;- border: 2px solid rgba(255,255,255,0.08);- border-top-color: rgba(255,255,255,0.25);- border-radius: 50%;- animation: showcase-spin 0.9s linear infinite;- }- .wyg-anim-bar {- position: absolute; bottom: 0; left: 0; right: 0;- z-index: 10;- display: flex; flex-direction: column; gap: 8px;- padding: 24px 20px 16px;- background: linear-gradient(0deg, rgba(5,5,5,0.85) 0%, rgba(5,5,5,0.5) 60%, transparent 100%);- }- .wyg-anim-head {- display: flex; align-items: center; justify-content: space-between;- }- .wyg-anim-label {- font-family: var(--font-mono); font-size: 10px;- letter-spacing: 0.22em; text-transform: uppercase;- color: var(--text-3);- }- .wyg-anim-stop {- width: 14px; height: 14px;- background: var(--text-3); border-radius: 2px;- border: none; cursor: pointer;- opacity: 0.5; transition: opacity 0.15s;- position: relative;- }- .wyg-anim-stop:hover { opacity: 1; }- /* Touch: extend the hit area to 44px around the 14px glyph without- altering its visual size or the header layout (WCAG 2.5.8). */- @media (hover: none) and (pointer: coarse) {- .wyg-anim-stop::after {- content: ''; position: absolute;- top: 50%; left: 50%; transform: translate(-50%, -50%);- width: 44px; height: 44px;- }- }- .wyg-anim-scroll {- display: flex; gap: 6px;- overflow-x: auto; overflow-y: hidden;- -webkit-overflow-scrolling: touch;- scrollbar-width: none;- padding-bottom: 4px;- }- .wyg-anim-scroll::-webkit-scrollbar { display: none; }- .wyg-anim-chip {- display: inline-flex; flex-direction: column;- align-items: center; gap: 4px;- padding: 8px 10px 6px;- border-radius: 10px;- background: rgba(255,255,255,0.06);- border: 1px solid var(--hairline-strong);- color: var(--text-3);- font: 500 10.5px/1 var(--font-body);- cursor: pointer; user-select: none;- transition: border-color 0.15s, color 0.15s, background 0.15s;- white-space: nowrap; flex-shrink: 0;- min-width: 64px;- }- .wyg-anim-chip:hover {- border-color: rgba(255,255,255,0.3);- color: var(--text);- background: rgba(255,255,255,0.1);- }- .wyg-anim-chip[data-active="true"] {- border-color: rgba(255,255,255,0.5);- color: var(--text);- background: rgba(255,255,255,0.12);- }- .wyg-anim-chip-icon { font-size: 18px; line-height: 1; }-- .wyg-cards {- display: flex; flex-direction: column;- background: var(--hairline); gap: 1px;- }- .wyg-card {- background: var(--surface-0);- padding: 28px 28px 24px;- display: flex; flex-direction: column; gap: 8px;- transition: background 0.15s;- }- .wyg-card:hover { background: var(--surface-1); }- .wyg-card-eyebrow {- font-family: var(--font-mono); font-size: 10.5px;- letter-spacing: 0.2em; text-transform: uppercase;- margin: 0;- }- .wyg-card-eyebrow.clr-gold { color: #c9a94e; }- .wyg-card-eyebrow.clr-teal { color: #5eadad; }- .wyg-card-eyebrow.clr-purple { color: var(--ink-dim); }- .wyg-card-eyebrow.clr-rose { color: #e879a0; }- .wyg-card-eyebrow.clr-sky { color: #7ab8e0; }- .wyg-card-eyebrow.clr-amber { color: #d4a04a; }- .wyg-card-title {- font-family: var(--font-display); font-size: 20px;- font-weight: 600; letter-spacing: -0.02em; margin: 0;- }- .wyg-card-body {- font-size: 14px; color: var(--text-2);- line-height: 1.5; margin: 0;- }- .wyg-card-code {- font-family: var(--font-mono); font-size: 12px;- background: var(--surface-2); border: 1px solid var(--hairline-strong);- border-radius: 8px; padding: 12px 14px;- color: var(--text-2); line-height: 1.6; margin-top: 4px;- }- .wyg-card-pills {- display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;- }- .wyg-card-pill {- display: inline-flex; align-items: center; gap: 6px;- font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.08em;- color: var(--text-2);- border: 1px solid var(--hairline-strong);- padding: 4px 10px; border-radius: 99px;- }- .wyg-card-pill .dot {- width: 7px; height: 7px; border-radius: 50%;- }- .wyg-card-link {- font-size: 13.5px; font-weight: 500; color: var(--text);- display: inline-flex; align-items: center; gap: 7px;- margin-top: 4px; transition: gap 0.15s;- }- .wyg-card:hover .wyg-card-link { gap: 10px; }- .wyg-card-link::after { content: "\2192"; }-- /* ── V4-STYLE IMMERSIVE CLOSE ────────────────────────────────── */- .vclose {- position: relative; min-height: 100vh;- display: flex; align-items: center; justify-content: center;- overflow: hidden; border-top: 1px solid var(--hairline);- }- .vclose-agent {- position: absolute; inset: 0; width: 100%; height: 100%;- display: block; z-index: 1;- opacity: 0; transition: opacity 0.9s cubic-bezier(.2,.7,.3,1);- }- .vclose-agent.loaded { opacity: 1; }- .vclose-grid {- position: absolute; inset: 0; z-index: 0; pointer-events: none;- background-image:- linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),- linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);- background-size: 60px 60px;- mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 100%);- }- .vclose-vignette {- position: absolute; inset: 0; z-index: 2; pointer-events: none;- background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 30%, rgba(5,5,5,0.92) 100%);- }- .vclose-overlay {- position: relative; z-index: 3;- display: flex; flex-direction: column; align-items: center;- text-align: center; gap: 24px;- padding: 80px 32px;- max-width: 720px; margin: 0 auto;- }- .vclose-eyebrow {- font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3);- display: flex; align-items: center; gap: 8px;- }- .vclose-eyebrow::before {- content: ""; width: 5px; height: 5px; border-radius: 50%;- background: var(--text-3); box-shadow: 0 0 5px var(--text-3);- animation: pulse-green 2.4s ease-in-out infinite;- }- .vclose-title {- font-family: var(--font-display);- font-size: clamp(48px, 7vw, 96px);- line-height: 0.92; letter-spacing: -0.045em;- font-weight: 600; margin: 0; color: var(--text);- }- .vclose-title em { font-style: normal; color: var(--text-3); font-weight: 500; }- .vclose-sub {- font-size: 17px; color: var(--text-2); max-width: 460px; line-height: 1.55; margin: 0;- }- .vclose-chips {- display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;- margin-top: 8px;- }- @media (prefers-reduced-motion: reduce) {- .vclose-eyebrow::before { animation: none !important; }- .vclose-agent { opacity: 1 !important; transition: none !important; }- }--- /* ── PLAYGROUND ──────────────────────────────────────────── */- .pg {- border: 1px solid var(--hairline); border-radius: 14px;- overflow: hidden; background: var(--hairline);- display: flex; flex-direction: column; gap: 1px;- }- .pg-toolbar {- display: flex; align-items: center; justify-content: space-between;- padding: 10px 16px; background: var(--surface-0);- }- .pg-tabs { display: flex; gap: 2px; }- .pg-tab {- padding: 5px 12px; border-radius: 5px;- font-family: var(--font-mono); font-size: 11.5px;- color: var(--text-3); background: transparent; border: 0;- cursor: pointer; transition: background 0.12s, color 0.12s;- }- .pg-tab:hover { color: var(--text-2); }- .pg-tab.active { background: var(--surface-2); color: var(--text); }- .pg-toolbar-end { display: flex; gap: 6px; align-items: center; }- .pg-copy {- background: transparent; color: var(--text);- border: 1px solid var(--hairline-strong);- padding: 5px 12px; border-radius: 6px;- font-family: var(--font-mono); font-size: 11.5px;- cursor: pointer; transition: border-color 0.15s, background 0.15s;- }- .pg-copy:hover { border-color: var(--text); }- .pg-copy.copied { background: var(--text); color: var(--bg); border-color: var(--text); }-- /* Controls strip */- .pg-controls {- display: flex; gap: 1px; background: var(--hairline);- }- @media (max-width: 980px) { .pg-controls { flex-wrap: wrap; } }- .pg-control-group {- background: var(--surface-0); padding: 10px 16px;- display: flex; align-items: center; gap: 10px;- }- .pg-avatars-group { flex: 1.5; min-width: 0; overflow: hidden; }- .pg-control-label {- font-family: var(--font-mono); font-size: 10px;- letter-spacing: 0.18em; text-transform: uppercase;- color: var(--text-3); flex-shrink: 0;- }- .pg-chips { display: flex; gap: 4px; flex-wrap: wrap; }- .pg-chip {- padding: 4px 10px; border-radius: 5px;- font-family: var(--font-mono); font-size: 11px;- color: var(--text-3); background: transparent;- border: 1px solid var(--hairline-strong); cursor: pointer;- transition: border-color 0.12s, color 0.12s, background 0.12s;- white-space: nowrap;- }- .pg-chip:hover { border-color: var(--text-3); color: var(--text-2); }- .pg-chip.active {- border-color: rgba(255,255,255,0.5); color: var(--text);- background: rgba(255,255,255,0.08);- }-- /* Avatar row */- .pg-avatar-row {- display: flex; gap: 6px; overflow-x: auto;- scrollbar-width: none; padding: 2px;- }- .pg-avatar-row::-webkit-scrollbar { display: none; }- .pg-avatar-item {- flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;- border: 2px solid transparent; cursor: pointer; overflow: hidden;- transition: border-color 0.15s, transform 0.15s;- background: var(--surface-2); padding: 0;- }- .pg-avatar-item:hover { border-color: var(--text-3); transform: scale(1.1); }- .pg-avatar-item.active { border-color: var(--text); }- .pg-avatar-item img {- width: 100%; height: 100%; object-fit: cover; display: block;- border-radius: 50%;- }- .pg-avatar-item .pg-avatar-initial {- width: 100%; height: 100%; display: none;- align-items: center; justify-content: center;- font-family: var(--font-mono); font-size: 11px; font-weight: 600;- color: var(--text-3); text-transform: uppercase; line-height: 1;- }-- /* Split: code + preview */- .pg-split {- display: grid; grid-template-columns: 1fr 1fr;- gap: 1px; background: var(--hairline); min-height: 480px;- }- @media (max-width: 980px) { .pg-split { grid-template-columns: 1fr; } }-- .pg-left {- background: var(--surface-0);- display: flex; flex-direction: column;- }- .pg-editor-head {- padding: 10px 16px; border-bottom: 1px solid var(--hairline);- font-family: var(--font-mono); font-size: 11px;- color: var(--text-4); letter-spacing: 0.08em;- }-- /* Editor: textarea overlay on pre for highlighting */- .pg-editor {- position: relative; flex: 1; min-height: 320px;- }- .pg-editor:focus-within {- outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));- outline-offset: -2px;- }- .pg-editor textarea,- .pg-editor pre {- font-family: var(--font-mono); font-size: 13px; line-height: 1.75;- padding: 20px 24px; margin: 0; border: 0;- position: absolute; top: 0; left: 0;- width: 100%; height: 100%;- white-space: pre; word-wrap: normal; overflow-wrap: normal;- tab-size: 2; box-sizing: border-box; overflow: auto;- }- .pg-editor textarea {- resize: none; background: transparent;- color: transparent; caret-color: var(--text);- z-index: 2; outline: none;- -webkit-text-fill-color: transparent;- }- .pg-editor pre {- pointer-events: none; z-index: 1;- color: var(--text-2); background: transparent;- }- .pg-editor pre .tag { color: #d3d3d3; }- .pg-editor pre .attr { color: #989898; }- .pg-editor pre .str { color: #f6f6f6; }- .pg-editor pre .com { color: var(--text-4); }- .pg-editor pre .kw { color: var(--text-3); }-- .pg-right {- background: var(--surface-0);- display: flex; flex-direction: column; position: relative;- }- .pg-preview-head {- padding: 10px 16px; border-bottom: 1px solid var(--hairline);- font-family: var(--font-mono); font-size: 11px;- color: var(--text-4); letter-spacing: 0.08em;- display: flex; justify-content: space-between; align-items: center;- }- .pg-status {- color: var(--text-3); display: flex; align-items: center; gap: 6px;- }- .pg-status::before {- content: ""; width: 5px; height: 5px; border-radius: 50%;- background: var(--green); box-shadow: 0 0 5px var(--green);- animation: pulse-green 2.4s ease-in-out infinite;- }- .pg-preview {- flex: 1; position: relative; min-height: 340px;- transition: background-color 0.3s;- overflow: hidden;- }- .pg-preview agent-3d {- position: absolute; inset: 0; display: block;- width: 100%; height: 100%;- }- /* Shown only when no avatar GLB could be resolved (API + fallback pool- both unreachable) — mirrors the other sections' designed error states. */- .pg-preview-msg {- position: absolute; inset: 0; display: flex; flex-direction: column;- align-items: center; justify-content: center; gap: 10px;- text-align: center; padding: 24px; color: var(--text-3); font-size: 13px;- }- .pg-preview-msg a { color: var(--text-2); text-decoration: underline; }- .pg-preview-msg a:hover, .pg-preview-msg a:focus-visible { color: var(--text); }-- /* Animation bar */- .pg-anims {- padding: 10px 16px; border-top: 1px solid var(--hairline);- display: flex; gap: 4px; flex-wrap: wrap;- position: relative; z-index: 2;- }- .pg-anim {- padding: 4px 10px; border-radius: 5px;- font-family: var(--font-mono); font-size: 11px;- color: var(--text-3); background: transparent;- border: 1px solid var(--hairline-strong); cursor: pointer;- transition: border-color 0.12s, color 0.12s, background 0.12s;- }- .pg-anim:hover { border-color: var(--text-3); color: var(--text-2); }- .pg-anim.active {- border-color: rgba(255,255,255,0.5); color: var(--text);- background: rgba(255,255,255,0.08);- }-- .pg-copy:focus-visible, .pg-tab:focus-visible, .pg-chip:focus-visible,- .pg-anim:focus-visible, .pg-avatar-item:focus-visible {- outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px;- }-- /* ── COLOR PICKER ────────────────────────────────────────── */- .pg-color-trigger {- position: relative;- width: 26px; height: 26px; border-radius: 6px;- border: 1px solid var(--hairline-strong);- cursor: pointer; flex-shrink: 0;- background: conic-gradient(- from 0deg,- #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000- );- transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;- padding: 0;- }- .pg-color-trigger:hover {- border-color: var(--text-3);- transform: scale(1.1);- }- .pg-color-trigger.active {- border-color: var(--text);- box-shadow: 0 0 0 2px rgba(255,255,255,0.15);- }- .pg-color-trigger.has-color {- background: var(--pg-picked-color, #888);- }- .pg-color-popover {- position: absolute;- top: calc(100% + 8px);- left: 50%;- transform: translateX(-50%);- z-index: 50;- background: var(--surface-1);- border: 1px solid var(--hairline-strong);- border-radius: 10px;- padding: 14px;- box-shadow: 0 12px 40px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);- display: none;- flex-direction: column;- gap: 10px;- width: 220px;- }- .pg-color-popover.open {- display: flex;- animation: pg-pop-in 0.18s cubic-bezier(.2,.7,.3,1);- }- @keyframes pg-pop-in {- from { opacity: 0; transform: translateY(-4px) scale(0.97); }- to { opacity: 1; transform: translateY(0) scale(1); }- }- .pg-color-popover-label {- font-family: var(--font-mono); font-size: 10px;- letter-spacing: 0.15em; text-transform: uppercase;- color: var(--text-3);- }- .pg-color-swatches {- display: grid;- grid-template-columns: repeat(6, 1fr);- gap: 5px;- }- .pg-color-swatch {- width: 100%; aspect-ratio: 1; border-radius: 5px;- border: 2px solid transparent;- cursor: pointer; padding: 0;- transition: border-color 0.12s, transform 0.12s;- }- .pg-color-swatch:hover {- border-color: rgba(255,255,255,0.4);- transform: scale(1.12);- }- .pg-color-swatch.active {- border-color: var(--text);- }- .pg-color-hex-row {- display: flex; align-items: center; gap: 6px;- }- .pg-color-hex-input {- flex: 1;- background: var(--surface-2);- border: 1px solid var(--hairline-strong);- border-radius: 5px;- padding: 6px 8px;- font-family: var(--font-mono);- font-size: 12px;- color: var(--text);- outline: none;- transition: border-color 0.15s;- }- .pg-color-hex-input:focus { border-color: var(--text-3); }- .pg-color-hex-input:focus-visible {- outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));- outline-offset: var(--focus-ring-offset,2px);- }- .pg-color-preview {- width: 28px; height: 28px; border-radius: 5px;- border: 1px solid var(--hairline-strong);- flex-shrink: 0;- }-- @media (prefers-reduced-motion: reduce) {- .pg-status::before { animation: none !important; }- }-- /* ── LIVE FEATURE AGENTS ──────────────────────────────────── */- .door-screenshot { position: relative; }- .door-agent { position: absolute; inset: 0; }- .door-agent agent-3d {- width: 100%; height: 100%; display: block;- pointer-events: none;- transition: transform 0.4s cubic-bezier(.2,.7,.3,1);- }- .door:hover .door-agent agent-3d { transform: scale(1.03); }- .door-earn-overlay {- position: absolute; bottom: 10px; left: 10px; right: 10px;- padding: 10px 14px; z-index: 2;- background: rgba(5,5,5,0.82); backdrop-filter: blur(12px);- border: 1px solid var(--hairline-strong); border-radius: 7px;- display: flex; justify-content: space-between; align-items: baseline;- pointer-events: none;- }- .door-earn-val {- font-family: var(--font-display); font-size: 18px; font-weight: 600;- letter-spacing: -0.02em; color: var(--text);- font-variant-numeric: tabular-nums;- }- .door-earn-lbl {- font-family: var(--font-mono); font-size: 9px;- letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-3);- }- .door-earn-viz {- position: absolute; inset: 0; overflow: hidden;- transition: transform 0.4s cubic-bezier(.2,.7,.3,1);- }- .door:hover .door-earn-viz { transform: scale(1.03); }- .door-earn-spark { position: absolute; inset: 0; width: 100%; height: 100%; }- .door-earn-area { opacity: 0; transition: opacity 1.1s ease 0.35s; }- .door-earn-line {- fill: none; stroke: var(--green); stroke-width: 2;- stroke-linejoin: round; stroke-linecap: round;- vector-effect: non-scaling-stroke;- stroke-dasharray: 1000; stroke-dashoffset: 1000;- }- .door-earn-viz.is-live .door-earn-area { opacity: 1; }- .door-earn-viz.is-live .door-earn-line {- transition: stroke-dashoffset 1.7s cubic-bezier(.4,0,.2,1);- stroke-dashoffset: 0;- }- @media (prefers-reduced-motion: reduce) {- .door-earn-line { transition: none; stroke-dashoffset: 0; }- .door-earn-area { transition: none; opacity: 1; }- }- .bento-screenshot { position: relative; }- .bento-agent { position: absolute; inset: 0; }- .bento-agent agent-3d { width: 100%; height: 100%; display: block; }- .bento-agent-mini {- position: relative; height: 200px;- border-radius: 7px; overflow: hidden;- border: 1px solid var(--hairline-strong);- background: var(--surface-2); margin-top: 8px;- }- .bento-agent-mini agent-3d {- position: absolute; inset: 0;- width: 100%; height: 100%; display: block;- }- .bento-pill-btn {- cursor: pointer; background: transparent;- font-family: var(--font-mono); font-size: 11px;- letter-spacing: 0.1em; text-transform: uppercase;- color: var(--text-3); border: 1px solid var(--hairline-strong);- padding: 3px 8px; border-radius: 4px;- transition: border-color 0.12s, color 0.12s, background 0.12s;- }- .bento-pill-btn:hover { border-color: var(--text-3); color: var(--text-2); }- .bento-pill-btn.active {- border-color: rgba(255,255,255,0.5); color: var(--text);- background: rgba(255,255,255,0.08);- }-- /* ── WALK IFRAME ─────────────────────────────────────────── */- .walk-iframe-wrap {- position: relative; aspect-ratio: 4/3;- overflow: hidden; border-radius: 0 0 13px 13px;- }- .walk-iframe {- position: absolute; inset: 0;- width: 100%; height: 100%; border: 0;- background: var(--surface-2);- }-- /* ── AVATAR DROP ──────────────────────────────────────────────── */- .body-drop {- position: relative;- min-height: 70vh;- display: flex;- align-items: center;- overflow: visible;- }- .body-drop-content {- position: relative; z-index: 10;- max-width: 560px;- padding: 80px 0 140px;- }- .body-drop-title {- font-family: var(--font-display);- font-size: clamp(44px, 5.5vw, 80px);- line-height: 0.95; letter-spacing: -0.04em;- font-weight: 600; margin: 0 0 24px;- }- .body-drop-title em { font-style: normal; color: var(--text-3); font-weight: 500; }- #drop-sit-line {- text-shadow: var(--drop-shadow, none);- transition: text-shadow 90ms linear;- }- .body-drop-sub {- font-size: 17px; color: var(--text-2);- max-width: 440px; line-height: 1.55; margin: 0 0 44px;- }- #drop-canvas {- position: absolute; inset: 0;- width: 100%; height: 100%;- pointer-events: none; z-index: 20;- }- .body-drop .cta-row { position: relative; z-index: 10; }- .body-drop .btn { transform-origin: bottom center; will-change: transform; }- @media (max-width: 720px) {- .body-drop { min-height: auto; }- .body-drop-content { padding: 48px 0 100px; }- }-- /* ── MANIFESTO ──────────────────────────────────────────── */- .manifesto {- display: flex;- flex-direction: column;- gap: 0;- }- .manifesto-beat {- padding: 64px 0;- border-bottom: 1px solid var(--hairline);- }- .manifesto-beat:first-child { padding-top: 0; }- .manifesto-beat:last-child { border-bottom: none; padding-bottom: 0; }-- .manifesto-statement {- font-family: var(--font-display);- font-size: clamp(36px, 4.8vw, 68px);- line-height: 1.05;- letter-spacing: -0.04em;- font-weight: 600;- margin: 0;- color: var(--text);- }- .manifesto-statement em {- font-style: normal;- color: var(--text-3);- font-weight: 500;- }- .manifesto-statement--dim {- color: var(--text-3);- }-- .manifesto-aside {- font-size: 17px;- color: var(--text-3);- margin: 20px 0 0;- max-width: 540px;- line-height: 1.6;- }-- .manifesto-steps {- display: flex;- flex-direction: column;- gap: 6px;- }- .manifesto-step {- font-family: var(--font-display);- font-size: clamp(22px, 2.8vw, 36px);- font-weight: 500;- letter-spacing: -0.02em;- color: var(--text-4);- line-height: 1.2;- }- .manifesto-step:nth-child(2) { color: var(--text-3); }- .manifesto-step:nth-child(3) { color: var(--text-2); }-- .manifesto-lead {- font-size: clamp(18px, 2vw, 22px);- color: var(--text-3);- margin: 0 0 28px;- line-height: 1.5;- max-width: 480px;- }- .manifesto-keyword {- font-family: var(--font-display);- font-size: clamp(80px, 14vw, 180px);- line-height: 0.88;- letter-spacing: -0.055em;- font-weight: 700;- margin: 0;- color: var(--text);- position: relative;- }- .manifesto-keyword::after {- content: "";- position: absolute;- left: 0; right: 30%; bottom: -4px;- height: 2px;- background: linear-gradient(90deg, var(--text-3), transparent);- opacity: 0.4;- }-- .manifesto-negations {- margin-bottom: 36px;- display: flex;- flex-direction: column;- gap: 6px;- }- .manifesto-neg {- font-size: clamp(16px, 1.6vw, 19px);- color: var(--text-3);- margin: 0;- line-height: 1.5;- text-decoration: line-through;- text-decoration-color: rgba(255,255,255,0.15);- text-decoration-thickness: 1px;- }- .manifesto-affirmation {- font-family: var(--font-display);- font-size: clamp(24px, 3vw, 40px);- line-height: 1.2;- letter-spacing: -0.025em;- font-weight: 600;- color: var(--text);- margin: 0;- max-width: 640px;- }-- .manifesto-body {- font-size: 17px;- color: var(--text-2);- margin: 28px 0 0;- max-width: 560px;- line-height: 1.65;- }-- .manifesto-caps {- display: flex;- flex-wrap: wrap;- gap: 8px;- margin-bottom: 28px;- }- .manifesto-cap {- font-family: var(--font-mono);- font-size: 11.5px;- letter-spacing: 0.1em;- text-transform: uppercase;- color: var(--text-2);- padding: 8px 16px;- border: 1px solid var(--hairline-strong);- border-radius: 999px;- transition: border-color 0.2s, color 0.2s, background 0.2s;- }- .manifesto-cap:hover {- border-color: var(--text-3);- color: var(--text);- background: rgba(255,255,255,0.03);- }-- .manifesto-close-dim {- font-family: var(--font-display);- font-size: clamp(22px, 2.8vw, 36px);- font-weight: 500;- letter-spacing: -0.02em;- color: var(--text-4);- margin: 0 0 12px;- line-height: 1.15;- }- .manifesto-close {- font-family: var(--font-display);- font-size: clamp(40px, 5.5vw, 76px);- line-height: 1.0;- letter-spacing: -0.04em;- font-weight: 600;- margin: 0;- color: var(--text);- }-- .manifesto-embed {- font-family: var(--font-mono);- font-size: 13px;- color: var(--text-3);- margin: 20px 0 0;- letter-spacing: 0.02em;- }- .manifesto-embed code {- color: var(--text);- font-weight: 500;- }-- @media (max-width: 720px) {- .manifesto-beat { padding: 44px 0; }- .manifesto-keyword::after { right: 10%; }- }- /* ── INTERACTIVE BENTO DEMOS ─────────────────────────────── */- .bento-interact{margin-top:10px;position:relative}- .bento-action-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:7px;font-family:var(--font-mono);font-size:11.5px;letter-spacing:0.06em;color:var(--text);background:var(--surface-2);border:1px solid var(--hairline-strong);cursor:pointer;transition:border-color .15s,background .15s,transform .12s}- .bento-action-btn:hover{border-color:var(--text-3);background:rgba(255,255,255,.06);transform:translateY(-1px)}- .bento-action-btn:active{transform:translateY(0)}- .bento-action-btn:focus-visible{outline:2px solid rgba(255,255,255,.5);outline-offset:2px}- .bento-action-btn.sm{padding:5px 11px;font-size:10.5px}- .bento-action-btn.primary{background:var(--text);color:var(--bg);border-color:var(--text);font-weight:600}- .bento-action-btn.primary:hover{background:var(--ink-bright);border-color:var(--ink-bright)}- .bento-action-btn.ghost{background:transparent;color:var(--text-2)}- .studio-zone{display:flex;gap:8px;align-items:stretch}- .studio-drop{flex:1;width:100%;background:transparent;border:1px dashed var(--hairline-strong);border-radius:8px;padding:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;transition:border-color .2s,background .2s;font-family:var(--font-mono);font-size:11px;color:var(--text-3);text-align:center;min-height:80px}- .studio-drop:hover,.studio-drop.drag-over{border-color:var(--text-2);background:rgba(255,255,255,.03)}- .studio-drop:focus-visible{outline:var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));outline-offset:var(--focus-ring-offset,2px)}- .studio-drop-icon{font-size:22px;opacity:.5}- .studio-preview-img{width:44px;height:44px;border-radius:50%;object-fit:cover;border:1px solid var(--hairline-strong);flex:none}- .studio-ready{display:none;flex-direction:column;align-items:stretch;gap:12px;padding:14px;border:1px solid var(--hairline-strong);border-radius:8px;background:rgba(255,255,255,.02)}- .studio-ready.show{display:flex}- .studio-ready > .studio-preview-img{align-self:flex-start}- .studio-ready-body{display:flex;flex-direction:column;gap:4px}- .studio-ready-title{font-family:var(--font-display);font-size:14px;font-weight:600;color:var(--text)}- .studio-ready-sub{font-family:var(--font-mono);font-size:11px;line-height:1.5;color:var(--text-3)}- .studio-ready-actions{display:flex;gap:8px;flex-wrap:wrap}- .studio-ready-actions .bento-action-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}- .studio-error{display:none;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--hairline-strong);border-radius:8px;font-family:var(--font-mono);font-size:11px;color:var(--text-2)}- .studio-error.show{display:flex}- .mocap-demo{display:flex;flex-direction:column;gap:8px}- .mocap-bar{display:flex;align-items:center;gap:10px}- .mocap-waveform{width:100%;height:48px;border-radius:6px;background:var(--surface-2);border:1px solid var(--hairline-strong);display:block}- .mocap-status{font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;color:var(--text-3);text-align:center}- .mocap-status.live{color:var(--text-2)}- .walk-minimap-wrap{position:relative;border-radius:8px;overflow:hidden;border:1px solid var(--hairline-strong);background:#0d0d0d}- .walk-minimap{width:100%;height:140px;display:block;cursor:crosshair}- .walk-minimap:focus{outline:2px solid rgba(255,255,255,.3);outline-offset:-2px}- .walk-minimap-hud{position:absolute;top:6px;left:8px;display:flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:9px;color:var(--text-3);letter-spacing:.08em}- .walk-minimap-dot{width:5px;height:5px;border-radius:50%;background:var(--success);box-shadow:0 0 4px color-mix(in srgb, var(--success) 53%, transparent)}- .walk-minimap-hint{position:absolute;bottom:6px;left:50%;transform:translateX(-50%);font-family:var(--font-mono);font-size:8.5px;color:var(--text-3);letter-spacing:.06em;white-space:nowrap}- .walk-minimap-hint kbd{display:inline-block;padding:0 3px;border:1px solid var(--hairline-strong);border-radius:2px;font-family:var(--font-mono);font-size:8px;background:var(--surface-2)}- .x402-demo{display:flex;flex-direction:column;gap:8px}- .x402-step{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:8px;transition:all .3s ease}- .x402-code{font-family:var(--font-mono);font-size:11.5px;color:var(--text-2);flex:1}- .x402-code.err{color:var(--danger)}- .x402-code.ok{color:var(--success)}- .x402-spinner{width:16px;height:16px;border:2px solid var(--hairline-strong);border-top-color:var(--text-2);border-radius:50%;animation:walk-spin .6s linear infinite;display:none}- .x402-amount{font-family:var(--font-display);font-size:14px;font-weight:600;color:var(--success);display:none}- .x402-amount.show{display:block}- .mint-demo{perspective:600px}- .mint-card{position:relative;padding:16px;background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:10px;transition:transform .6s cubic-bezier(.2,.7,.3,1),box-shadow .3s,border-color .3s}- .mint-card.minted{border-color:rgba(255,255,255,.2);box-shadow:0 0 20px -4px rgba(255,255,255,.08)}- .mint-card-inner{display:flex;align-items:center;justify-content:space-between;gap:10px}- .mint-card-info{display:flex;flex-direction:column;gap:2px}- .mint-card-label{font-family:var(--font-mono);font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--text-3);transition:color .3s}- .mint-card-name{font-family:var(--font-display);font-size:16px;font-weight:600;color:var(--text);background:transparent;border:none;border-bottom:1px dashed transparent;padding:0 1px 1px;margin:0;width:auto;max-width:170px;outline:none;transition:border-color .15s}- .mint-card-name:hover:not(:disabled),.mint-card-name:focus{border-bottom-color:var(--text-2)}- .mint-card-name:focus-visible{outline:var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));outline-offset:var(--focus-ring-offset,2px);border-radius:2px}- .mint-card-name::placeholder{color:var(--text-4)}- .mint-card-name:disabled{opacity:.65;cursor:default}- .mint-card.error{border-color:rgba(248,113,113,.45)}- .mint-card-name.shake{animation:mint-shake .4s cubic-bezier(.36,.07,.19,.97)}- @keyframes mint-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(2px)}30%,50%,70%{transform:translateX(-4px)}40%,60%{transform:translateX(4px)}}- .mint-card-chain{font-family:var(--font-mono);font-size:10px;color:var(--text-3);display:block}- .mint-card-chain a{color:var(--success);text-decoration:none;border-bottom:1px solid rgba(74,222,128,.3)}- .mint-card-chain a:hover{border-bottom-color:var(--success)}- .mint-card.minted .mint-card-label{color:var(--success)}- .mint-status{margin:11px 0 0;font-family:var(--font-mono);font-size:10.5px;line-height:1.4;color:var(--text-3)}- .mint-status.err{color:var(--danger)}- .mint-status.ok{color:var(--success)}- .mint-status a{color:inherit;text-decoration:underline;text-underline-offset:2px}- .mint-progress{width:28px;height:28px;position:relative;display:none}- .mint-progress.active{display:block}- .mint-progress svg{width:100%;height:100%;transform:rotate(-90deg)}- .mint-progress.active:not(.done) svg{animation:mint-spin .9s linear infinite}- @keyframes mint-spin{from{transform:rotate(-90deg)}to{transform:rotate(270deg)}}- .mint-progress circle{fill:none;stroke-width:3;stroke:var(--text-2);stroke-linecap:round;stroke-dasharray:78.5;stroke-dashoffset:78.5;transition:stroke-dashoffset 1.2s cubic-bezier(.2,.7,.3,1)}- .mint-progress.active:not(.done) circle{stroke-dashoffset:55}- .mint-progress.done circle{stroke-dashoffset:0;stroke:var(--success);transition:stroke-dashoffset .5s cubic-bezier(.2,.7,.3,1)}- .skill-demo{display:flex;flex-direction:column;gap:8px}- .skill-result{background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 14px;font-family:var(--font-mono);font-size:11px;color:var(--text-2);line-height:1.6;max-height:100px;overflow-y:auto;transition:border-color .3s}- .skill-result.fresh{border-color:rgba(255,255,255,.2)}- .skill-result .json-key{color:#60a5fa}- .skill-result .json-str{color:var(--success)}- .skill-result .json-num{color:var(--warn)}- .skill-result .json-dim{color:var(--text-3)}- .skill-result.loading{color:var(--text-3)}- .skill-result.err{border-color:rgba(248,113,113,.4)}- .skill-loading .json-key{color:#60a5fa}- .skill-err{color:var(--danger)}- .skill-cursor{color:var(--text-3);animation:skillBlink 1s steps(2,end) infinite}- .skill-dots::after{content:'';animation:skillDots 1.4s steps(4,end) infinite}- @keyframes skillDots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}- @keyframes skillBlink{50%{opacity:0}}- .bento-pill-btn[aria-busy="true"]{opacity:.6;cursor:progress}- .memory-demo{display:flex;flex-direction:column;gap:8px}- .memory-input-row{display:flex;gap:6px}- .memory-input{flex:1;background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:6px;padding:7px 10px;font-family:var(--font-mono);font-size:11.5px;color:var(--text);outline:none;transition:border-color .15s}- .memory-input:focus{border-color:var(--text-3)}- .memory-input:focus-visible{outline:var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));outline-offset:var(--focus-ring-offset,2px)}- .memory-input::placeholder{color:var(--text-4)}- .memory-log{display:flex;flex-direction:column;gap:4px;max-height:72px;overflow-y:auto}- .memory-entry{font-family:var(--font-mono);font-size:10.5px;color:var(--text-3);line-height:1.5;padding:3px 0;animation:mem-in .3s ease}- .memory-entry .mem-op{color:var(--text-4);margin-right:4px}- .memory-entry .mem-val{color:var(--text-2)}- @keyframes mem-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}- .ar-demo{display:flex;align-items:center;gap:12px}- .ar-phone{width:64px;height:100px;border:2px solid var(--hairline-strong);border-radius:10px;background:var(--surface-2);position:relative;overflow:hidden;flex-shrink:0;transition:border-color .3s}- .ar-phone.active{border-color:var(--text-3)}- .ar-phone-notch{width:24px;height:4px;background:var(--hairline-strong);border-radius:2px;margin:4px auto 0}- .ar-phone-screen{position:absolute;inset:10px 3px 6px;background:#111;border-radius:4px;display:flex;align-items:center;justify-content:center;overflow:hidden}- .ar-phone-avatar{width:32px;height:32px;border-radius:50%;background:var(--surface-1);border:1px solid var(--hairline-strong);display:flex;align-items:center;justify-content:center;font-size:14px;opacity:0;transition:opacity .4s,transform .4s}- .ar-phone.active .ar-phone-avatar{opacity:1;transform:scale(1.1)}- .ar-phone-crosshair{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transition:opacity .3s}- .ar-phone.active .ar-phone-crosshair{opacity:.5}- .ar-phone-crosshair::before,.ar-phone-crosshair::after{content:'';position:absolute;background:var(--text-3)}- .ar-phone-crosshair::before{width:16px;height:1px}- .ar-phone-crosshair::after{width:1px;height:16px}- .ar-info{display:flex;flex-direction:column;gap:4px}- .ar-status{font-family:var(--font-mono);font-size:10px;color:var(--text-3);letter-spacing:.08em}- .ar-status.ready{color:var(--success)}- .mktplace-strip{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 0}- .mktplace-strip::-webkit-scrollbar{display:none}- .mktplace-item{flex-shrink:0;width:52px;height:52px;border-radius:10px;overflow:hidden;border:1px solid var(--hairline-strong);cursor:pointer;background:var(--surface-2);transition:border-color .15s,transform .15s;position:relative;display:block}- .mktplace-item:hover{border-color:var(--text-3);transform:translateY(-2px)}- .mktplace-item img{width:100%;height:100%;object-fit:cover;display:block}- .mktplace-item-initial{width:100%;height:100%;display:none;align-items:center;justify-content:center;font-family:var(--font-mono);font-size:16px;font-weight:600;color:var(--text-3);text-transform:uppercase;line-height:1}- .mktplace-item-name{position:absolute;bottom:0;left:0;right:0;padding:2px 4px;font-family:var(--font-mono);font-size:7px;color:var(--text);background:rgba(0,0,0,.7);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}- .mktplace-more{flex-shrink:0;width:52px;height:52px;border-radius:10px;border:1px dashed var(--hairline-strong);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-size:18px;color:var(--text-4);cursor:pointer;transition:border-color .15s,color .15s;text-decoration:none}- .mktplace-more:hover{border-color:var(--text-3);color:var(--text-2)}- .analytics-demo{display:flex;flex-direction:column;gap:10px;--spark:var(--success);--spark-deep:#10b981}- .analytics-example-tag{align-self:flex-start;font-family:var(--font-mono);font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-3);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px}- .analytics-counters{display:flex;gap:16px}- .analytics-counter{display:flex;flex-direction:column;gap:1px}- .analytics-val{font-family:var(--font-display);font-size:18px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;letter-spacing:-0.02em}- .analytics-val#an-revenue{color:var(--spark)}- .analytics-lbl{font-family:var(--font-mono);font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-3)}- .analytics-spark{width:100%;height:40px;display:block}- .analytics-spark path{fill:none;stroke:var(--spark);stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 3px color-mix(in srgb,var(--spark) 55%,transparent))}- .analytics-spark .spark-fill{fill:url(#spark-grad);stroke:none;opacity:1;filter:none}- .analytics-spark .spark-dot{fill:var(--spark);r:2.5;filter:drop-shadow(0 0 4px var(--spark));animation:spark-pulse 2s ease-in-out infinite}- @keyframes spark-pulse{0%,100%{opacity:1}50%{opacity:.4}}-- /* ── DRAGON VISION SECTION ───────────────────────────────── */- .vision-block{padding-bottom:0}- .vision-block .block-eyebrow{margin-bottom:24px}- .dragon-wrap{position:relative;height:76vh;min-height:420px;max-height:880px;overflow:hidden;background:#050505;cursor:crosshair;border-top:1px solid var(--hairline)}- .dragon-hint{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);color:rgba(255,255,255,.18);font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;pointer-events:none;transition:opacity 1.5s ease;white-space:nowrap;z-index:5}- .dragon-hint.fade{opacity:0}- @media(max-width:720px){.dragon-wrap{height:55vh;min-height:300px}}- @media(prefers-reduced-motion:reduce){.dragon-wrap canvas{display:none}}-- /* ── Microinteractions (B11) — focus rings + press states ──────────- Covers every interactive element above that had hover-only states.- Ring tokens come from /tokens.css + /buttons.css. */- .door:focus-visible,- .stack-card:focus-visible,- .showcase-agent-card:focus-visible,- .showcase-cta-card:focus-visible,- .bento-card a:focus-visible,- .bento-pill-btn:focus-visible,- .dev-tab:focus-visible,- .dev-link:focus-visible,- .pg-key-hint:focus-visible,- .pg-send:focus-visible,- .pg-color-trigger:focus-visible,- .pg-color-swatch:focus-visible,- .wyg-card:focus-visible,- .wyg-anim-chip:focus-visible,- .wyg-anim-stop:focus-visible,- .hero-chip:focus-visible,- .foot-col a:focus-visible,- .foot-ca:focus-visible,- .mint-card-chain a:focus-visible,- .mktplace-item:focus-visible,- .mktplace-more:focus-visible {- outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, #fff);- outline-offset: var(--focus-ring-offset, 2px);- }- /* Press feedback — buttons squash a hair, links/rows tint deeper. */- .bento-pill-btn:active,- .dev-tab:active,- .wyg-anim-chip:active,- .wyg-anim-stop:active,- .pg-color-trigger:active,- .pg-color-swatch:active,- .mktplace-more:active,- .hero-chip:active,- .foot-ca:active {- transform: scale(0.97);- }- .mktplace-item:active { transform: translateY(0) scale(0.97); }- /* 3D-transformed cards (stack, showcase) and full-bleed cells press via- a tint instead of a transform so their perspective layout holds. */- .door:active,- .stack-card:active,- .wyg-card:active { background: var(--surface-2); }- .showcase-agent-card:active,- .showcase-cta-card:active { border-color: rgba(255,255,255,0.22); }- .foot-col a:active,- .dev-link:active,- .mint-card-chain a:active { opacity: 0.7; }- @media (prefers-reduced-motion: reduce) {- .mktplace-item:active,- .bento-pill-btn:active, .dev-tab:active, .wyg-anim-chip:active,- .wyg-anim-stop:active, .pg-color-trigger:active, .pg-color-swatch:active,- .mktplace-more:active, .hero-chip:active, .foot-ca:active {- transform: none;- }- }-- /* ── HOME AR SECTION ─────────────────────────────────────────── */- #home-ar { background: var(--bg); }- .har-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }- @media (max-width: 860px) { .har-inner { grid-template-columns: 1fr; gap: 40px; } }- .har-viewer-wrap {- position: relative;- border-radius: 20px;- overflow: hidden;- /* A soft floor gradient so the model reads as sitting in a space, not- floating in a void — sells the "real-world scale" promise on desktop. */- background:- radial-gradient(120% 80% at 50% 118%, rgba(139,92,246,.16), transparent 60%),- linear-gradient(180deg, #0a0a14 0%, #0a0a14 55%, #12121e 100%);- border: 1px solid var(--hairline);- aspect-ratio: 1 / 1;- display: flex; align-items: center; justify-content: center;- }- /* Faint horizon line where the "floor" meets the "wall". */- .har-viewer-wrap::after {- content: ''; position: absolute; left: 8%; right: 8%; bottom: 26%;- height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);- pointer-events: none;- }- .har-viewer-wrap model-viewer { position: relative; z-index: 1; width: 100%; height: 100%; --poster-color: transparent; background: transparent; }- .har-viewer-nav {- position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);- display: flex; align-items: center; gap: 8px;- background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);- border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 6px 10px;- }- .har-nav-btn {- background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer;- padding: 4px 8px; border-radius: 6px; font-size: 14px; line-height: 1;- transition: color .15s, background .15s;- }- .har-nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); }- .har-prompt { font-size: 11px; color: rgba(255,255,255,.5); font-family: var(--font-mono); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }- .har-cat {- position: absolute; top: 14px; left: 14px; z-index: 2;- font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;- color: rgba(255,255,255,.7); background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);- border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 4px 9px;- opacity: 0; transition: opacity .3s ease;- }- .har-cat[data-shown="1"] { opacity: 1; }- .har-count { font-size: 13px; color: var(--text-3); margin: 10px 0 0; min-height: 18px; opacity: 0; transition: opacity .4s ease; }- .har-count[data-shown="1"] { opacity: 1; }- .har-count b { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }- .har-count .har-dot-live { display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: #34d399; margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: har-pulse 2.4s ease-out infinite; }- @keyframes har-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }- @media (prefers-reduced-motion: reduce) { .har-count .har-dot-live { animation: none; } }- .har-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }- .har-empty p { color: var(--text-3); font-size: 14px; margin: 0; max-width: 240px; line-height: 1.5; }- .har-empty a { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #000; font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 999px; text-decoration: none; transition: transform .15s, box-shadow .15s; }- .har-empty a:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,.14); }- #home-ar .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }- .har-viewer-wrap:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }- .har-dots { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }- .har-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.25); border: none; padding: 0; cursor: pointer; transition: background .2s, transform .2s; }- .har-dot:hover { background: rgba(255,255,255,.5); }- .har-dot[data-active="1"] { background: rgba(255,255,255,.9); transform: scale(1.35); }- .har-autobar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: linear-gradient(90deg, rgba(139,92,246,.9), rgba(255,255,255,.9)); z-index: 2; }- .har-autobar[data-run="1"] { width: 100%; transition: width var(--har-auto-ms, 5000ms) linear; }- @media (prefers-reduced-motion: reduce) { .har-autobar { display: none; } }- .har-poster-fade { opacity: 0; transition: opacity .35s ease; }- .har-poster-fade[data-shown="1"] { opacity: 1; }- .har-skeleton { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; }- .har-right { display: flex; flex-direction: column; gap: 28px; }- .har-mobile-btn {- display: inline-flex; align-items: center; gap: 10px;- padding: 16px 24px; border-radius: 14px; background: #fff; color: #000;- font-size: 16px; font-weight: 600; border: none; cursor: pointer;- transition: transform .15s, box-shadow .15s, opacity .15s; align-self: flex-start;- }- .har-mobile-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(255,255,255,.15); }- .har-mobile-btn:active { transform: none; }- .har-mobile-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }- .har-mobile-btn svg { width: 20px; height: 20px; flex-shrink: 0; }- .har-qr-wrap {- width: 120px; height: 120px; border-radius: 12px; background: #fff;- display: flex; align-items: center; justify-content: center;- padding: 8px; box-sizing: border-box;- }- .har-qr-wrap canvas { border-radius: 4px; display: block; }- .har-qr-label { font-size: 13px; color: var(--text-3); line-height: 1.5; }- .har-compat { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }- .har-compat-pill {- padding: 4px 12px; border-radius: 999px;- background: rgba(255,255,255,.05); border: 1px solid var(--hairline);- font-size: 12px; color: var(--text-3);- }- .har-cta-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; text-decoration: none; transition: color .15s; }- .har-cta-link:hover { color: var(--text); }- /* Show/hide platform-specific UI: default desktop */- .har-desktop-only { display: flex; flex-direction: column; gap: 12px; }- .har-mobile-only { display: none; }- @media (hover: none) and (pointer: coarse) {- .har-desktop-only { display: none; }- .har-mobile-only { display: flex; flex-direction: column; gap: 16px; }- }-- /* iOS auto-zooms any focused field whose font-size is < 16px. Bump every- editable/focusable text field to 16px on phones — desktop sizing above- is untouched. Covers chat, playground, forge, mint, memory, hex inputs. */- @media (max-width: 720px) {- .pg-input, .pg-url-path, .pg-color-hex-input,- .pg-editor textarea, .pg-editor pre,- #home-forge textarea.hf-prompt, #home-forge textarea.hf-embed-code,- .memory-input, .mint-card-name { font-size: 16px; }- /* Primary CTAs need a comfortable 44px touch target on phones. The- shared .btn system runs ~37px tall by default — lift only the- homepage's lead actions, leaving the desktop button height intact. */- .hero-cta-row .btn, .cta-card .cta-row .btn,- .body-drop .cta-row .btn { min-height: 44px; }- }-- /* ── Oracle conviction mini-cards (home section) ─────────────── */- .hoc-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); transition: background .14s; text-decoration: none; color: inherit; }- .hoc-item:last-child { border-bottom: none; }- .hoc-item:hover { background: rgba(255,255,255,0.03); }- .hoc-score { font-family: var(--font-mono,monospace); font-size: 22px; font-weight: 800; line-height: 1; width: 42px; text-align: center; flex-shrink: 0; }- .hoc-score.t-prime, .hoc-score.t-strong { color: var(--green, #22c55e); }- .hoc-score.t-lean { color: var(--amber, #f59e0b); }- .hoc-score.t-watch { color: var(--text-3, #6a6a6a); }- .hoc-score.t-avoid { color: var(--red, #ef4444); }- .hoc-info { flex: 1; min-width: 0; }- .hoc-sym { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }- .hoc-name { font-size: 11px; color: var(--text-3, #6a6a6a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }- .hoc-pillars { display: flex; gap: 4px; margin-top: 5px; }- .hoc-pillar { height: 3px; border-radius: 2px; flex: 1; background: rgba(255,255,255,.06); position: relative; overflow: hidden; }- .hoc-pillar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }- .hoc-tier { font-family: var(--font-mono,monospace); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 3px 7px; border-radius: 5px; white-space: nowrap; flex-shrink: 0; }- .hoc-tier.t-prime, .hoc-tier.t-strong { background: rgba(34,197,94,.14); color: var(--green, #22c55e); }- .hoc-tier.t-lean { background: rgba(245,158,11,.13); color: var(--amber, #f59e0b); }- .hoc-tier.t-watch { background: rgba(255,255,255,.05); color: var(--text-3, #6a6a6a); }- .hoc-tier.t-avoid { background: rgba(239,68,68,.14); color: var(--red, #ef4444); }- .hoc-loading { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }- .hoc-sk { height: 48px; border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: hoc-shimmer 1.3s linear infinite; }- @keyframes hoc-shimmer { to { background-position: -200% 0; } }- .hoc-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green, #22c55e); margin-right: 7px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: hoc-pulse 2s infinite; }- @keyframes hoc-pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5)} 70%{box-shadow:0 0 0 6px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }-- /* ── MOTION SAFETY ──────────────────────────────────────────- Honor the OS "reduce motion" setting. This page hardcodes ~30- keyframe animations and many transitions that tokens.css cannot- reach; neutralize all decorative motion globally so the layout- stays static for vestibular-sensitive visitors. Essential state- feedback still renders — only the animation/transition is dropped. */- @media (prefers-reduced-motion: reduce) {- html { scroll-behavior: auto; }- *, *::before, *::after {- animation-duration: 0.001ms !important;- animation-iteration-count: 1 !important;- animation-delay: 0ms !important;- transition-duration: 0.001ms !important;- transition-delay: 0ms !important;- scroll-behavior: auto !important;- }- }- </style>+ <link rel="stylesheet" href="/home.css" /><noscript><style>.reveal{opacity:1!important;transform:none!important}.hero-text>*{opacity:1!important;transform:none!important}</style></noscript><script type="module" src="https://three.ws/agent-3d/latest/agent-3d.js"></script>@@ -3374,9 +659,19 @@try { el = document.getElementById(decodeURIComponent(hash.slice(1))); } catch (e) { return; }if (!el || !el.closest('[data-tier="advanced"]')) return;setLite(false, false);- requestAnimationFrame(function () { el.scrollIntoView({ block: 'start' }); });+ requestAnimationFrame(function () {+ el.scrollIntoView({ block: 'start' });+ // Late-loading media above can shift layout; correct once it settles.+ setTimeout(function () { el.scrollIntoView({ block: 'start' }); }, 450);+ });+ }+ // This script runs mid-parse, before the gated sections below it exist in+ // the DOM, so the load-time hash check must wait for the full document.+ if (document.readyState === 'loading') {+ document.addEventListener('DOMContentLoaded', revealForHash);+ } else {+ revealForHash();}- revealForHash();window.addEventListener('hashchange', revealForHash);})();</script>@@ -6095,1360 +3390,118 @@</nav><div class="foot-inner"><div>© 2026 · three.ws · the 3D agent layer of the internet</div>- <button class="foot-ca" id="foot-ca-btn" title="Copy contract address" data-i18n-html="home.three_fembdox7r1psc4gecvjdsbnbza3bfztcydcatj" data-i18n-attr="title:home.copy_contract_address_title">- <span class="foot-ca-label">$THREE</span>- <span class="foot-ca-addr" id="foot-ca-addr">FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump</span>- </button>- </div>- </div>-</footer>--<script type="module">- // Dynamic import inside the observer callback — a static import would put- // Three.js + GLTFLoader in the home entry's critical bundle even though the- // section is far below the fold. The module (and its GLB fetch) only loads- // when the user scrolls within 200px of the section.- const dropSection = document.getElementById('body-drop');- if (dropSection) {- const io = new IntersectionObserver(async entries => {- if (!entries[0].isIntersecting) return;- io.disconnect();- try {- const { initAvatarDrop } = await import('/src/avatar-drop.js');- initAvatarDrop(dropSection);- } catch {}- }, { rootMargin: '200px' });- io.observe(dropSection);- }-</script>--<script type="module">- // Same deferral as the body-drop section above: the walk preview pulls- // Three.js, RoomEnvironment, nipplejs, and a rigged GLB — none of which- // belong in first paint. Load it all when the section approaches the- // viewport.- const walkContainer = document.getElementById('walk-preview-container');- if (walkContainer) {- const io = new IntersectionObserver(async entries => {- if (!entries[0].isIntersecting) return;- io.disconnect();- try {- const { initWalkPreview } = await import('/src/walk-embed-preview.js');- initWalkPreview(walkContainer);- } catch {}- }, { rootMargin: '200px' });- io.observe(walkContainer);- }-</script>--<script type="module">- // Live pump.fun token card + real "Launch yours" flow.- import { initHomeLiveToken } from '/src/home-live-token.js';- import { initHomepageLauncher } from '/src/pump/homepage-launcher.js';- const hltCard = document.getElementById('hlt-card');- if (hltCard) initHomeLiveToken(hltCard);- initHomepageLauncher(document.getElementById('hlt-launch'));-</script>--<script type="module">- // Oracle conviction mini-feed on home page.- // Fetches top scoring coins from /api/oracle/feed and renders compact cards- // showing ticker, score, tier pill, and four pillar bars.- (async function initHomeOracle() {- const hocItems = document.getElementById('hoc-items');- if (!hocItems) return;-- const PIL_COLOR = { pedigree: '#5fe3ff', structure: '#34d399', narrative: '#a07bff', momentum: '#fbbf24' };- const TIER_LABEL = { prime: 'PRIME', strong: 'STRONG', lean: 'LEAN', watch: 'WATCH', avoid: 'AVOID' };- const tc = (t) => `t-${t || 'watch'}`;-- function miniCard(it) {- const tier = it.tier || 'watch';- const score = Math.round(it.score ?? 0);- const p = it.pillars || {};- const bars = ['pedigree','structure','narrative','momentum'].map(k =>- `<div class="hoc-pillar"><div class="hoc-pillar-fill" style="width:${Math.max(0,Math.min(100,p[k]||0))}%;background:${PIL_COLOR[k]}"></div></div>`- ).join('');- const sym = (it.symbol || '?').toUpperCase();- const name = it.name || it.mint.slice(0, 8);-- const a = document.createElement('a');- a.className = 'hoc-item';- a.href = `/oracle/coin/${encodeURIComponent(it.mint)}`;- a.setAttribute('aria-label', `$${sym} — ${score} conviction, ${tier} tier`);- a.innerHTML = `- <div class="hoc-score ${tc(tier)}">${score}</div>- <div class="hoc-info">- <div class="hoc-sym">$${sym}</div>- <div class="hoc-name">${name}</div>- <div class="hoc-pillars">${bars}</div>- </div>- <span class="hoc-tier ${tc(tier)}">${TIER_LABEL[tier] || tier.toUpperCase()}</span>`;- return a;- }-- try {- const r = await fetch('/api/oracle/feed?network=mainnet&limit=6&min_score=56');- if (!r.ok) throw new Error(r.status);- const data = await r.json();- const items = (data.items || []).sort((a, b) => b.score - a.score).slice(0, 3);- hocItems.className = '';- hocItems.innerHTML = '';- if (!items.length) {- hocItems.innerHTML = '<div style="padding:32px 16px;text-align:center;color:var(--text-3);font-size:13px">Oracle is warming up — scores arrive live as new coins surface.</div>';- return;- }- items.forEach(it => hocItems.appendChild(miniCard(it)));- } catch {- hocItems.className = '';- hocItems.innerHTML = '<div style="padding:28px 16px;text-align:center"><a class="btn btn--sm" href="/oracle">Open Oracle →</a></div>';- }- })();-</script>--<script>- // ── Boot live <agent-3d> instances ─────────────────────────────- const AVATAR_ID = 'bacff13e-b64b-4ac0-860d-44f0168ad23b';- const AGENT_ATTRS = {- mode: 'inline', responsive: '', background: 'transparent',- 'name-plate': 'off', 'avatar-chat': 'off', kiosk: '', eager: '',- };- function devProxyGlb(url) {- if (!url) return url;- const isDev = location.hostname === 'localhost' || location.hostname.includes('.github.dev') || location.hostname.includes('.gitpod.io');- if (isDev && url.includes('r2.dev')) {- try { return '/r2-proxy' + new URL(url).pathname; } catch (_) {}- }- return url;- }-- // Fetch a pool of unique community avatar GLBs from /api/explore, cached for the page lifetime.- // pool[0]=WYG, pool[1]=vclose, pool[2..]=LIVE_SPOTS null entries- var _avatarPoolP = null;- // Only renderable full-body avatars belong here. The idle_*.glb clips are- // animation-only (0 meshes) and render as an empty box — never use them as a body.- var POOL_FALLBACKS = [- '/avatars/default.glb',- '/avatars/cz.glb',- '/animations/robotexpressive.glb',- '/animations/soldier.glb',- '/avatars/default.glb',- '/avatars/cz.glb',- '/animations/robotexpressive.glb',- '/animations/soldier.glb',- ];- function getAvatarPool() {- if (!_avatarPoolP) {- _avatarPoolP = fetch(location.origin + '/api/explore?source=all&limit=16&quality=high')- .then(function(r) { return r.json(); })- .then(function(d) {- var items = (d.items || []);- var pool = items- .filter(function(it) { return it.glbUrl && it.avatarId !== AVATAR_ID; })- .map(function(it) { return devProxyGlb(it.glbUrl); })- .filter(Boolean);- var fi = 0;- while (pool.length < 8) {- pool.push(location.origin + POOL_FALLBACKS[fi++ % POOL_FALLBACKS.length]);- }- return pool;- })- .catch(function() {- return POOL_FALLBACKS.map(function(p) { return location.origin + p; });- });- }- return _avatarPoolP;- }-- function spawnAgent(glbUrl) {- const el = document.createElement('agent-3d');- el.classList.add('live-agent');- el.setAttribute('body', glbUrl);- for (const [k, v] of Object.entries(AGENT_ATTRS)) el.setAttribute(k, v);- return el;- }- async function fetchAvatarGlb(id) {- const r = await fetch(`${location.origin}/api/avatars/${id}`);- if (!r.ok) throw new Error('HTTP ' + r.status);- const d = await r.json();- const glb = devProxyGlb(d.avatar?.model_url || d.avatar?.url);- if (!glb) throw new Error('no model url');- return glb;- }- // The curated hero avatar can disappear (deleted, or a fresh deploy whose- // DB row hasn't been seeded yet) — fall back to a real featured avatar so- // the stage is never just an error card.- async function resolveFeaturedGlb() {- // Preferred: a curated featured avatar via the detail endpoint (richest- // metadata). Wrapped so a flaky/unavailable detail route never strands- // the hero — we drop to the explore pool below instead.- try {- const r = await fetch(`${location.origin}/api/avatars/featured?limit=12`);- if (r.ok) {- const d = await r.json();- const list = Array.isArray(d.avatars) ? d.avatars : [];- for (const a of list) {- try { return await fetchAvatarGlb(a.id); } catch (_) { /* try next */ }- }- }- } catch (_) { /* fall through to the explore pool */ }- // Fallback: the explore feed returns ready-to-render GLB URLs directly- // (and getAvatarPool degrades to bundled /avatars/*.glb), so the stage- // renders a real avatar even if the per-avatar detail endpoint is down.- const pool = await getAvatarPool();- const glb = pool.find(Boolean);- if (!glb) throw new Error('no renderable avatar found');- return glb;- }- function showHeroFallback(heroInner) {- heroInner.innerHTML = '<div class="hero-stage-fallback" role="status">'- + '<p>The live preview couldn’t load right now.</p>'- + '<button type="button" class="btn btn--sm" id="hero-retry">Retry</button></div>';- heroInner.querySelector('#hero-retry')?.addEventListener('click', () => {- heroInner.innerHTML = '';- bootHeroAvatar();- });- }- // The <agent-3d> loader is a separate CDN script — if it fails (network- // blip, missing local dist-lib build in dev), the element never upgrades- // and the stage would sit silently black. Surface the designed fallback- // instead of nothing.- function agentElementDefined(timeoutMs) {- return Promise.race([- customElements.whenDefined('agent-3d').then(() => true),- new Promise((res) => setTimeout(() => res(false), timeoutMs)),- ]);- }- // The stage's first-impression loading state: a breathing agent silhouette- // instead of a silent void while the GLB + <agent-3d> loader resolve. Shown at- // the very start of the boot, removed the instant the avatar is ready.- function heroLoadingMarkup() {- return '<div class="hero-stage-loading" role="status" aria-label="Loading the live agent preview">'- + '<svg class="hero-stage-loading-figure" viewBox="0 0 64 72" fill="currentColor" aria-hidden="true">'- + '<circle cx="32" cy="21" r="14"/><path d="M6 72c0-14.4 11.6-26 26-26s26 11.6 26 26z"/></svg>'- + '<span class="hero-stage-loading-copy">Summoning your agent<span class="dot">.</span><span class="dot">.</span><span class="dot">.</span></span>'- + '</div>';- }- function hideHeroLoading(heroInner) {- const el = heroInner?.querySelector('.hero-stage-loading');- if (!el) return;- el.classList.add('is-hiding');- setTimeout(() => el.remove(), 520);- }- async function bootHeroAvatar() {- const heroInner = document.getElementById('hero-stage-inner');- // Fill the stage immediately, before any await, so the first paint is alive.- if (heroInner) heroInner.innerHTML = heroLoadingMarkup();- try {- let glb;- try {- glb = await fetchAvatarGlb(AVATAR_ID);- } catch (_) {- glb = await resolveFeaturedGlb();- }- if (heroInner) {- if (!(await agentElementDefined(15000))) {- throw new Error('agent-3d element never registered — loader script failed');- }- const heroEl = spawnAgent(glb);- let ready = false;- // Fade the hero in on agent:ready and retire the loading silhouette in- // the same beat. Attached before the element is appended so the event- // can never be missed (a stage-level MutationObserver raced anything- // else that touched the stage first, e.g. seasonal.js injecting its- // Fireworks chip, and left the avatar stuck at opacity 0).- heroEl.addEventListener('agent:ready', () => {- ready = true;- heroEl.classList.add('loaded');- hideHeroLoading(heroInner);- }, { once: true });- // Append alongside the loading overlay (which sits on top via z-index- // and fades out on ready), so the stage never blinks back to empty- // between clearing the placeholder and the model's first frame.- heroInner.appendChild(heroEl);- initHeroWalk(heroEl);- initHeroChips(heroEl);- // Safety net: if the element upgraded but never signals ready (an- // internal GLB decode / render failure), don't leave "Summoning…" up- // forever. Surface the retryable fallback the same as a hard failure.- setTimeout(() => {- if (!ready && heroInner.querySelector('.hero-stage-loading')) showHeroFallback(heroInner);- }, 22000);- }- } catch (e) {- console.warn('[home] avatar boot failed', e);- if (heroInner) showHeroFallback(heroInner);- }- }- bootHeroAvatar();-- // ── What You Get: avatar viewer + animation gallery ────────────- (function initWygSection() {- var viewer = document.getElementById('wyg-viewer');- var scroll = document.getElementById('wyg-anim-scroll');- var stopBtn = document.getElementById('wyg-anim-stop');- var skelEl = document.getElementById('wyg-viewer-skel');- if (!viewer || !scroll) return;-- var wygAgent = null;- var activeChip = null;- var loopAnims = new Set(['idle','walk','av-walk-feminine','av-walk-crouching',- 'av-idle-breath','av-waiting','av-idle-male','av-idle-female',- 'av-vtubing','av-chilling','av-leaning-wall','av-listening-music',- 'av-smoking','sitidle','av-idle-anim']);-- var wygObs = new IntersectionObserver(function(entries) {- if (!entries[0].isIntersecting) return;- wygObs.disconnect();- bootWyg();- }, { rootMargin: '150px' });- wygObs.observe(viewer);-- function bootWyg() {- getAvatarPool()- .then(function(pool) {- var glb = pool[0];- if (!glb) return;- var el = spawnAgent(glb);- viewer.insertBefore(el, viewer.firstChild);- wygAgent = el;- el.addEventListener('agent:ready', function() {- el.classList.add('loaded');- if (skelEl) skelEl.style.display = 'none';- el.play?.('idle', { loop: true, fade_ms: 400 });- var firstChip = scroll.querySelector('[data-anim="idle"]');- if (firstChip) firstChip.dataset.active = 'true';- activeChip = firstChip;- }, { once: true });- })- .catch(function(e) { console.warn('[wyg] avatar boot failed', e); });- }-- scroll.addEventListener('click', function(e) {- var btn = e.target.closest('.wyg-anim-chip');- if (!btn || !wygAgent) return;- var clip = btn.dataset.anim;- if (!clip) return;- if (activeChip) delete activeChip.dataset.active;- btn.dataset.active = 'true';- activeChip = btn;- wygAgent.play?.(clip, { loop: loopAnims.has(clip), fade_ms: 400 });- });-- if (stopBtn) {- stopBtn.addEventListener('click', function() {- if (!wygAgent) return;- wygAgent.play?.('idle', { loop: true, fade_ms: 400 });- if (activeChip) delete activeChip.dataset.active;- var idleChip = scroll.querySelector('[data-anim="idle"]');- if (idleChip) idleChip.dataset.active = 'true';- activeChip = idleChip;- });- }- })();-- // ── Hero walk cycle ─────────────────────────────────────────────- let _heroChipActive = false;-- function initHeroWalk(heroAgent) {- const WALK_CLIP = 'av-walk-feminine';- const IDLE_CLIP = 'idle';- let active = true;- let running = false;-- // Ambient idle↔walk loop. Re-entrancy guarded so a second call (visibility- // flip, or an emote handing the avatar back) never spins up parallel timers.- async function walkCycle() {- if (running) return;- running = true;- try {- while (active && !_heroChipActive) {- await new Promise(r => setTimeout(r, 2000));- if (!active || _heroChipActive) break;- heroAgent.play?.(WALK_CLIP, { loop: true, fade_ms: 400 });- await new Promise(r => setTimeout(r, 5000));- if (!active || _heroChipActive) break;- heroAgent.play?.(IDLE_CLIP, { loop: true, fade_ms: 600 });- await new Promise(r => setTimeout(r, 3000));- }- } finally {- running = false;- }- }- // Expose the cycle so the chip handler can hand the avatar back to its rhythm.- heroAgent._heroAmbient = walkCycle;-- heroAgent.addEventListener('agent:ready', walkCycle, { once: true });- if (heroAgent._viewer) walkCycle();-- document.addEventListener('visibilitychange', () => {- active = !document.hidden;- if (active && !_heroChipActive) walkCycle();- });- }-- // Pray → walk: finish the prayer one-shot, then rise straight into a looping- // walk via a single crossfade — no snap back to idle at the clip boundary.- function playPrayToWalk(heroAgent) {- const am = heroAgent?._viewer?.animationManager;- if (am && typeof am.playOnce === 'function') {- am.playOnce('pray', { settleTo: 'av-walk-feminine', fade: 0.45 });- return;- }- // Animation manager not reachable yet: play the one-shot, then walk once it- // ends (pray clip ≈ 6.87s).- heroAgent.play?.('pray', { loop: false, fade_ms: 400 });- clearTimeout(heroAgent._prayWalkTimer);- heroAgent._prayWalkTimer = setTimeout(() => {- heroAgent.play?.('av-walk-feminine', { loop: true, fade_ms: 450 });- }, 6900);- }-- // ── Hero animation chips ─────────────────────────────────────────- function initHeroChips(heroAgent) {- const ANIMS = ['wave','dance','capoeira','jump','thriller','pray','celebrate','rumba','falling','kiss','taunt','idle'];- const chipsEl = document.getElementById('hero-chips');- const counter = document.getElementById('hero-chips-counter');- let lastAnim = null;- let moveCount = 0;-- if (!chipsEl) return;-- chipsEl.addEventListener('click', (e) => {- const btn = e.target.closest('.hero-chip');- if (!btn) return;- const animKey = btn.dataset.anim;- if (!animKey) return;-- let clip = animKey;- if (animKey === '__random') {- const pool = ANIMS.filter(a => a !== lastAnim);- clip = pool[Math.floor(Math.random() * pool.length)];- }- lastAnim = clip;-- chipsEl.querySelectorAll('.hero-chip').forEach(c => delete c.dataset.active);- btn.dataset.active = 'true';-- _heroChipActive = true;- if (clip === 'pray') {- playPrayToWalk(heroAgent);- } else {- heroAgent.play?.(clip, { loop: false, fade_ms: 400 });- }-- moveCount += 1;- if (counter) counter.innerHTML = `<strong>${moveCount}</strong> ${moveCount === 1 ? 'move' : 'moves'}`;-- // Pray runs ~6.9s then walks; hold the chip-active window longer so the- // walk reads before the ambient idle↔walk rhythm takes back over.- clearTimeout(chipsEl._resumeTimer);- chipsEl._resumeTimer = setTimeout(() => {- _heroChipActive = false;- delete btn.dataset.active;- heroAgent._heroAmbient?.();- }, clip === 'pray' ? 11000 : 6000);- });- }-- // ── Hero parallax tilt ──────────────────────────────────────────- const stage = document.getElementById('hero-stage');- const inner = document.getElementById('hero-stage-inner');- if (stage && inner && window.matchMedia('(min-width: 980px)').matches) {- let rx = 0, ry = 0, tx = 0, ty = 0;- const lerp = (a, b, t) => a + (b - a) * t;- // Cache the stage rect and refresh only on layout changes, so the hot- // mousemove path never forces a synchronous reflow per pointer event.- let r = stage.getBoundingClientRect();- const refreshRect = () => { r = stage.getBoundingClientRect(); };- window.addEventListener('resize', refreshRect, { passive: true });- window.addEventListener('scroll', refreshRect, { passive: true });- stage.addEventListener('mousemove', (e) => {- tx = ((e.clientX - r.left) / r.width - 0.5) * 6;- ty = -((e.clientY - r.top) / r.height - 0.5) * 4;- }, { passive: true });- stage.addEventListener('mouseleave', () => { tx = 0; ty = 0; });- (function tick() {- rx = lerp(rx, ty, 0.08);- ry = lerp(ry, tx, 0.08);- inner.style.transform = `perspective(1400px) rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg)`;- requestAnimationFrame(tick);- })();- }-- // ── Playground ──────────────────────────────────────────────────- (function initPlayground() {- const textarea = document.getElementById('pg-textarea');- const highlight = document.getElementById('pg-highlight');- const preview = document.getElementById('pg-preview');- const avatarRow = document.getElementById('pg-avatars');- const modeChips = document.getElementById('pg-mode-chips');- const bgChips = document.getElementById('pg-bg-chips');- const optChips = document.getElementById('pg-option-chips');- const animsEl = document.getElementById('pg-anims');- const tabsEl = document.getElementById('pg-tabs');- const copyBtn = document.getElementById('pg-copy');- if (!textarea || !preview) return;-- const state = {- avatarId: AVATAR_ID,- glbUrl: '',- mode: 'inline',- background: 'transparent',- options: { responsive: true, 'name-plate': 'off', 'avatar-chat': 'off', eager: true },- flavor: 'html',- };- let liveAgent = null;-- function genCode() {- const attrs = [];- var isDemo = state.avatarId.indexOf('avatar_demo_') === 0;- if (isDemo && state.glbUrl) {- attrs.push('body="' + state.glbUrl + '"');- } else {- attrs.push('src="https://three.ws/api/avatars/' + state.avatarId + '"');- }- if (state.mode !== 'inline') attrs.push('mode="' + state.mode + '"');- if (state.background !== 'transparent') attrs.push('background="' + state.background + '"');- for (const [k, v] of Object.entries(state.options)) {- // responsive defaults on, so disabling it must be explicit.- if (k === 'responsive') { attrs.push(v ? 'responsive' : 'responsive="false"'); continue; }- if (!v || v === 'off') continue;- attrs.push(typeof v === 'string' ? k + '="' + v + '"' : k);- }- const indent = state.flavor === 'html' ? ' ' : ' ';- const attrBlock = attrs.map(function(a) { return indent + a; }).join('\n');-- if (state.flavor === 'html') {- return '<script type="module"\n src="https://three.ws/agent-3d/latest/agent-3d.js"\n><\/script>\n\n<agent-3d\n' + attrBlock + '\n></agent-3d>';- }- if (state.flavor === 'react') {- return "import 'https://three.ws/agent-3d/latest/agent-3d.js';\n\nexport default function MyAgent() {\n return (\n <agent-3d\n" + attrBlock + "\n />\n );\n}";- }- return '<script setup>\nimport \'https://three.ws/agent-3d/latest/agent-3d.js\';\n<\/script>\n\n<template>\n <agent-3d\n' + attrBlock + '\n />\n</template>';- }-- function hl(code) {- var tokens = [];- var ph = function(cls, txt) { var id = '\x00' + tokens.length + '\x00'; tokens.push('<span class="' + cls + '">' + txt + '</span>'); return id; };- var s = code.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');- s = s.replace(/(<\/?[a-z][a-z0-9-]*)/gi, function(m) { return ph('tag', m); });- s = s.replace(/\b(import|from|export|default|function|return|const|let|var)\b/g, function(m) { return ph('kw', m); });- s = s.replace(/(\s)([a-z][a-z0-9-]*)(=)/gi, function(_, ws, name, eq) { return ws + ph('attr', name) + eq; });- s = s.replace(/("(?:[^"\\]|\\.)*?")/g, function(m) { return ph('str', m); });- s = s.replace(/(\/\/.*?)$/gm, function(m) { return ph('com', m); });- return s.replace(/\x00(\d+)\x00/g, function(_, i) { return tokens[parseInt(i)]; });- }-- function syncCode() {- var code = genCode();- textarea.value = code;- highlight.innerHTML = hl(code);- }-- // The live agent paints its own canvas, but it may not fill the preview- // frame (responsive width / aspect). Match the surrounding area to the- // chosen background so the preview reads as one surface. 'transparent'- // returns '' so the default stage backdrop shows through behind the avatar.- function resolvePreviewBg(bg) {- if (bg === 'transparent') return '';- if (bg === 'dark') return '#0d0d0d';- if (bg === 'light') return '#f5f5f5';- return bg;- }-- function setLiveOption(k, v) {- // String-valued options (name-plate, avatar-chat) must be reflected- // explicitly — the component hides the plate only on `name-plate="off"`,- // not on the attribute's absence, so removing it would leave it visible.- if (typeof v === 'string') liveAgent.setAttribute(k, v);- else if (v) liveAgent.setAttribute(k, '');- else liveAgent.removeAttribute(k);- }-- function showPreviewMessage() {- if (preview.querySelector('.pg-preview-msg')) return;- var msg = document.createElement('div');- msg.className = 'pg-preview-msg';- msg.setAttribute('role', 'status');- msg.innerHTML = 'Couldn\'t load a live avatar right now.<br /><a href="/gallery">Browse the gallery</a> or pick another avatar below.';- preview.appendChild(msg);- }- function clearPreviewMessage() {- var msg = preview.querySelector('.pg-preview-msg');- if (msg) msg.remove();- }- function updatePreview() {- if (!state.glbUrl) { showPreviewMessage(); return; }- clearPreviewMessage();- // `kiosk` and `eager` are read once at boot (not observed attributes),- // so a change to either requires recreating the element. kiosk is tied- // to the chat toggle: with chat on we drop kiosk so the chat chrome- // renders; with chat off we keep kiosk for a clean avatar-only tile.- var wantKiosk = state.options['avatar-chat'] !== 'on';- var wantEager = !!state.options.eager;- var needsRebuild = !liveAgent- || liveAgent.hasAttribute('kiosk') !== wantKiosk- || liveAgent.hasAttribute('eager') !== wantEager;- if (needsRebuild) {- if (liveAgent) liveAgent.remove();- liveAgent = document.createElement('agent-3d');- if (wantKiosk) liveAgent.setAttribute('kiosk', '');- if (wantEager) liveAgent.setAttribute('eager', '');- liveAgent.setAttribute('body', state.glbUrl);- preview.appendChild(liveAgent);- } else {- liveAgent.setAttribute('body', state.glbUrl);- }- liveAgent.setAttribute('mode', state.mode);- liveAgent.setAttribute('background', state.background);- // Runtime-observed surface attributes — applied live without a reboot.- // `responsive` is off only when explicitly "false"; an absent attribute- // defaults to responsive-on, so we must set the literal value.- liveAgent.setAttribute('responsive', state.options.responsive ? '' : 'false');- setLiveOption('name-plate', state.options['name-plate']);- setLiveOption('avatar-chat', state.options['avatar-chat']);- preview.style.backgroundColor = resolvePreviewBg(state.background);- }-- function fetchGlb(id) {- return fetch(location.origin + '/api/avatars/' + id)- .then(function(r) { return r.json(); })- .then(function(d) { return devProxyGlb(d.avatar && (d.avatar.model_url || d.avatar.url)) || ''; })- // The per-avatar detail endpoint can be unavailable; rather than- // strand the preview on a blank model, borrow a real, renderable- // GLB from the explore-backed pool so the playground always shows- // a live agent.- .catch(function() {- return getAvatarPool().then(function(pool) { return pool.find(Boolean) || ''; }).catch(function() { return ''; });- });- }-- function switchAvatar(id, directGlb) {- state.avatarId = id;- avatarRow.querySelectorAll('.pg-avatar-item').forEach(function(el) {- el.classList.toggle('active', el.dataset.id === id);- });- var resolve = directGlb- ? Promise.resolve(devProxyGlb(directGlb))- : fetchGlb(id);- resolve.then(function(glb) {- state.glbUrl = glb;- syncCode();- if (liveAgent) { liveAgent.remove(); liveAgent = null; }- updatePreview();- }).catch(function() { showPreviewMessage(); });- }-- function renderAvatars(list) {- avatarRow.innerHTML = '';- list.forEach(function(a) {- var btn = document.createElement('button');- btn.className = 'pg-avatar-item' + (a.id === state.avatarId ? ' active' : '');- btn.dataset.id = a.id;- if (a.glb) btn.dataset.glb = a.glb;- btn.title = a.name || a.id.slice(0, 8);- var initial = document.createElement('span');- initial.className = 'pg-avatar-initial';- initial.textContent = (a.name || '?').charAt(0);- btn.appendChild(initial);- if (a.thumb) {- var img = document.createElement('img');- img.src = a.thumb;- img.alt = a.name || '';- img.loading = 'lazy';- img.onerror = function() { this.style.display = 'none'; initial.style.display = 'flex'; };- btn.appendChild(img);- } else {- initial.style.display = 'flex';- }- btn.addEventListener('click', function() { switchAvatar(a.id, a.glb); });- avatarRow.appendChild(btn);- });- }-- function loadAvatars() {- var O = location.origin;- var defaults = [- { id: 'avatar_demo_disk_cz', name: 'CZ', glb: O + '/avatars/cz.glb' },- { id: 'avatar_demo_disk_ansem', name: 'Ansem', glb: O + '/avatars/default.glb' },- { id: 'avatar_demo_disk_boss_vernington', name: 'Boss Vernington', glb: O + '/animations/soldier.glb' },- { id: 'avatar_demo_disk_goblin', name: 'Goblin', glb: O + '/animations/robotexpressive.glb' },- { id: 'avatar_demo_disk_claude', name: 'Claude', glb: O + '/avatars/default.glb' },- { id: 'avatar_demo_disk_agent', name: 'Agent', glb: O + '/animations/soldier.glb' },- { id: 'avatar_demo_disk_ai', name: 'AI', glb: O + '/animations/robotexpressive.glb' },- ];- renderAvatars(defaults);- // Source the picker from the explore feed, which returns a ready-to-render- // glbUrl per avatar. Carrying the GLB on each chip means selecting one- // uses the direct-GLB path in switchAvatar and never depends on the- // per-avatar detail endpoint.- fetch(O + '/api/explore?source=avatar&only3d=1&limit=24&quality=high', { headers: { accept: 'application/json' } })- .then(function(r) { return r.json(); })- .then(function(d) {- var items = (Array.isArray(d.items) ? d.items : []).filter(function(it) { return it.glbUrl && it.avatarId; });- // The explore feed is newest-first, and a freshly forged avatar rarely has- // a thumbnail yet — left alone they monopolise the strip and every chip- // renders as a bare initial. Stable-partition thumbnailed avatars to the- // front so the picker shows what you're selecting; the rest still fill any- // slots left over.- items = items.filter(function(it) { return it.image; })- .concat(items.filter(function(it) { return !it.image; }));- var list = defaults.slice();- var seen = {};- defaults.forEach(function(da) { seen[da.id] = true; });- items.forEach(function(item) {- var id = item.avatarId;- if (!id || seen[id]) return;- seen[id] = true;- list.push({- id: id,- name: item.name || '',- glb: devProxyGlb(item.glbUrl),- // `image` is the avatar's stored thumbnail URL, or null when it has- // none. Pass the null straight through — renderAvatars() then draws- // the initial-letter chip. Never synthesise a thumb/<id>.png URL as- // a fallback: that object was never written, so R2 answers 404 with- // a text/plain body and Chrome blocks it (ERR_BLOCKED_BY_ORB).- thumb: item.image || null,- });- });- renderAvatars(list.slice(0, 14));- }).catch(function() {});- }-- function chipSelect(container, cb) {- container.addEventListener('click', function(e) {- var chip = e.target.closest('.pg-chip');- if (!chip) return;- container.querySelectorAll('.pg-chip').forEach(function(c) { c.classList.remove('active'); });- chip.classList.add('active');- cb(chip);- });- }-- chipSelect(modeChips, function(chip) {- state.mode = chip.dataset.val;- syncCode(); updatePreview();- });-- var colorTrigger = document.getElementById('pg-color-trigger');- var colorPopover = document.getElementById('pg-color-popover');- var colorSwatches = document.getElementById('pg-color-swatches');- var colorHexInput = document.getElementById('pg-color-hex');- var colorPreview = document.getElementById('pg-color-preview');-- var palette = [- '#1b1b1b','#212121','#0f3460','#533483','#e94560','#ff6b6b',- '#ffa07a','#ffd93d','#6bcb77','#4d96ff','#845ec2','#d65db1',- '#333333','#636e72','#b2bec3','#dfe6e9','#fdcb6e','#e17055',- '#00b894','#00cec9','#0984e3','#6c5ce7','#fd79a8','#e84393',- ];-- palette.forEach(function(hex) {- var btn = document.createElement('button');- btn.className = 'pg-color-swatch';- btn.style.background = hex;- btn.dataset.color = hex;- btn.setAttribute('aria-label', hex);- colorSwatches.appendChild(btn);- });-- function applyPickedColor(hex) {- state.background = hex;- colorTrigger.classList.add('active', 'has-color');- colorTrigger.style.setProperty('--pg-picked-color', hex);- colorPreview.style.background = hex;- colorHexInput.value = hex;- bgChips.querySelectorAll('.pg-chip').forEach(function(c) { c.classList.remove('active'); });- colorSwatches.querySelectorAll('.pg-color-swatch').forEach(function(s) {- s.classList.toggle('active', s.dataset.color === hex);- });- syncCode(); updatePreview();- }-- chipSelect(bgChips, function(chip) {- state.background = chip.dataset.val;- colorTrigger.classList.remove('active', 'has-color');- colorPopover.classList.remove('open');- colorSwatches.querySelectorAll('.pg-color-swatch').forEach(function(s) { s.classList.remove('active'); });- syncCode(); updatePreview();- });-- var popoverMoved = false;- function positionPopover() {- var rect = colorTrigger.getBoundingClientRect();- var pw = 220;- var left = rect.left + rect.width / 2 - pw / 2;- if (left < 8) left = 8;- if (left + pw > window.innerWidth - 8) left = window.innerWidth - 8 - pw;- colorPopover.style.position = 'fixed';- colorPopover.style.transform = 'none';- colorPopover.style.top = (rect.bottom + 8) + 'px';- colorPopover.style.left = left + 'px';- }-- colorTrigger.addEventListener('click', function(e) {- e.stopPropagation();- if (!popoverMoved) {- document.body.appendChild(colorPopover);- popoverMoved = true;- }- positionPopover();- colorPopover.classList.toggle('open');- });-- window.addEventListener('scroll', function() {- if (colorPopover.classList.contains('open')) positionPopover();- }, { passive: true });- window.addEventListener('resize', function() {- if (colorPopover.classList.contains('open')) positionPopover();- });-- colorSwatches.addEventListener('click', function(e) {- var swatch = e.target.closest('.pg-color-swatch');- if (!swatch) return;- applyPickedColor(swatch.dataset.color);- });-- colorHexInput.addEventListener('input', function() {- var v = colorHexInput.value.trim();- if (!v.startsWith('#')) v = '#' + v;- if (/^#[0-9a-fA-F]{6}$/.test(v)) applyPickedColor(v);- });-- colorHexInput.addEventListener('keydown', function(e) {- if (e.key === 'Enter') {- var v = colorHexInput.value.trim();- if (!v.startsWith('#')) v = '#' + v;- if (/^#[0-9a-fA-F]{6}$/.test(v)) {- applyPickedColor(v);- colorPopover.classList.remove('open');- }- }- });-- document.addEventListener('click', function(e) {- if (!colorPopover.contains(e.target) && e.target !== colorTrigger) {- colorPopover.classList.remove('open');- }- });-- optChips.addEventListener('click', function(e) {- var chip = e.target.closest('.pg-chip');- if (!chip) return;- var attr = chip.dataset.attr;- var isOn = chip.classList.toggle('active');- state.options[attr] = isOn ? (chip.dataset.val || true) : (chip.dataset.val ? 'off' : false);- syncCode(); updatePreview();- });-- tabsEl.addEventListener('click', function(e) {- var tab = e.target.closest('.pg-tab');- if (!tab) return;- state.flavor = tab.dataset.flavor;- tabsEl.querySelectorAll('.pg-tab').forEach(function(t) { t.classList.toggle('active', t === tab); });- syncCode();- });-- var editDebounce = null;- textarea.addEventListener('input', function() {- highlight.innerHTML = hl(textarea.value);- clearTimeout(editDebounce);- editDebounce = setTimeout(function() {- var code = textarea.value;- var m = code.match(/<agent-3d([^>]*?)(?:\/>|>)/i);- if (!m) return;- var as = m[1];- var ga = function(n) { var x = as.match(new RegExp(n + '="([^"]*)"', 'i')); return x ? x[1] : null; };- var ha = function(n) { return new RegExp('\\b' + n + '\\b', 'i').test(as); };- var src = ga('src');- if (src) {- var idm = src.match(/avatars\/([a-f0-9-]+)/);- if (idm && idm[1] !== state.avatarId) { switchAvatar(idm[1]); return; }- }- var mode = ga('mode');- if (mode && mode !== state.mode) state.mode = mode;- var bg = ga('background');- if (bg !== null) state.background = bg;- state.options.responsive = ga('responsive') !== 'false';- state.options['name-plate'] = ga('name-plate') === 'on' ? 'on' : 'off';- state.options['avatar-chat'] = ga('avatar-chat') === 'on' ? 'on' : 'off';- state.options.eager = ha('eager');- updatePreview();- }, 350);- });-- textarea.addEventListener('scroll', function() {- highlight.scrollTop = textarea.scrollTop;- highlight.scrollLeft = textarea.scrollLeft;- });-- textarea.addEventListener('keydown', function(e) {- if (e.key === 'Tab') {- e.preventDefault();- var s = textarea.selectionStart, end = textarea.selectionEnd;- textarea.value = textarea.value.substring(0, s) + ' ' + textarea.value.substring(end);- textarea.selectionStart = textarea.selectionEnd = s + 2;- textarea.dispatchEvent(new Event('input'));- }- });-- copyBtn.addEventListener('click', function() {- navigator.clipboard.writeText(textarea.value).then(function() {- copyBtn.classList.add('copied');- copyBtn.textContent = 'Copied';- setTimeout(function() { copyBtn.classList.remove('copied'); copyBtn.textContent = 'Copy'; }, 1600);- }).catch(function() {- copyBtn.textContent = 'Copy blocked';- setTimeout(function() { copyBtn.textContent = 'Copy'; }, 1600);- });- });-- animsEl.addEventListener('click', function(e) {- var btn = e.target.closest('.pg-anim');- if (!btn || !liveAgent) return;- var clip = btn.dataset.anim;- if (liveAgent.play) liveAgent.play(clip, { loop: clip === 'idle', fade_ms: 400 });- animsEl.querySelectorAll('.pg-anim').forEach(function(c) { c.classList.remove('active'); });- btn.classList.add('active');- if (clip !== 'idle') {- clearTimeout(animsEl._t);- animsEl._t = setTimeout(function() { btn.classList.remove('active'); }, 5000);- }- });-- fetchGlb(state.avatarId).then(function(glb) {- state.glbUrl = glb;- syncCode();- updatePreview();- loadAvatars();- }).catch(function() { showPreviewMessage(); });- })();-- // ── Showcase 3D — live agent grid ──────────────────────────────- (function () {- const SHOWCASE_ANIMS = ['idle', 'dance', 'wave', 'celebrate', 'capoeira', 'thriller'];- const SHOWCASE_TAGS = ['3D', 'animated', 'rigged', 'ERC-8004', 'pay-per-call', 'community'];- // Pull real public 3D avatars (each a distinct GLB). source=all is dominated- // by GLB-less on-chain registrations, which would fall through to duplicated- // placeholder models — so we ask the avatar source for 3D rows only, then- // dedupe by model + name and take the first 6 unique ones.- const EXPLORE_SHOWCASE_URL = '/api/explore?source=avatar&only3d=1&category=avatar,creature&limit=24&quality=high';- const grid = document.getElementById('showcase-3d-grid');- if (!grid) return;-- function hashHue(str) {- var h = 0;- for (var i = 0; i < str.length; i++) h = (h * 31 + str.charCodeAt(i)) >>> 0;- return h % 360;- }-- function makeAgentCard(item, idx) {- var card = document.createElement('a');- card.className = 'showcase-agent-card';- card.href = item.viewerUrl || ('/avatars/' + (item.avatarId || item.agentId));-- var h = hashHue(item.avatarId || item.agentId || item.name || String(idx));- var h2 = (h + 50) % 360;- var grad = document.createElement('div');- grad.className = 'showcase-card-grad';- grad.style.background = 'radial-gradient(ellipse at 50% 80%, hsl(' + h + ' 60% 18% / 0.6) 0%, hsl(' + h2 + ' 50% 6% / 0.3) 70%, transparent 100%)';- card.appendChild(grad);-- var skel = document.createElement('div');- skel.className = 'showcase-card-skel';- skel.innerHTML = '<div class="showcase-card-skel-ring"></div>';- card.appendChild(skel);-- var floor = document.createElement('div');- floor.className = 'showcase-card-floor';- card.appendChild(floor);-- var glbUrl = item.glbUrl || '';- if (glbUrl) {- glbUrl = devProxyGlb(glbUrl);- } else if (item.avatarId) {- (async function() {- try {- var r = await fetch('/api/avatars/' + item.avatarId);- var d = await r.json();- var url = devProxyGlb(d.avatar?.model_url || d.avatar?.url);- if (url) bootAgent(card, skel, url, idx);- } catch (_) {}- })();- }+ <button class="foot-ca" id="foot-ca-btn" title="Copy contract address" data-i18n-html="home.three_fembdox7r1psc4gecvjdsbnbza3bfztcydcatj" data-i18n-attr="title:home.copy_contract_address_title">+ <span class="foot-ca-label">$THREE</span>+ <span class="foot-ca-addr" id="foot-ca-addr">FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump</span>+ </button>+ </div>+ </div>+</footer>- if (item.kind === 'onchain') {- var tag = document.createElement('span');- tag.className = 'showcase-card-tag';- tag.textContent = 'Blockchain';- card.appendChild(tag);- } else if (idx === 0) {- var ftag = document.createElement('span');- ftag.className = 'showcase-card-tag';- ftag.textContent = 'Featured';- card.appendChild(ftag);- }+<script type="module">+ // Dynamic import inside the observer callback — a static import would put+ // Three.js + GLTFLoader in the home entry's critical bundle even though the+ // section is far below the fold. The module (and its GLB fetch) only loads+ // when the user scrolls within 200px of the section.+ const dropSection = document.getElementById('body-drop');+ if (dropSection) {+ const io = new IntersectionObserver(async entries => {+ if (!entries[0].isIntersecting) return;+ io.disconnect();+ try {+ const { initAvatarDrop } = await import('/src/avatar-drop.js');+ initAvatarDrop(dropSection);+ } catch {}+ }, { rootMargin: '200px' });+ io.observe(dropSection);+ }+</script>- var animLabel = document.createElement('span');- animLabel.className = 'showcase-card-anim-tag';- animLabel.textContent = SHOWCASE_TAGS[idx % SHOWCASE_TAGS.length];- card.appendChild(animLabel);+<script type="module">+ // Same deferral as the body-drop section above: the walk preview pulls+ // Three.js, RoomEnvironment, nipplejs, and a rigged GLB — none of which+ // belong in first paint. Load it all when the section approaches the+ // viewport.+ const walkContainer = document.getElementById('walk-preview-container');+ if (walkContainer) {+ const io = new IntersectionObserver(async entries => {+ if (!entries[0].isIntersecting) return;+ io.disconnect();+ try {+ const { initWalkPreview } = await import('/src/walk-embed-preview.js');+ initWalkPreview(walkContainer);+ } catch {}+ }, { rootMargin: '200px' });+ io.observe(walkContainer);+ }+</script>- var meta = document.createElement('div');- meta.className = 'showcase-card-meta';- meta.innerHTML = '<div class="showcase-card-name">' + escHtml(item.name || 'Agent') + '</div>'- + '<div class="showcase-card-sub">' + escHtml(item.description ? item.description.slice(0, 50) : (item.kind === 'onchain' ? 'ERC-8004' : 'GLB')) + '</div>';- card.appendChild(meta);+<script type="module">+ // Live pump.fun token card + real "Launch yours" flow.+ import { initHomeLiveToken } from '/src/home-live-token.js';+ import { initHomepageLauncher } from '/src/pump/homepage-launcher.js';+ const hltCard = document.getElementById('hlt-card');+ if (hltCard) initHomeLiveToken(hltCard);+ initHomepageLauncher(document.getElementById('hlt-launch'));+</script>- if (glbUrl) bootAgent(card, skel, glbUrl, idx);+<script type="module">+ // Oracle conviction mini-feed on home page.+ // Fetches top scoring coins from /api/oracle/feed and renders compact cards+ // showing ticker, score, tier pill, and four pillar bars.+ (async function initHomeOracle() {+ const hocItems = document.getElementById('hoc-items');+ if (!hocItems) return;- return card;- }+ const PIL_COLOR = { pedigree: '#5fe3ff', structure: '#34d399', narrative: '#a07bff', momentum: '#fbbf24' };+ const TIER_LABEL = { prime: 'PRIME', strong: 'STRONG', lean: 'LEAN', watch: 'WATCH', avoid: 'AVOID' };+ const tc = (t) => `t-${t || 'watch'}`;- function bootAgent(card, skel, glbUrl, idx) {- var el = document.createElement('agent-3d');- el.setAttribute('body', glbUrl);- el.setAttribute('mode', 'inline');- el.setAttribute('responsive', '');- el.setAttribute('background', 'transparent');- el.setAttribute('name-plate', 'off');- el.setAttribute('avatar-chat', 'off');- el.setAttribute('kiosk', '');- card.insertBefore(el, skel);-- el.addEventListener('agent:ready', function () {- el.classList.add('loaded');- if (skel && skel.parentNode) skel.remove();- var anim = SHOWCASE_ANIMS[idx % SHOWCASE_ANIMS.length];- if (anim !== 'idle') {- el.play?.(anim, { loop: true, fade_ms: 600 });- }- }, { once: true });- }+ function miniCard(it) {+ const tier = it.tier || 'watch';+ const score = Math.round(it.score ?? 0);+ const p = it.pillars || {};+ const bars = ['pedigree','structure','narrative','momentum'].map(k =>+ `<div class="hoc-pillar"><div class="hoc-pillar-fill" style="width:${Math.max(0,Math.min(100,p[k]||0))}%;background:${PIL_COLOR[k]}"></div></div>`+ ).join('');+ const sym = (it.symbol || '?').toUpperCase();+ const name = it.name || it.mint.slice(0, 8);- function makeCta(href, icon, label, sub) {- var a = document.createElement('a');- a.className = 'showcase-cta-card';- a.href = href;- a.innerHTML = '<span class="showcase-cta-icon">' + icon + '</span>'- + '<span class="showcase-cta-label">' + label + '</span>'- + '<span class="showcase-cta-sub">' + sub + '</span>';+ const a = document.createElement('a');+ a.className = 'hoc-item';+ a.href = `/oracle/coin/${encodeURIComponent(it.mint)}`;+ a.setAttribute('aria-label', `$${sym} — ${score} conviction, ${tier} tier`);+ a.innerHTML = `+ <div class="hoc-score ${tc(tier)}">${score}</div>+ <div class="hoc-info">+ <div class="hoc-sym">$${sym}</div>+ <div class="hoc-name">${name}</div>+ <div class="hoc-pillars">${bars}</div>+ </div>+ <span class="hoc-tier ${tc(tier)}">${TIER_LABEL[tier] || tier.toUpperCase()}</span>`;return a;}- function escHtml(s) {- var d = document.createElement('span');- d.textContent = s;- return d.innerHTML;- }-- // Drop repeats so every showcase card is a distinct character: collapse on- // both the underlying model (glbUrl/avatarId) and the display name.- function dedupeAgents(list) {- var seen = Object.create(null);- return list.filter(function (it) {- var modelKey = String(it.glbUrl || it.avatarId || '').toLowerCase();- var nameKey = String(it.name || '').trim().toLowerCase();- if (modelKey && seen['m:' + modelKey]) return false;- if (nameKey && seen['n:' + nameKey]) return false;- if (modelKey) seen['m:' + modelKey] = true;- if (nameKey) seen['n:' + nameKey] = true;- return true;- });- }-- function renderShowcase(agentItems) {- agentItems.forEach(function (item, i) {- grid.appendChild(makeAgentCard(item, i));- });- grid.appendChild(makeCta('/discover', '→', 'Browse all', 'Public agent directory'));- grid.appendChild(makeCta('/create', '✨', 'Make your own', 'Selfie → agent · 60s'));- }-- var showcaseBooted = false;- var showcaseObs = new IntersectionObserver(function (entries) {- if (!entries[0].isIntersecting || showcaseBooted) return;- showcaseBooted = true;- showcaseObs.disconnect();-- fetch(EXPLORE_SHOWCASE_URL, { headers: { accept: 'application/json' } })- .then(function (r) { return r.json(); })- .then(function (data) {- var items = Array.isArray(data.items) ? data.items : [];- var agentItems = dedupeAgents(items.filter(function (it) { return it.glbUrl || it.avatarId; })).slice(0, 6);- // Real avatars only. If the feed is thin or empty the grid- // degrades to its two CTA cards (Browse all / Make your own) —- // never to fabricated demo agents.- renderShowcase(agentItems);- })- .catch(function () {- renderShowcase([]);- });- }, { rootMargin: '200px' });- showcaseObs.observe(grid);- })();-- // ── Vclose section ──────────────────────────────────────────────- (async () => {try {- const pool = await getAvatarPool();- const glb = pool[1];- if (!glb) return;-- const slot = document.getElementById('vclose-agent-slot');- if (!slot) return;- const vcloseEl = document.createElement('agent-3d');- vcloseEl.id = 'vclose-agent';- vcloseEl.className = 'vclose-agent';- vcloseEl.setAttribute('body', glb);- vcloseEl.setAttribute('mode', 'inline');- vcloseEl.setAttribute('responsive', '');- vcloseEl.setAttribute('background', 'transparent');- vcloseEl.setAttribute('name-plate', 'off');- vcloseEl.setAttribute('avatar-chat', 'off');- vcloseEl.setAttribute('kiosk', '');- slot.replaceWith(vcloseEl);-- let vcloseInited = false;- const ANIMS = ['wave','dance','capoeira','jump','thriller','pray','celebrate','rumba','falling','kiss','taunt'];- let vcloseLast = null;-- function vcloseReady() {- if (vcloseInited) return;- vcloseInited = true;- vcloseEl.classList.add('loaded');- vcloseEl.play?.('idle', { loop: true, fade_ms: 400 });- }- vcloseEl.addEventListener('agent:ready', vcloseReady, { once: true });-- const vcloseChips = document.getElementById('vclose-chips');- if (vcloseChips) {- vcloseChips.addEventListener('click', (e) => {- const btn = e.target.closest('.hero-chip');- if (!btn) return;- let clip = btn.dataset.anim;- if (clip === '__random') {- const pool = ANIMS.filter(a => a !== vcloseLast);- clip = pool[Math.floor(Math.random() * pool.length)];- }- vcloseLast = clip;- vcloseChips.querySelectorAll('.hero-chip').forEach(c => delete c.dataset.active);- btn.dataset.active = 'true';- vcloseEl.play?.(clip, { loop: false, fade_ms: 400 });- clearTimeout(vcloseChips._timer);- vcloseChips._timer = setTimeout(() => delete btn.dataset.active, 6000);- });- }-- const vcloseSection = document.getElementById('vclose');- if (vcloseSection) {- const io = new IntersectionObserver((entries) => {- if (entries[0].isIntersecting && !vcloseInited) {- vcloseReady();- }- }, { threshold: 0, rootMargin: '200px' });- io.observe(vcloseSection);+ const r = await fetch('/api/oracle/feed?network=mainnet&limit=6&min_score=56');+ if (!r.ok) throw new Error(r.status);+ const data = await r.json();+ const items = (data.items || []).sort((a, b) => b.score - a.score).slice(0, 3);+ hocItems.className = '';+ hocItems.innerHTML = '';+ if (!items.length) {+ hocItems.innerHTML = '<div style="padding:32px 16px;text-align:center;color:var(--text-3);font-size:13px">Oracle is warming up — scores arrive live as new coins surface.</div>';+ return;}- } catch (e) {- console.warn('[home] vclose avatar boot failed', e);- }- })();-- // ── Reveal on scroll (IntersectionObserver) ────────────────────- {- const revealEls = document.querySelectorAll('.reveal');- if (revealEls.length) {- const revealObs = new IntersectionObserver((entries) => {- entries.forEach((entry) => {- if (entry.isIntersecting) {- entry.target.classList.add('vis');- revealObs.unobserve(entry.target);- }- });- }, { threshold: 0.08, rootMargin: '0px 0px -40px 0px' });- revealEls.forEach((el) => revealObs.observe(el));- }- }-- // ── Hero text entrance ──────────────────────────────────────────- requestAnimationFrame(() => {- const heroText = document.querySelector('.hero-text');- if (heroText) heroText.classList.add('entered');- });-- // ── 3D Stack section: mouse-tracked perspective + spotlight ─────- {- const scene = document.getElementById('stack-3d-scene');- const wrap = document.getElementById('stack-3d');- if (scene && wrap && window.matchMedia('(min-width: 601px)').matches- && !window.matchMedia('(prefers-reduced-motion: reduce)').matches) {- let rx = 0, ry = 0, tx = 0, ty = 0;- const lerp = (a, b, t) => a + (b - a) * t;-- wrap.addEventListener('mousemove', (e) => {- const r = wrap.getBoundingClientRect();- const nx = (e.clientX - r.left) / r.width;- const ny = (e.clientY - r.top) / r.height;- tx = (nx - 0.5) * 8;- ty = -(ny - 0.5) * 5;- });- wrap.addEventListener('mouseleave', () => { tx = 0; ty = 0; });-- (function tick() {- rx = lerp(rx, ty, 0.06);- ry = lerp(ry, tx, 0.06);- scene.style.transform =- `rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg)`;- requestAnimationFrame(tick);- })();-- // Cache the card list + rects once and batch CSS-var writes into a- // single rAF per frame, so the glow no longer forces a layout read per- // card on every mousemove (the landing page's worst thrash hot path).- const glowCards = Array.from(scene.querySelectorAll('.stack-card'));- let glowRects = glowCards.map((c) => c.getBoundingClientRect());- const refreshGlowRects = () => { glowRects = glowCards.map((c) => c.getBoundingClientRect()); };- window.addEventListener('resize', refreshGlowRects, { passive: true });- window.addEventListener('scroll', refreshGlowRects, { passive: true });- let glowX = 0, glowY = 0, glowPending = false;- scene.addEventListener('mousemove', (e) => {- glowX = e.clientX; glowY = e.clientY;- if (glowPending) return;- glowPending = true;- requestAnimationFrame(() => {- glowPending = false;- for (let i = 0; i < glowCards.length; i++) {- const cr = glowRects[i];- glowCards[i].style.setProperty('--mx', (glowX - cr.left) + 'px');- glowCards[i].style.setProperty('--my', (glowY - cr.top) + 'px');- }- });- }, { passive: true });- }-- if (wrap) {- setTimeout(() => wrap.classList.add('settled'), 800);- }- }--- // ── Live feature agents ─────────────────────────────────────────- (function initLiveFeatures() {- var O = location.origin;- // `clip` is declarative: the <agent-3d> component honors each clip's- // manifest loop flag automatically — one-shots (wave) play once and settle- // into idle, loops (rumba/idle) loop seamlessly. No forced loop, so the old- // celebrate hard-snap is gone. `framing="portrait"` crops head-to-mid-thigh- // so the avatar fills the card instead of standing tiny-and-low.- //- // Portrait framing sizes the camera to the avatar's *load-time* bounding box- // (before any retargeted clip applies), so the body MUST ship arms-down at- // rest. T-pose-authored rigs (michelle, xbot — arms stretched horizontally)- // blow up the box width, push the camera far back, and leave a tiny figure- // stranded at the bottom of the card. Use rest-arms-down bodies here:- // default.glb and cz.glb (both in the curated portrait-safe POOL_FALLBACKS).- var LIVE_SPOTS = [- { id: 'door-create', clip: 'wave', framing: 'portrait', glb: O + '/avatars/default.glb' },- { id: 'door-embed', clip: 'rumba', framing: 'portrait', glb: O + '/avatars/cz.glb' },- { id: 'bento-studio', clip: 'idle', framing: 'portrait', glb: null },- { id: 'bento-anim', clip: 'idle', framing: 'full', glb: null }- ];-- function spawnMini(container, glb, opts) {- var el = document.createElement('agent-3d');- el.setAttribute('body', glb);- el.setAttribute('mode', 'inline');- el.setAttribute('responsive', '');- el.setAttribute('background', 'transparent');- el.setAttribute('name-plate', 'off');- el.setAttribute('avatar-chat', 'off');- el.setAttribute('kiosk', '');- if (opts.clip) el.setAttribute('clip', opts.clip);- if (opts.framing) el.setAttribute('framing', opts.framing);- el.setAttribute('eager', '');- container.appendChild(el);- // The component autoplays the declared clip with the polished embed- // defaults (skeleton load state, loop-honoring + one-shot→idle settle,- // reduced-motion static pose, offscreen render pause). No ready hook.- return el;- }-- // Assign unique pool avatars to spots that don't have a hardcoded local GLB.- // pool[0] and pool[1] are reserved for WYG and vclose; null spots start at pool[2].- getAvatarPool()- .then(function(pool) {- var nullIdx = 2;- LIVE_SPOTS.forEach(function(spot) {- if (!spot.glb) {- spot.glb = pool[nullIdx++ % pool.length];- }- });- var io = new IntersectionObserver(function(entries) {- entries.forEach(function(entry) {- if (!entry.isIntersecting) return;- var spot = LIVE_SPOTS.find(function(s) { return s.id === entry.target.id; });- if (!spot || entry.target.querySelector('agent-3d')) return;- io.unobserve(entry.target);- spawnMini(entry.target, spot.glb, spot);- });- }, { rootMargin: '150px' });- LIVE_SPOTS.forEach(function(spot) {- var el = document.getElementById(spot.id);- if (el) io.observe(el);- });- }).catch(function() {});-- // Bento animation pills- var animPills = document.getElementById('bento-anim-pills');- if (animPills) {- animPills.addEventListener('click', function(e) {- var btn = e.target.closest('.bento-pill-btn');- if (!btn) return;- e.preventDefault(); e.stopPropagation();- var clip = btn.dataset.anim;- var agent = document.querySelector('#bento-anim agent-3d');- // Explicit user gesture → playClip honors the clip's loop flag,- // settles one-shots into idle, and is allowed to animate even under- // reduced motion. Fall back to play() on older bundles.- if (agent && agent.playClip) agent.playClip(clip, { userInitiated: true });- else if (agent && agent.play) agent.play(clip, { loop: clip === 'idle', fade_ms: 400 });- animPills.querySelectorAll('.bento-pill-btn').forEach(function(p) { p.classList.remove('active'); });- btn.classList.add('active');- });- }-- // Earn door — one-time count-up reveal of an illustrative example figure.- // The number is labeled "example earnings" in the markup; it is not live- // platform data (real earnings live behind auth on /dashboard/monetize).- var earnVal = document.getElementById('door-earn-val');- var earnViz = document.getElementById('door-earn-viz');- if (earnVal) {- var started = false;- var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;- var EARN_EXAMPLE = 128.40;- var earnObs = new IntersectionObserver(function(entries) {- if (!entries[0].isIntersecting || started) return;- started = true; earnObs.disconnect();- if (earnViz) earnViz.classList.add('is-live');-- if (reduceMotion) {- earnVal.textContent = '$' + EARN_EXAMPLE.toFixed(2);- return;- }- var val = 0;- (function tick() {- val += (EARN_EXAMPLE - val) * 0.025;- if (val >= EARN_EXAMPLE - 0.01) val = EARN_EXAMPLE;- earnVal.textContent = '$' + val.toFixed(2);- if (val < EARN_EXAMPLE) requestAnimationFrame(tick);- })();- }, { threshold: 0.35 });- earnObs.observe(earnVal);+ items.forEach(it => hocItems.appendChild(miniCard(it)));+ } catch {+ hocItems.className = '';+ hocItems.innerHTML = '<div style="padding:28px 16px;text-align:center"><a class="btn btn--sm" href="/oracle">Open Oracle →</a></div>';}})();</script>++<script type="module" src="/src/home-live-agents.js"></script><script type="module" src="/src/api-playground.js"></script><script type="module" src="/src/economy-ticker.js"></script><script type="module" src="/src/home-sniper.js"></script>@@ -7490,772 +3543,7 @@}</script><script type="module" src="/dragon-section.js"></script>-<script>-// ── Interactive Bento Features ─────────────────────────────────────-(function initBentoInteractives() {-- // ── 1. Avatar Studio: capture a real photo, hand it to the real flow ──- // This is a teaser. It does NOT fabricate a build — it captures the- // visitor's photo, stashes it for the real selfie pipeline, and sends- // them to /create-selfie where the actual reconstruction runs. The photo- // is downscaled before storage so it fits comfortably in sessionStorage.- (function() {- var HANDOFF_KEY = 'threews:selfie-handoff';- var MAX_DIM = 1024;-- var drop = document.getElementById('studio-drop');- var fileInput = document.getElementById('studio-file');- var webcamBtn = document.getElementById('studio-webcam-btn');- var zone = document.getElementById('studio-zone');- var ready = document.getElementById('studio-ready');- var previewImg = document.getElementById('studio-preview-img');- var resetBtn = document.getElementById('studio-reset');- var errorEl = document.getElementById('studio-error');- if (!drop) return;-- function showError(msg) {- if (!errorEl) return;- errorEl.textContent = msg;- errorEl.classList.add('show');- errorEl.hidden = false;- }- function clearError() {- if (!errorEl) return;- errorEl.classList.remove('show');- errorEl.hidden = true;- }-- // Load → downscale → JPEG data URL. Keeps storage small and strips EXIF.- function toDataUrl(file) {- return new Promise(function(resolve, reject) {- if (!file || !/^image\//.test(file.type)) { reject(new Error('not an image')); return; }- var url = URL.createObjectURL(file);- var img = new Image();- img.onload = function() {- var scale = Math.min(1, MAX_DIM / Math.max(img.naturalWidth, img.naturalHeight));- var w = Math.max(1, Math.round(img.naturalWidth * scale));- var h = Math.max(1, Math.round(img.naturalHeight * scale));- var canvas = document.createElement('canvas');- canvas.width = w; canvas.height = h;- canvas.getContext('2d').drawImage(img, 0, 0, w, h);- URL.revokeObjectURL(url);- try { resolve(canvas.toDataURL('image/jpeg', 0.9)); }- catch (e) { reject(e); }- };- img.onerror = function() { URL.revokeObjectURL(url); reject(new Error('decode failed')); };- img.src = url;- });- }-- function present(dataUrl, name) {- try {- sessionStorage.setItem(HANDOFF_KEY, JSON.stringify({ dataUrl: dataUrl, name: name || 'selfie.jpg' }));- } catch (e) {- // Storage blocked or quota exceeded — the visitor can still start- // fresh in Avatar Studio, so degrade gracefully instead of lying.- }- previewImg.src = dataUrl;- zone.style.display = 'none';- ready.classList.add('show');- }-- function accept(file) {- clearError();- toDataUrl(file).then(function(dataUrl) {- present(dataUrl, file.name);- }).catch(function() {- showError('Could not read that image. Try a JPG or PNG.');- });- }-- drop.addEventListener('click', function() { fileInput.click(); });- fileInput.addEventListener('change', function() {- if (fileInput.files && fileInput.files[0]) accept(fileInput.files[0]);- });- drop.addEventListener('dragover', function(e) { e.preventDefault(); drop.classList.add('drag-over'); });- drop.addEventListener('dragleave', function() { drop.classList.remove('drag-over'); });- drop.addEventListener('drop', function(e) {- e.preventDefault(); drop.classList.remove('drag-over');- if (e.dataTransfer.files && e.dataTransfer.files[0]) accept(e.dataTransfer.files[0]);- });-- resetBtn && resetBtn.addEventListener('click', function() {- try { sessionStorage.removeItem(HANDOFF_KEY); } catch (e) {}- ready.classList.remove('show');- zone.style.display = '';- fileInput.value = '';- clearError();- });-- webcamBtn.addEventListener('click', function() {- if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {- showError('Webcam not available in this browser. Upload a photo instead.');- return;- }- clearError();- webcamBtn.disabled = true;- navigator.mediaDevices.getUserMedia({ video: { facingMode: 'user', width: 640, height: 640 } })- .then(function(stream) {- var video = document.createElement('video');- video.srcObject = stream;- video.muted = true;- video.playsInline = true;- video.play();- var done = false;- function snap() {- if (done) return;- done = true;- var size = Math.min(video.videoWidth || 640, video.videoHeight || 640) || 640;- var canvas = document.createElement('canvas');- canvas.width = size; canvas.height = size;- var sx = ((video.videoWidth || size) - size) / 2;- var sy = ((video.videoHeight || size) - size) / 2;- canvas.getContext('2d').drawImage(video, sx, sy, size, size, 0, 0, size, size);- stream.getTracks().forEach(function(t) { t.stop(); });- webcamBtn.disabled = false;- present(canvas.toDataURL('image/jpeg', 0.9), 'webcam.jpg');- }- // Snap once the first frame is actually available.- video.addEventListener('loadeddata', function() { setTimeout(snap, 250); }, { once: true });- }).catch(function() {- webcamBtn.disabled = false;- showError('Camera access was blocked. Upload a photo instead.');- });- });- })();-- // ── 2. Voice + Mocap: microphone waveform ───────────────────────- (function() {- var btn = document.getElementById('mocap-mic-btn');- var canvas = document.getElementById('mocap-waveform');- var status = document.getElementById('mocap-status');- if (!btn || !canvas) return;- var ctx = canvas.getContext('2d');- var audioCtx = null, analyser = null, stream = null, animId = null;- var active = false;-- function draw() {- if (!active) return;- animId = requestAnimationFrame(draw);- var w = canvas.width, h = canvas.height;- var data = new Uint8Array(analyser.frequencyBinCount);- analyser.getByteTimeDomainData(data);- ctx.clearRect(0, 0, w, h);- ctx.strokeStyle = 'rgba(168,168,168,0.6)';- ctx.lineWidth = 1.5;- ctx.beginPath();- var sliceW = w / data.length;- for (var i = 0; i < data.length; i++) {- var v = data[i] / 128.0;- var y = v * h / 2;- if (i === 0) ctx.moveTo(0, y);- else ctx.lineTo(i * sliceW, y);- }- ctx.stroke();- }-- function resizeCanvas() {- canvas.width = canvas.clientWidth * (window.devicePixelRatio || 1);- canvas.height = canvas.clientHeight * (window.devicePixelRatio || 1);- }-- btn.addEventListener('click', function() {- if (active) {- active = false;- cancelAnimationFrame(animId);- if (stream) stream.getTracks().forEach(function(t) { t.stop(); });- if (audioCtx) audioCtx.close();- stream = null; audioCtx = null; analyser = null;- btn.textContent = 'Microphone';- status.textContent = 'click to capture';- status.classList.remove('live');- ctx.clearRect(0, 0, canvas.width, canvas.height);- return;- }- navigator.mediaDevices.getUserMedia({ audio: true }).then(function(s) {- stream = s;- audioCtx = new (window.AudioContext || window.webkitAudioContext)();- analyser = audioCtx.createAnalyser();- analyser.fftSize = 256;- audioCtx.createMediaStreamSource(stream).connect(analyser);- active = true;- resizeCanvas();- btn.textContent = 'Stop';- status.textContent = 'live — speak now';- status.classList.add('live');- draw();- }).catch(function() {- status.textContent = 'mic access denied';- });- });-- new ResizeObserver(function() { if (active) resizeCanvas(); }).observe(canvas);- })();-- // ── 3. Walk & Multiplayer: mini map ─────────────────────────────- (function() {- var canvas = document.getElementById('walk-minimap');- if (!canvas) return;- var ctx = canvas.getContext('2d');- var dpr = window.devicePixelRatio || 1;- var W, H;-- function resize() {- W = canvas.clientWidth; H = canvas.clientHeight;- canvas.width = W * dpr; canvas.height = H * dpr;- ctx.scale(dpr, dpr);- }- resize();- new ResizeObserver(resize).observe(canvas);-- var player = { x: 0.5, y: 0.5, color: '#fff' };- var bots = [- { x: 0.2, y: 0.3, vx: 0.0008, vy: 0.0006, color: '#4ade80' },- { x: 0.8, y: 0.6, vx: -0.0006, vy: 0.0009, color: '#60a5fa' },- { x: 0.5, y: 0.8, vx: 0.0007, vy: -0.0005, color: '#fbbf24' },- ];-- var keys = {};- canvas.addEventListener('keydown', function(e) { keys[e.key.toLowerCase()] = true; e.preventDefault(); });- canvas.addEventListener('keyup', function(e) { keys[e.key.toLowerCase()] = false; });- canvas.addEventListener('click', function(e) {- var r = canvas.getBoundingClientRect();- player.x = (e.clientX - r.left) / r.width;- player.y = (e.clientY - r.top) / r.height;- canvas.focus();- });-- function tick() {- requestAnimationFrame(tick);- var speed = 0.006;- if (keys['w'] || keys['arrowup']) player.y -= speed;- if (keys['s'] || keys['arrowdown']) player.y += speed;- if (keys['a'] || keys['arrowleft']) player.x -= speed;- if (keys['d'] || keys['arrowright']) player.x += speed;- player.x = Math.max(0.02, Math.min(0.98, player.x));- player.y = Math.max(0.02, Math.min(0.98, player.y));-- bots.forEach(function(b) {- b.x += b.vx; b.y += b.vy;- if (b.x < 0.05 || b.x > 0.95) b.vx *= -1;- if (b.y < 0.05 || b.y > 0.95) b.vy *= -1;- b.vx += (Math.random() - 0.5) * 0.0002;- b.vy += (Math.random() - 0.5) * 0.0002;- });-- ctx.clearRect(0, 0, W, H);- ctx.fillStyle = '#0d0d0d';- ctx.fillRect(0, 0, W, H);- // Grid- ctx.strokeStyle = 'rgba(255,255,255,0.04)';- ctx.lineWidth = 0.5;- for (var gx = 0; gx < W; gx += 30) { ctx.beginPath(); ctx.moveTo(gx, 0); ctx.lineTo(gx, H); ctx.stroke(); }- for (var gy = 0; gy < H; gy += 30) { ctx.beginPath(); ctx.moveTo(0, gy); ctx.lineTo(W, gy); ctx.stroke(); }-- // Bots- bots.forEach(function(b) {- ctx.beginPath();- ctx.arc(b.x * W, b.y * H, 4, 0, Math.PI * 2);- ctx.fillStyle = b.color;- ctx.fill();- ctx.fillStyle = 'rgba(255,255,255,0.2)';- ctx.font = '7px monospace';- ctx.fillText('visitor', b.x * W + 7, b.y * H + 3);- });-- // Player- ctx.beginPath();- ctx.arc(player.x * W, player.y * H, 5, 0, Math.PI * 2);- ctx.fillStyle = player.color;- ctx.fill();- ctx.shadowColor = '#fff'; ctx.shadowBlur = 8;- ctx.fill();- ctx.shadowBlur = 0;- ctx.fillStyle = 'rgba(255,255,255,0.5)';- ctx.font = '8px monospace';- ctx.fillText('you', player.x * W + 8, player.y * H + 3);- }- tick();- })();-- // ── 4. x402 Payments: interactive flow ──────────────────────────- (function() {- var payBtn = document.getElementById('x402-pay-btn');- var code = document.getElementById('x402-code');- var spinner = document.getElementById('x402-spinner');- var amount = document.getElementById('x402-amount');- if (!payBtn) return;-- payBtn.addEventListener('click', function() {- payBtn.style.display = 'none';- spinner.style.display = 'block';- code.textContent = 'Processing USDC payment...';- code.className = 'x402-code';-- setTimeout(function() {- spinner.style.display = 'none';- code.textContent = 'HTTP 200 — OK';- code.className = 'x402-code ok';- amount.classList.add('show');-- setTimeout(function() {- code.textContent = 'HTTP 402 — Payment Required';- code.className = 'x402-code err';- amount.classList.remove('show');- payBtn.style.display = '';- }, 3000);- }, 1200);- });- })();-- // ── 5. On-chain Identity: real Solana deploy lives in the module- // script near the end of <body> (needs ES-module imports). ─────-- // ── 6. Skills: live tool-call demo ──────────────────────────────- // Every pill fires a REAL call: Jupiter's public quote API, our Solana- // RPC proxy, the live pump.fun launch feed (SSE), and an A2A agent ask- // streamed through /api/chat. No canned responses.- (function() {- var tools = document.getElementById('skill-tools');- var result = document.getElementById('skill-result');- if (!tools || !result) return;-- var USDC = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';- var WSOL = 'So11111111111111111111111111111111111111112';- var seq = 0; // monotonic token — only the latest click renders- var pending = null; // open EventSource to tear down on tool switch-- function colorJson(obj, indent) {- indent = indent || 0;- var pad = ' '.repeat(indent);- if (obj === null || obj === undefined) return '<span class="json-dim">null</span>';- if (typeof obj === 'string') return '<span class="json-str">"' + obj + '"</span>';- if (typeof obj === 'number') return '<span class="json-num">' + obj + '</span>';- if (typeof obj === 'boolean') return '<span class="json-num">' + obj + '</span>';- if (Array.isArray(obj)) {- if (obj.length === 0) return '[]';- var items = obj.map(function(v) { return pad + ' ' + colorJson(v, indent + 1); });- return '[\n' + items.join(',\n') + '\n' + pad + ']';- }- var keys = Object.keys(obj).filter(function(k) { return obj[k] !== null && obj[k] !== undefined; });- if (keys.length === 0) return '{}';- var lines = keys.map(function(k) {- return pad + ' <span class="json-key">"' + k + '"</span>: ' + colorJson(obj[k], indent + 1);- });- return '{\n' + lines.join(',\n') + '\n' + pad + '}';- }-- function setLoading(label) {- result.classList.remove('err', 'fresh');- result.classList.add('loading');- result.innerHTML = '<span class="skill-loading">▸ calling <span class="json-key">' + label + '</span><span class="skill-dots"></span></span>';- }- function setError(label, msg) {- result.classList.remove('loading', 'fresh');- result.classList.add('err');- result.innerHTML = '<span class="skill-err">✕ ' + label + ' — ' + msg + '</span>';- }- function render(obj, streamingHtml) {- result.classList.remove('loading', 'err');- result.innerHTML = streamingHtml || colorJson(obj, 0);- if (!streamingHtml) {- result.classList.add('fresh');- setTimeout(function() { result.classList.remove('fresh'); }, 600);- }- }- function teardown() {- if (pending) { try { pending.close(); } catch (_) {} pending = null; }- }-- var runners = {- jupiter: function(my) {- setLoading('jupiter_swap');- return fetch('https://lite-api.jup.ag/swap/v1/quote?inputMint=' + USDC + '&outputMint=' + WSOL + '&amount=10000000&slippageBps=50')- .then(function(r) { if (!r.ok) throw new Error('HTTP ' + r.status); return r.json(); })- .then(function(q) {- if (my !== seq) return;- var sol = Number(q.outAmount) / 1e9;- var route = (q.routePlan || []).map(function(p) { return p.swapInfo && p.swapInfo.label; }).filter(Boolean);- render({- tool: 'jupiter_swap',- input: { from: 'USDC', to: 'SOL', amount: '10.00' },- output: {- received: sol.toFixed(4) + ' SOL',- rate: (sol > 0 ? (10 / sol) : 0).toFixed(2) + ' USDC/SOL',- price_impact: (Number(q.priceImpactPct || 0) * 100).toFixed(3) + '%',- slippage: ((q.slippageBps || 50) / 100).toFixed(2) + '%',- route: route.length ? route.join(' → ') : 'direct'- }- });- })- .catch(function(e) { if (my === seq) setError('jupiter_swap', e.message); });- },-- rpc: function(my) {- setLoading('solana_rpc');- return fetch('/api/solana-rpc', {- method: 'POST',- headers: { 'Content-Type': 'application/json' },- body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'getEpochInfo' })- })- .then(function(r) { if (!r.ok) throw new Error('HTTP ' + r.status); return r.json(); })- .then(function(j) {- if (my !== seq) return;- var v = j.result || {};- render({- tool: 'solana_rpc',- method: 'getEpochInfo',- network: 'mainnet-beta',- result: {- epoch: v.epoch,- absolute_slot: v.absoluteSlot,- block_height: v.blockHeight,- slot_index: v.slotIndex + ' / ' + v.slotsInEpoch,- tx_count: v.transactionCount- }- });- })- .catch(function(e) { if (my === seq) setError('solana_rpc', e.message); });- },-- pump: function(my) {- setLoading('pump_live_feed');- return new Promise(function(resolve) {- var es, settled = false, to;- function finish(fn) {- if (settled) return;- settled = true;- clearTimeout(to);- if (es) { try { es.close(); } catch (_) {} }- if (pending === es) pending = null;- fn();- resolve();- }- try { es = new EventSource('/api/pump/live-stream?kind=mint'); }- catch (e) { if (my === seq) setError('pump_live_feed', 'feed unavailable'); return resolve(); }- pending = es;- to = setTimeout(function() {- finish(function() { if (my === seq) setError('pump_live_feed', 'no launches in the last 20s — try again'); });- }, 20000);- es.addEventListener('mint', function(ev) {- var d;- try { d = JSON.parse(ev.data); } catch (_) { return; }- finish(function() {- if (my !== seq) return;- render({- tool: 'pump_live_feed',- event: 'new_mint',- source: 'pump.fun · mainnet',- data: {- name: d.name || '(unnamed)',- symbol: d.symbol ? ('$' + String(d.symbol).replace(/^\$/, '')) : null,- mint: d.mint ? (d.mint.slice(0, 4) + '…' + d.mint.slice(-4)) : null,- market_cap_usd: (d.market_cap_usd != null) ? '$' + Math.round(d.market_cap_usd).toLocaleString() : null,- initial_buy_sol: (d.initial_buy_sol != null) ? Number(d.initial_buy_sol).toFixed(3) + ' SOL' : null- }- });- });- });- es.onerror = function() {- finish(function() { if (my === seq) setError('pump_live_feed', 'feed disconnected'); });- };- });- },-- a2a: function(my) {- setLoading('a2a · agent.ask');- var question = 'In one sentence, what can I build on three.ws?';- var base = { protocol: 'a2a', target: 'claude.agent', action: 'ask', input: question };- function paint(text, streaming) {- if (my !== seq) return;- result.classList.remove('loading', 'err');- var json = colorJson(Object.assign({}, base, { response: text || '' }), 0);- result.innerHTML = streaming ? json.replace(/<\/span>(\n\})$/, '<span class="skill-cursor">▍</span></span>$1') : json;- }- return fetch('/api/chat', {- method: 'POST',- headers: { 'Content-Type': 'application/json' },- body: JSON.stringify({- message: question,- system_prompt: 'You are the three.ws platform agent. Answer in ONE concise, confident sentence, no preamble.',- history: [],- context: {}- })- })- .then(function(r) { if (!r.ok || !r.body) throw new Error('HTTP ' + r.status); return r.body.getReader(); })- .then(function(reader) {- var dec = new TextDecoder(), buf = '', text = '';- function step(res) {- if (my !== seq) { try { reader.cancel(); } catch (_) {} return; }- if (res.done) {- if (my === seq) { paint(text || '(no response)', false); result.classList.add('fresh'); setTimeout(function() { result.classList.remove('fresh'); }, 600); }- return;- }- buf += dec.decode(res.value, { stream: true });- var lines = buf.split('\n');- buf = lines.pop();- lines.forEach(function(line) {- if (line.indexOf('data: ') !== 0) return;- var data = line.slice(6).trim();- if (!data || data === '[DONE]') return;- try {- var parsed = JSON.parse(data);- if (parsed.type === 'chunk' && parsed.text) text += parsed.text;- } catch (_) {}- });- paint(text, true);- return reader.read().then(step);- }- return reader.read().then(step);- })- .catch(function(e) { if (my === seq) setError('a2a · agent.ask', e.message); });- }- };-- function run(name) {- teardown();- var my = ++seq;- (runners[name] || runners.jupiter)(my);- }-- tools.addEventListener('click', function(e) {- var btn = e.target.closest('.bento-pill-btn');- if (!btn) return;- tools.querySelectorAll('.bento-pill-btn').forEach(function(b) { b.classList.remove('active'); });- btn.classList.add('active');- run(btn.dataset.tool);- });-- // Fire the first real call only when the card scrolls into view.- var fired = false;- if ('IntersectionObserver' in window) {- var io = new IntersectionObserver(function(entries) {- entries.forEach(function(en) {- if (en.isIntersecting && !fired) { fired = true; run('jupiter'); io.disconnect(); }- });- }, { threshold: 0.3 });- io.observe(result);- } else {- run('jupiter');- }- })();-- // ── 7. Memory: store/recall demo ────────────────────────────────- (function() {- var input = document.getElementById('memory-input');- var storeBtn = document.getElementById('memory-store-btn');- var recallBtn = document.getElementById('memory-recall-btn');- var log = document.getElementById('memory-log');- if (!input || !storeBtn) return;-- var memories = [];-- function addEntry(op, val) {- var el = document.createElement('div');- el.className = 'memory-entry';- el.innerHTML = '<span class="mem-op">' + op + '</span><span class="mem-val">' + val + '</span>';- log.appendChild(el);- log.scrollTop = log.scrollHeight;- }-- storeBtn.addEventListener('click', function() {- var val = input.value.trim();- if (!val) return;- memories.push(val);- addEntry('STORE →', val);- input.value = '';- });-- recallBtn.addEventListener('click', function() {- if (memories.length === 0) {- addEntry('RECALL →', '(empty — store something first)');- return;- }- memories.forEach(function(m, i) {- setTimeout(function() {- addEntry('MEM[' + i + ']', m);- }, i * 150);- });- });-- input.addEventListener('keydown', function(e) {- if (e.key === 'Enter') storeBtn.click();- });- })();-- // ── 8. AR / WebXR: launcher demo ────────────────────────────────- (function() {- var btn = document.getElementById('ar-launch-btn');- var phone = document.getElementById('ar-phone');- var status = document.getElementById('ar-status');- if (!btn) return;- var active = false;-- btn.addEventListener('click', function() {- if (active) {- active = false;- phone.classList.remove('active');- status.textContent = 'tap to place agent';- status.classList.remove('ready');- btn.textContent = 'Launch AR';- return;- }- active = true;- phone.classList.add('active');- status.textContent = 'scanning surface...';- btn.textContent = 'Stop';-- setTimeout(function() {- if (!active) return;- status.textContent = 'agent placed in AR';- status.classList.add('ready');- }, 1500);- });- })();-- // ── 9. Marketplace: live agent browser ──────────────────────────- (function() {- var strip = document.getElementById('mktplace-strip');- if (!strip) return;-- fetch('/api/marketplace', { headers: { accept: 'application/json' } })- .then(function(r) {- if (!r.ok) throw new Error('HTTP ' + r.status);- return r.json();- })- .then(function(body) {- // /api/marketplace answers { data: { items: [...] } }. Each item is an- // agent listing: `id` is the agent id (what /agents/:id resolves), and- // `thumbnail_url` is a ready-to-use absolute URL — null when the listing's- // avatar has no stored thumbnail. Only ~1 in 6 listings carries one, so- // the initial-letter placeholder is the common path, not an error path.- var items = ((body && body.data && body.data.items) || []).filter(function(it) {- return it && it.id;- }).slice(0, 10);- if (!items.length) return renderBrowseFallback();-- items.forEach(function(item) {- var name = item.name || item.id.slice(0, 6);- var a = document.createElement('a');- a.className = 'mktplace-item';- a.href = '/agents/' + item.id;- a.title = name;-- var initial = document.createElement('span');- initial.className = 'mktplace-item-initial';- initial.textContent = (name || '?').charAt(0);- a.appendChild(initial);-- if (item.thumbnail_url) {- var img = document.createElement('img');- img.src = item.thumbnail_url;- img.alt = name;- img.loading = 'lazy';- // A stored thumbnail can still 404 (object pruned) — fall back to the- // initial rather than leaving a broken-image tile.- img.onerror = function() {- this.remove();- initial.style.display = 'flex';- };- a.appendChild(img);- } else {- initial.style.display = 'flex';- }-- var lbl = document.createElement('span');- lbl.className = 'mktplace-item-name';- lbl.textContent = name;- a.appendChild(lbl);- strip.appendChild(a);- });-- var more = document.createElement('a');- more.className = 'mktplace-more';- more.href = '/discover';- more.textContent = '→';- more.title = 'Browse all agents';- strip.appendChild(more);- }).catch(renderBrowseFallback);-- function renderBrowseFallback() {- strip.innerHTML = '';- var a = document.createElement('a');- a.className = 'mktplace-more';- a.href = '/discover';- a.style.width = 'auto';- a.style.padding = '0 16px';- a.textContent = 'Browse marketplace →';- strip.appendChild(a);- }- })();-- // ── 10. Analytics: sparkline + animated counters ─────────────────- (function() {- var demo = document.getElementById('analytics-demo');- if (!demo) return;- var convosEl = document.getElementById('an-convos');- var revenueEl = document.getElementById('an-revenue');- var retentionEl = document.getElementById('an-retention');- var sparkSvg = document.getElementById('analytics-spark');-- var dataPoints = [5, 12, 8, 22, 18, 30, 25, 40, 35, 48, 42, 55, 50, 62, 58, 70, 65, 78, 72, 85];- var maxVal = Math.max.apply(null, dataPoints);- var svgW = 200, svgH = 40, pad = 2;-- function buildPath() {- var pts = dataPoints.map(function(v, i) {- return {- x: pad + (i / (dataPoints.length - 1)) * (svgW - pad * 2),- y: svgH - pad - (v / maxVal) * (svgH - pad * 2)- };- });- var d = pts.map(function(p, i) { return (i === 0 ? 'M' : 'L') + p.x.toFixed(1) + ' ' + p.y.toFixed(1); }).join(' ');- var fillD = d + ' L' + pts[pts.length - 1].x.toFixed(1) + ' ' + svgH + ' L' + pts[0].x.toFixed(1) + ' ' + svgH + ' Z';- var last = pts[pts.length - 1];-- sparkSvg.innerHTML = sparkSvg.querySelector('defs').outerHTML- + '<path class="spark-fill" d="' + fillD + '"/>'- + '<path d="' + d + '"/>'- + '<circle class="spark-dot" cx="' + last.x.toFixed(1) + '" cy="' + last.y.toFixed(1) + '" r="2.5"/>';- }-- // Counters reveal a fixed set of example figures (the widget is labeled- // "example" in the markup). These are illustrative of the analytics- // dashboard — not live platform data — so no random "live" simulation.- var animated = false;- var targets = { convos: 1247, revenue: 847.5, retention: 68 };- function setCounters(convos, revenue, retention) {- convosEl.textContent = Math.round(convos).toLocaleString();- revenueEl.textContent = '$' + revenue.toFixed(0);- retentionEl.textContent = Math.round(retention) + '%';- }- function animateCounters() {- if (animated) return;- animated = true;- if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {- setCounters(targets.convos, targets.revenue, targets.retention);- return;- }- var start = performance.now();- var dur = 1200;- (function tick(now) {- var p = Math.min((now - start) / dur, 1);- var e = 1 - Math.pow(1 - p, 3);- setCounters(targets.convos * e, targets.revenue * e, targets.retention * e);- if (p < 1) requestAnimationFrame(tick);- })(start);- }-- buildPath();-- var io = new IntersectionObserver(function(entries) {- if (entries[0].isIntersecting) { animateCounters(); io.disconnect(); }- }, { threshold: 0.3 });- io.observe(demo);- })();--})();-</script>+<script type="module" src="/src/home-bento.js"></script><!-- On-chain Identity: real Solana (Metaplex Core) deploy. Module scope so wecan dynamically import the deploy flow only when the user clicks Deploy,diff --git a/pages/pose.html b/pages/pose.htmlindex c0e6658f2..7a483072c 100644--- a/pages/pose.html+++ b/pages/pose.html@@ -2160,6 +2160,12 @@<main id="pose-stage"><canvas id="pose-canvas"></canvas><div id="pose-status">Loading…</div>+ <noscript>+ <div style="position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;padding:24px;background:inherit">+ <p style="max-width:46ch;margin:0">The Animation Studio poses and animates rigged 3D avatars live on this canvas, which needs JavaScript. Enable JavaScript and reload to pose, animate, and export.</p>+ <p style="margin:0"><a href="/">three.ws home</a> · <a href="/gallery">Browse avatars</a> · <a href="/docs">Read the docs</a></p>+ </div>+ </noscript></main><!-- RIGHT PANEL -->diff --git a/pages/proof.html b/pages/proof.htmlindex f2ef52e82..839e07fda 100644--- a/pages/proof.html+++ b/pages/proof.html@@ -7,10 +7,20 @@<title data-i18n="proof.meta_title">Verify Custody · three.ws</title><meta name="description" content="Verify your three.ws agent wallet's custody yourself — recompute your Merkle leaf, walk the path, and confirm it against the root anchored on Solana, entirely in your browser. Don't trust, verify." data-i18n-attr="content:proof.meta_description"/><meta name="robots" content="noindex, follow" />+ <link rel="canonical" href="https://three.ws/proof" /><meta property="og:type" content="website" /><meta property="og:site_name" content="three.ws" />+ <meta property="og:url" content="https://three.ws/proof" /><meta property="og:title" content="Verify Custody · three.ws" data-i18n-attr="content:proof.meta_og_title"/><meta property="og:description" content="Recompute your Merkle leaf, walk the path, and confirm it against the on-chain root — entirely in your browser." data-i18n-attr="content:proof.meta_og_description"/>+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&t=Verify+Custody&d=Recompute+your+Merkle+leaf%2C+walk+the+path%2C+and+confirm+it+against+the+root+anchored+on+Solana%2C+entirely+in+your+browser.&p=%2Fproof" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Verify Custody · three.ws" />+ <meta name="twitter:description" content="Recompute your Merkle leaf, walk the path, and confirm it against the root anchored on Solana, entirely in your browser." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&t=Verify+Custody&d=Recompute+your+Merkle+leaf%2C+walk+the+path%2C+and+confirm+it+against+the+root+anchored+on+Solana%2C+entirely+in+your+browser.&p=%2Fproof" /><meta name="theme-color" content="#0a0a0a" /><link rel="icon" href="/favicon.ico" sizes="any" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" />diff --git a/pages/start.html b/pages/start.htmlindex 429aa66a1..d415c1e7d 100644--- a/pages/start.html+++ b/pages/start.html@@ -1034,6 +1034,10 @@<div class="tpl-grid" id="tpl-grid" role="list" aria-label="Agent templates"><!-- Cards injected by start.js --></div>+ <noscript>+ <p class="tpl-sub">The template gallery and agent builder need JavaScript. Enable JavaScript and reload to create your 3D AI agent in minutes: a body, a brain, and a revenue stream.</p>+ <p class="tpl-sub"><a href="/">three.ws home</a> · <a href="/docs">Read the docs</a> · <a href="/gallery">Browse the avatar gallery</a></p>+ </noscript><button type="button" class="tpl-blank-btn" id="btn-blank-start" aria-label="Start from scratch without a template" data-i18n-html="start.start_from_scratch" data-i18n-attr="aria-label:start.start_from_scratch_without_a_arialabel">Start from scratch <span aria-hidden="true">→</span></button>diff --git a/pages/symphony.html b/pages/symphony.htmlindex 512295c4b..e954ab12e 100644--- a/pages/symphony.html+++ b/pages/symphony.html@@ -43,7 +43,7 @@<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Agent Symphony","description":"The live three.ws agent economy rendered as generative music: every real payment, trade, launch and level-up plays as a synthesized note.","url":"https://three.ws/symphony","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script><meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" /><meta property="og:locale" content="en_US" />- <meta property="og:image:alt" content="Agent Symphony — three.ws" />+ <meta property="og:image:alt" content="Agent Symphony · three.ws" /></head><body><header><div id="nav-container"></div></header>@@ -73,7 +73,7 @@<p class="sy-hint"><kbd>Space</kbd> plays and pauses. Click a voice below to mute it.</p></div>- <ul class="sy-legend" aria-label="Voices — click to mute or unmute">+ <ul class="sy-legend" aria-label="Voices: click to mute or unmute"><li><button type="button" class="sy-voice" data-voice="money" style="--c:var(--sym-money)" aria-pressed="true">Payments · pluck</button></li><li><button type="button" class="sy-voice" data-voice="bass" style="--c:var(--sym-bass)" aria-pressed="true">Coin buys · bass</button></li><li><button type="button" class="sy-voice" data-voice="bell" style="--c:var(--sym-bell)" aria-pressed="true">New agents · bells</button></li>diff --git a/prompts/okx-ai/00-CONTEXT.md b/prompts/okx-ai/00-CONTEXT.mdindex b363dc8a3..d536d5931 100644--- a/prompts/okx-ai/00-CONTEXT.md+++ b/prompts/okx-ai/00-CONTEXT.md@@ -19,7 +19,7 @@ of truth for facts every work order depends on. Do not re-derive these; do not c|---|---|| Our agent ID | `#2632` || Agent name | `three.ws 3D Studio` |-| Owner wallet (X Layer) | `0x75d00a2713565171f33216e5aa2a375e076ecf69` |+| Owner wallet (X Layer) | `0x75d00a2713565171f33216e5aa2a375e076ecf69` (buyer + agent identity owner ONLY; the live payTo/seller wallet is `0x4022de2D36C334E73C7a108805Cea11C0564f402`, see RUNBOOK.md section 3) || Communication address | `0xfaBDeadF019267576a155E166110eDdA8BeE9729` || Agent key UUID | `8848356c-f4a5-418a-a189-6a6ad72c8fdc` || Marketplace chain | X Layer, chainId **196** (`eip155:196`) |diff --git a/prompts/okx-ai/README.md b/prompts/okx-ai/README.mdindex 2c5dff87f..ccf39eb59 100644--- a/prompts/okx-ai/README.md+++ b/prompts/okx-ai/README.md@@ -17,9 +17,9 @@ facts) and ends by appending to `PROGRESS.md` (the cross-chat handoff log).| Order | File | What it does | Needs human for ||---|---|---|---|-| 1 | `01-protocol-research.md` | Pin the seller-side payments spec from primary sources + live captures | OTP login; maybe dust funding |-| 2 | `02-payments-integration.md` | Implement the OKX rail on our endpoint, tested | possibly `vercel env` values |-| 3 | `03-service-decomposition.md` | Split into micro-priced services + free catalog |, |+| 1 | `01-protocol-research.md` (retired: completed, in git history) | Pin the seller-side payments spec from primary sources + live captures | done |+| 2 | `02-payments-integration.md` (retired: completed, in git history) | Implement the OKX rail on our endpoint, tested | done |+| 3 | `03-service-decomposition.md` (retired: completed, in git history) | Split into micro-priced services + free catalog | done || 4 | `04-e2e-real-payment-test.md` | Pay ourselves for real; settlement + adversarial gauntlet | **wallet funding**, OTP || 5 | `05-relisting-resubmission.md` | Update #2632 + resubmit for review | OTP; confirm on-chain writes || 6 | `06-agent-pfp-wedge.md` | "Agent Identity Studio", avatars for OKX agents (parallel after 02) | funding for test buys |diff --git a/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.md b/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.mdindex f00bfcea4..be42a03a5 100644--- a/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.md+++ b/prompts/okx-ai/e2e-evidence/FUNDING-REQUEST.md@@ -29,7 +29,7 @@ single most expensive call. One top-up covers the entire gauntlet plus retries.**Path B (default, already wired — direct relayer redemption):**| | ||---|---|-| To | `0x238755DE16F8e45859d198cfF2f939326Ad38b47` (**corrected 2026-07-10** — STALE — LIVE relayer is this, derived from prod `x402-xlayer-relayer-key`; the old `0x1B60…AB2a` in git history was pre-rotation and must NOT be funded) (fresh relayer keypair; private key is in Vercel prod env `X402_XLAYER_RELAYER_KEY`, never committed) |+| To | `0xe81DE501Dd5D9299E2bA8964498858d3fAD0415B` (corrected 2026-07-28: the LIVE relayer, from Secret Manager `x402-xlayer-relayer-key` v3, rotated 2026-07-12; see RUNBOOK.md section 3. The older `0x238755DE...8b47` and `0x1B60...AB2a` addresses in git history are pre-rotation and must NOT be funded) || Chain | X Layer mainnet, chainId 196 || Token | **OKB** (native gas) || Amount | **0.3 OKB** (each settle = 1 `transferWithAuthorization` tx ~80k gas; ~15–20 txs incl. retries ≪ 0.1 OKB — 0.3 is buffer) |@@ -50,7 +50,7 @@ Path B still runs as fallback and produces a real on-chain tx either way.## Total to send- **2.0 USD₮0** → `0x75d0…cf69` (X Layer)-- **0.3 OKB** → `0x1B60…AB2a` (X Layer) *(skip if providing OKX creds instead)*+- **0.3 OKB** → `0xe81DE501…415B` (X Layer, the live relayer; see section 2) *(skip if providing OKX creds instead)*- **0.10 USDC + 0.02 SOL** → `9PirGw…fnyc` (Solana)≈ **$2.10 of stablecoin + ~$0.3 gas**. Everything above cost, one-time float (self-transfer).diff --git a/public/changelog.json b/public/changelog.jsonindex 8c21d6e6a..83f65a618 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-28T21:56:35.183Z",+ "generated_at": "2026-07-28T22:21:36.586Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",diff --git a/public/dashboard/index.html b/public/dashboard/index.htmlindex 506bb5751..3bdcaffca 100644--- a/public/dashboard/index.html+++ b/public/dashboard/index.html@@ -4,6 +4,21 @@<meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="dashboard_index.meta_title">Dashboard · three.ws</title>+ <meta name="description" content="Your account dashboard: agents, avatars, payments, keys, MCP servers, monetization, billing." />+ <meta name="robots" content="noindex" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:url" content="https://three.ws/dashboard" />+ <meta property="og:title" content="Dashboard · three.ws" />+ <meta property="og:description" content="Your account dashboard: agents, avatars, payments, keys, MCP servers, monetization, billing." />+ <meta property="og:image" content="https://three.ws/api/page-og?s=account&t=Dashboard&d=Your+account+dashboard%3A+agents%2C+avatars%2C+payments%2C+keys%2C+MCP+servers%2C+monetization%2C+billing.&p=%2Fdashboard" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Dashboard · three.ws" />+ <meta name="twitter:description" content="Your account dashboard: agents, avatars, payments, keys, MCP servers, monetization, billing." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=account&t=Dashboard&d=Your+account+dashboard%3A+agents%2C+avatars%2C+payments%2C+keys%2C+MCP+servers%2C+monetization%2C+billing.&p=%2Fdashboard" /><link rel="icon" href="/favicon.ico" /><link rel="stylesheet" href="/fonts/fonts.css" /><link rel="stylesheet" href="/footer.css" />diff --git a/public/features.json b/public/features.jsonindex f66591fe9..89f5f1206 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-28T21:56:35.175Z",+ "generated_at": "2026-07-28T22:21:36.575Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/public/home.css b/public/home.cssindex de484b06b..6b8092bfc 100644--- a/public/home.css+++ b/public/home.css@@ -1,2743 +1,2714 @@-/* ── Home page marketing styles ── */--/* ── Custom cursor ───────────────────────────────────────────────────────── */--@media (hover: hover) {- body {- cursor: none;- }-- .cursor {- position: fixed;- top: 0;- left: 0;- width: 10px;- height: 10px;- border-radius: 50%;- background: rgba(255, 255, 255, 0.9);- box-shadow:- 0 0 16px rgba(255, 255, 255, 0.7),- 0 0 36px rgba(255, 255, 255, 0.3);- pointer-events: none;- z-index: 99999;- will-change: transform;- mix-blend-mode: screen;- transition:- width 0.2s ease,- height 0.2s ease,- background 0.2s ease,- box-shadow 0.2s ease;- }-- .cursor--hover {- width: 36px;- height: 36px;- background: rgba(255, 255, 255, 0.12);- border: 1px solid rgba(255, 255, 255, 0.55);- box-shadow: none;- }-}--/* ── Three.js canvas viewers (hero + Act 2) ─────────────────────────────── */--#hero-avatar.h-avatar-viewer,-#home-act2-canvas.h-avatar-viewer {- display: block;- width: 100%;- height: 100%;- background: transparent;- cursor: pointer;-}--/* ── Fluid canvas ────────────────────────────────────────────────────────── */--.h-fluid-canvas {- position: absolute;- inset: 0;- width: 100%;- height: 100%;- pointer-events: none;-}--/* ── Global header ───────────────────────────────────────────────────────── */--/* The site header is the shared nav (public/nav.html + nav.css), injected into- #nav-container. It positions and styles itself (sticky, blurred, branded), so- this wrapper just gets out of the way — no fixed chrome, no second wordmark. */-.home-page header {- display: block;-}--/* ── Loading flash on page reveal ────────────────────────────────────────── */--@keyframes h-page-in {- from {- opacity: 0;- }- to {- opacity: 1;- }-}--.home-page main {- animation: h-page-in 0.6s ease both;-}--/* ── Trust strip ─────────────────────────────────────────────────────────── */--.h-trust-strip {- position: relative;- z-index: 30;- background:- radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 60%),- linear-gradient(180deg, rgba(26, 14, 8, 0.6) 0%, rgba(8, 7, 11, 0.6) 100%);- border-top: 1px solid rgba(255, 255, 255, 0.12);- border-bottom: 1px solid rgba(255, 255, 255, 0.12);- padding: 1.8rem var(--space-lg);-}--.h-trust-inner {- display: flex;- align-items: center;- justify-content: center;- flex-wrap: wrap;- gap: 1.5rem 2rem;- max-width: 900px;- margin: 0 auto;-}--.h-trust-item {- display: flex;- flex-direction: column;- align-items: center;- gap: 0.2rem;-}--.h-trust-num {- font-family: var(--font-display);- font-size: 1.4rem;- font-weight: 700;- background: #ffffff;- -webkit-background-clip: text;- background-clip: text;- color: transparent;- letter-spacing: -0.015em;-}--.h-trust-label {- font-size: 0.7rem;- font-weight: 500;- letter-spacing: 0.1em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.5);- font-family: var(--font-display);-}--.h-trust-sep {- color: rgba(255, 255, 255, 0.15);- font-size: 1.4rem;-}--/* ── Traction stats bar ─────────────────────────────────────────────────── */--.h-traction {- position: relative;- z-index: 30;- background: rgba(8, 7, 11, 0.95);- border-top: 1px solid rgba(255, 255, 255, 0.06);- border-bottom: 1px solid rgba(255, 255, 255, 0.06);- padding: clamp(1.75rem, 4vh, 2.5rem) clamp(1.25rem, 4vw, 2rem);-}--.h-traction-inner {- display: flex;- align-items: center;- justify-content: center;- gap: 0;- max-width: 1100px;- margin: 0 auto;- flex-wrap: wrap;-}--.h-traction-stat {- display: flex;- flex-direction: column;- align-items: center;- gap: 0.35rem;- padding: 0.5rem clamp(1.5rem, 3vw, 3rem);- flex: 1 1 120px;-}--.h-traction-val {- font-family: var(--font-display);- font-size: clamp(1.6rem, 3vw, 2.2rem);- font-weight: 700;- color: #fff;- letter-spacing: -0.02em;- line-height: 1;- transition: opacity 0.3s;-}--.h-traction-val.is-loading {- opacity: 0.3;- filter: blur(4px);- transition: opacity 0.4s, filter 0.4s;-}--.h-traction-label {- font-size: 0.78rem;- font-weight: 500;- color: rgba(255, 255, 255, 0.45);- text-transform: uppercase;- letter-spacing: 0.06em;- white-space: nowrap;-}--.h-traction-divider {- width: 1px;- height: 2.5rem;- background: rgba(255, 255, 255, 0.1);- flex-shrink: 0;-}--@media (max-width: 700px) {- .h-traction-inner { gap: 0; row-gap: 0.5rem; }- .h-traction-divider { display: none; }- .h-traction-stat { flex: 1 1 45%; padding: 0.75rem 1rem; }- .h-traction-val { font-size: 1.5rem; }-}--@media (max-width: 400px) {- .h-traction-stat { flex: 1 1 100%; }-}--/* ── Pillars transition band (docs.pai.direct style) ───────────────────── */--.h-pillars {- position: relative;- z-index: 30;- background:- linear-gradient(- 180deg,- rgba(8, 7, 11, 0) 0%,- rgba(8, 7, 11, 1) 25%,- rgba(8, 7, 11, 1) 100%- ),- radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);- padding: clamp(4rem, 9vh, 7rem) clamp(1.25rem, 4vw, 2rem);-}--.h-pillars-inner {- display: grid;- grid-template-columns: repeat(3, minmax(0, 1fr));- gap: clamp(2rem, 4vw, 3.5rem);- max-width: 1180px;- margin: 0 auto;-}--.h-pillar h3 {- font-family: var(--font-display);- font-size: 1.15rem;- font-weight: 700;- color: #fff;- letter-spacing: -0.005em;- line-height: 1.25;- margin: 0 0 0.85rem;-}--.h-pillar p {- font-size: 0.95rem;- line-height: 1.65;- color: rgba(255, 255, 255, 0.55);- margin: 0;- max-width: 32em;-}--@media (max-width: 880px) {- .h-pillars-inner {- grid-template-columns: 1fr;- gap: 2rem;- }-}--/* ── Bento feature grid ──────────────────────────────────────────────────── */--.h-bento-section {- position: relative;- z-index: 30;- background:- radial-gradient(ellipse at 0% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),- radial-gradient(ellipse at 100% 100%, rgba(140, 80, 220, 0.05) 0%, transparent 50%), #070707;- padding: clamp(5rem, 10vh, 9rem) var(--space-lg);- max-width: 1200px;- margin: 0 auto;-}--.h-bento-header {- text-align: center;- margin-bottom: 4rem;- max-width: 720px;- margin-left: auto;- margin-right: auto;-}--.h-bento-header .h-section-title {- margin-bottom: 0.5rem;-}--.h-bento-grid {- display: grid;- grid-template-columns: 2fr 1fr;- grid-auto-rows: auto;- gap: 1rem;-}--.h-bento-card {- background: var(--surface-1, rgba(255, 255, 255, 0.025));- border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));- border-radius: var(--radius-card, 14px);- overflow: hidden;- transition:- border-color 0.3s ease,- transform 0.3s ease;- display: flex;- flex-direction: column;-}--.h-bento-card:hover {- border-color: var(--stroke-strong, rgba(255, 255, 255, 0.14));- transform: translateY(-2px);-}--.h-bento-card--lg {- grid-column: 1;- grid-row: 1 / span 4;- display: grid;- grid-template-columns: minmax(0, 1fr);- grid-template-rows: 1fr auto auto;-}--.h-bento-visual {- position: relative;- min-height: 360px;- background: rgba(255, 255, 255, 0.02);- /* isolate compositing layer so WebGL canvas renders correctly inside the- CSS 3D perspective context on .home-parallax */- will-change: transform;- transform: translateZ(0);-}--.h-bento-visual model-viewer {- width: 100%;- height: 100%;- min-height: 360px;- background: transparent;- --poster-color: transparent;-}--.h-bento-cz-canvas {- position: absolute;- inset: 0;- width: 100%;- height: 100%;- display: block;- cursor: grab;-}--.h-bento-anim-panel {- border-top: 1px solid rgba(255, 255, 255, 0.06);- border-bottom: 1px solid rgba(255, 255, 255, 0.06);- background: rgba(0, 0, 0, 0.28);- padding: 0.7rem 1rem 0.6rem;- display: flex;- flex-direction: column;- gap: 0.45rem;-}--.h-bento-anim-header {- display: flex;- align-items: center;- justify-content: space-between;-}--.h-bento-anim-title {- font-size: 0.62rem;- font-weight: 600;- letter-spacing: 0.14em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.4);- font-family: var(--font-display);-}--.h-bento-anim-stop {- background: none;- border: none;- color: rgba(255, 255, 255, 0.35);- font-size: 0.85rem;- cursor: pointer;- padding: var(--space-3xs) var(--space-xs);- border-radius: var(--radius-sm);- transition:- color 0.2s,- background 0.2s;- line-height: 1;-}--.h-bento-anim-stop:hover {- color: var(--danger);- background: rgba(248, 113, 113, 0.1);-}--.h-bento-anim-grid {- display: flex;- gap: 0.4rem;- overflow-x: auto;- scrollbar-width: thin;- scrollbar-color: rgba(255, 255, 255, 0.12) transparent;- padding-bottom: var(--space-2xs);-}--.h-bento-anim-grid::-webkit-scrollbar {- height: 4px;-}-.h-bento-anim-grid::-webkit-scrollbar-thumb {- background: rgba(255, 255, 255, 0.12);- border-radius: var(--radius-sm);-}--.h-bento-anim-btn {- display: flex;- flex-direction: column;- align-items: center;- gap: var(--space-3xs);- padding: 0.45rem 0.55rem;- min-width: 56px;- background: rgba(255, 255, 255, 0.04);- border: 1px solid rgba(255, 255, 255, 0.08);- border-radius: var(--radius-sm);- color: rgba(255, 255, 255, 0.6);- font-family: inherit;- cursor: pointer;- transition: all 0.18s ease;- flex-shrink: 0;-}--.h-bento-anim-btn:hover:not(:disabled) {- background: rgba(255, 255, 255, 0.08);- border-color: rgba(255, 255, 255, 0.18);- color: #fff;-}--.h-bento-anim-btn--active {- background: rgba(255, 255, 255, 0.09);- border-color: rgba(255, 255, 255, 0.25);- color: #fff;- box-shadow: 0 0 14px rgba(255, 255, 255, 0.09);-}--.h-bento-anim-btn--loading {- opacity: 0.4;- cursor: wait;-}--.h-bento-anim-btn__icon {- font-size: 1.15rem;- line-height: 1;-}--.h-bento-anim-btn__label {- font-size: 9px;- font-weight: 500;- letter-spacing: 0.03em;- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;- max-width: 64px;-}--.h-bento-body {- padding: 1.4rem 1.6rem;- display: flex;- flex-direction: column;- gap: 0.5rem;- flex: 1;-}--.h-bento-tag {- display: inline-block;- font-size: 0.65rem;- font-weight: 600;- letter-spacing: 0.14em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.8);- font-family: var(--font-display);- margin-bottom: 0.2rem;-}--.h-bento-tag--mint {- color: rgba(110, 231, 183, 0.8);-}-.h-bento-tag--muted {- color: rgba(255, 255, 255, 0.5);-}--.h-bento-card h3 {- font-family: var(--font-display);- font-size: 1.1rem;- font-weight: 600;- color: #fff;- margin: 0;- line-height: 1.25;-}--.h-bento-card p {- font-size: 0.85rem;- color: rgba(255, 255, 255, 0.48);- line-height: 1.55;- margin: 0;- flex: 1;-}--.h-bento-code {- margin-top: 0.75rem;- background: rgba(0, 0, 0, 0.4);- border: 1px solid rgba(255, 255, 255, 0.05);- border-radius: var(--radius-sm);- padding: 0.7rem 0.9rem;- font-family: var(--font-mono);- font-size: 0.7rem;- color: rgba(255, 255, 255, 0.55);- line-height: 1.6;-}--.h-bento-id {- display: flex;- align-items: center;- gap: 0.5rem;- margin-top: 0.75rem;- padding: 0.5rem 0.8rem;- background: rgba(110, 231, 183, 0.06);- border: 1px solid rgba(110, 231, 183, 0.15);- border-radius: var(--radius-sm);-}--.h-bento-emotions {- display: flex;- flex-wrap: wrap;- gap: 0.35rem;- margin-top: 0.5rem;-}--.h-bento-emotions span {- font-size: 0.68rem;- color: rgba(255, 255, 255, 0.40);- font-family: var(--font-display);- border: 1px solid rgba(255, 255, 255, 0.10);- border-radius: var(--radius-sm);- padding: 0.2rem 0.55rem;-}--/* ── Developer section ───────────────────────────────────────────────────── */--.h-dev-section {- position: relative;- z-index: 30;- background: rgba(255, 255, 255, 0.018);- border-top: 1px solid rgba(255, 255, 255, 0.05);- padding: clamp(4rem, 8vh, 7rem) var(--space-lg);-}--.h-dev-inner {- display: grid;- grid-template-columns: 1fr 1fr;- gap: var(--space-2xl);- align-items: center;- max-width: 1080px;- margin: 0 auto;-}--.h-dev-text {- display: flex;- flex-direction: column;- gap: 1rem;-}--.h-dev-text h2 {- font-family: var(--font-display);- font-size: clamp(1.8rem, 3vw, 2.6rem);- font-weight: 700;- color: #fff;- line-height: 1.1;- letter-spacing: -0.02em;- margin: 0;-}--.h-dev-sub {- font-size: var(--text-base);- color: rgba(255, 255, 255, 0.5);- line-height: 1.6;- margin: 0;-}--.h-dev-sub code {- font-family: var(--font-mono);- font-size: 0.88em;- color: rgba(255, 255, 255, 0.8);- background: rgba(255, 255, 255, 0.08);- padding: 0.1em 0.4em;- border-radius: var(--radius-sm);-}--.h-dev-links {- display: flex;- gap: 1.5rem;- flex-wrap: wrap;-}--.h-dev-code {- background: #0a0a0a;- border: 1px solid rgba(255, 255, 255, 0.07);- border-radius: var(--radius-sm);- overflow: hidden;-}--.h-dev-code-bar {- display: flex;- align-items: center;- gap: 0.4rem;- padding: 0.7rem 1rem;- background: rgba(255, 255, 255, 0.03);- border-bottom: 1px solid rgba(255, 255, 255, 0.05);-}--.h-dev-code-dot {- width: 10px;- height: 10px;- border-radius: 50%;- background: rgba(255, 255, 255, 0.12);-}--.h-dev-code-filename {- font-family: var(--font-mono);- font-size: 0.7rem;- color: rgba(255, 255, 255, 0.3);- margin-left: 0.5rem;-}--.h-dev-pre {- margin: 0;- padding: 1.4rem 1.6rem;- overflow-x: auto;-}--.h-dev-pre code {- font-family: var(--font-mono);- font-size: 0.82rem;- line-height: 1.75;- color: rgba(255, 255, 255, 0.55);-}--.h-dev-pre .c {- color: rgba(255, 255, 255, 0.22);-}-.h-dev-pre .tag {- color: rgba(125, 200, 255, 0.85);-}-.h-dev-pre .attr {- color: rgba(168, 220, 140, 0.85);-}-.h-dev-pre .val {- color: rgba(255, 255, 255, 0.8);-}--/* ── CTA inner wrapper ───────────────────────────────────────────────────── */--.h-cta-inner {- max-width: 600px;- margin: 0 auto;- text-align: center;-}--/* ── Footer: "The Horizon" ──────────────────────────────────────────────── */--.h-footer-horizon {- position: relative;- overflow: hidden;- min-height: 360px;- padding: 4rem 2rem 2rem !important;- border-top: none !important;- background: linear-gradient(180deg, var(--bg-0) 0%, #050505 60%, #000 100%) !important;- isolation: isolate;-}--.h-footer-glow-line {- position: absolute;- top: 0;- left: 0;- right: 0;- height: 1px;- background: linear-gradient(- 90deg,- transparent 0%,- rgba(255, 255, 255, 0) 10%,- rgba(255, 255, 255, 0.75) 50%,- rgba(255, 255, 255, 0) 90%,- transparent 100%- );- box-shadow:- 0 0 10px rgba(255, 255, 255, 0.35),- 0 0 24px rgba(255, 255, 255, 0.18);- z-index: 2;-}--.h-footer-floor {- position: absolute;- left: -10%;- right: -10%;- bottom: -40%;- height: 90%;- background-image:- linear-gradient(to right, rgba(255, 255, 255, 0.09) 1px, transparent 1px),- linear-gradient(to bottom, rgba(255, 255, 255, 0.09) 1px, transparent 1px);- background-size: 64px 64px;- transform: perspective(600px) rotateX(62deg);- transform-origin: 50% 0%;- mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 95%);- -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 95%);- z-index: 1;- animation: hFloorScroll 12s linear infinite;-}--@keyframes hFloorScroll {- 0% {- background-position: 0 0;- }- 100% {- background-position: 0 64px;- }-}--.h-footer-haze {- position: absolute;- inset: 0;- background:- radial-gradient(60% 70% at 30% 110%, rgba(255, 255, 255, 0.1) 0%, transparent 60%),- radial-gradient(55% 70% at 75% 110%, rgba(255, 255, 255, 0.07) 0%, transparent 60%);- filter: blur(40px);- z-index: 1;- pointer-events: none;-}--.h-footer-watermark {- position: absolute;- left: 50%;- bottom: -0.15em;- transform: translateX(-50%);- font-family: var(--font-display);- font-weight: 700;- font-size: clamp(7rem, 22vw, 22rem);- line-height: 0.85;- letter-spacing: -0.04em;- white-space: nowrap;- background: linear-gradient(- 180deg,- rgba(255, 255, 255, 0.12) 0%,- rgba(255, 255, 255, 0.04) 60%,- rgba(255, 255, 255, 0) 100%- );- -webkit-background-clip: text;- background-clip: text;- color: transparent;- pointer-events: none;- z-index: 2;- user-select: none;-}--.h-footer-avatar {- position: absolute;- right: 2%;- bottom: 0;- width: 200px;- height: 200px;- z-index: 3;- pointer-events: none;- filter: grayscale(1) drop-shadow(0 0 18px rgba(255, 255, 255, 0.3));-}--.h-footer-avatar model-viewer {- width: 100%;- height: 100%;- background: transparent;- --poster-color: transparent;-}--.h-footer-inner {- position: relative;- z-index: 4;- display: flex;- align-items: flex-start;- justify-content: space-between;- flex-wrap: wrap;- gap: 2rem;- max-width: 1080px;- margin: 0 auto 4rem;-}--.h-footer-brand-col {- display: flex;- flex-direction: column;- gap: 0.4rem;-}--.h-footer-brand {- display: flex;- align-items: center;- gap: 0.4rem;- font-family: var(--font-display);- font-size: 1.1rem;- font-weight: 600;- color: #fff;-}--.h-footer-tagline {- font-family: var(--font-body);- font-size: 0.85rem;- color: rgba(255, 255, 255, 0.45);- margin: 0;- letter-spacing: 0.01em;-}--.h-footer-links {- display: grid;- grid-template-columns: repeat(4, auto);- gap: 0.6rem 2.5rem;-}--.h-footer-links a {- position: relative;- color: rgba(255, 255, 255, 0.45);- text-decoration: none;- font-size: var(--text-sm);- transition:- color 0.2s ease,- text-shadow 0.2s ease;-}--.h-footer-links a:hover {- color: #fff;- text-shadow: 0 0 12px rgba(255, 255, 255, 0.55);-}--.h-footer-bottom {- position: relative;- z-index: 4;- max-width: 1080px;- margin: 0 auto;- padding-top: 1.5rem;- display: flex;- align-items: center;- justify-content: space-between;- gap: 1rem;- flex-wrap: wrap;- border-top: 1px solid rgba(255, 255, 255, 0.06);-}--.h-footer-legal {- margin: 0;- font-family: var(--font-body);- font-size: 0.78rem;- font-weight: 400;- color: rgba(255, 255, 255, 0.42);- letter-spacing: 0.005em;-}--.h-footer-badges {- display: flex;- align-items: center;- gap: 0.5rem;- flex-wrap: wrap;-}--.h-footer-badge {- display: inline-flex;- align-items: center;- gap: 0.4rem;- padding: 0.32rem 0.7rem;- border-radius: var(--radius-sm);- border: 1px solid rgba(255, 255, 255, 0.09);- background: rgba(255, 255, 255, 0.025);- color: rgba(255, 255, 255, 0.62);- font-family: var(--font-body);- font-size: 0.72rem;- font-weight: 500;- letter-spacing: 0.01em;- text-decoration: none;- transition:- color 0.2s ease,- border-color 0.2s ease,- background 0.2s ease,- transform 0.2s ease;-}--.h-footer-badge:hover {- color: #fff;- border-color: rgba(255, 255, 255, 0.18);- background: rgba(255, 255, 255, 0.05);- transform: translateY(-1px);-}--.h-footer-badge svg {- width: 12px;- height: 12px;- flex-shrink: 0;-}--.h-footer-status-dot {- width: 6px;- height: 6px;- border-radius: 50%;- background: var(--success);- box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);- flex-shrink: 0;- animation: hStatusPulse 2.4s ease-in-out infinite;-}--@keyframes hStatusPulse {- 0%,- 100% {- opacity: 1;- box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);- }- 50% {- opacity: 0.55;- box-shadow: 0 0 4px rgba(74, 222, 128, 0.35);- }-}--@media (max-width: 720px) {- .h-footer-horizon {- min-height: 320px;- padding: 3rem 1.25rem 1.5rem !important;- }- .h-footer-inner {- flex-direction: column;- gap: 1.5rem;- margin-bottom: 3rem;- }- .h-footer-links {- grid-template-columns: repeat(2, 1fr);- gap: 0.5rem 1rem;- }- .h-footer-bottom {- flex-direction: column;- align-items: flex-start;- gap: 0.75rem;- }- .h-footer-avatar {- width: 90px;- height: 90px;- right: 5%;- bottom: 18%;- }-}--/* ── Responsive: bento and dev ───────────────────────────────────────────── */--@media (max-width: 900px) {- .h-bento-grid {- grid-template-columns: 1fr 1fr;- }- .h-bento-card--lg {- grid-column: span 2;- grid-row: auto;- }- /* Give the visual area a stable height so the layout doesn't shift when- the model-viewer canvas initialises (prevents CLS on mobile). */- .h-bento-card--lg .h-bento-visual {- aspect-ratio: 4 / 3;- min-height: unset;- }- .h-dev-inner {- grid-template-columns: 1fr;- }-}--@media (max-width: 600px) {- .h-bento-grid {- grid-template-columns: 1fr;- }- .h-bento-card--lg {- grid-column: span 1;- grid-row: auto;- }- .h-bento-card--lg .h-bento-visual {- aspect-ratio: 1 / 1;- min-height: unset;- }- .h-trust-inner {- gap: 1rem;- }- .h-footer-inner {- flex-direction: column;- align-items: flex-start;- }-}--.home-page {- overflow-y: auto;- overflow-x: hidden;- height: 100%;- scroll-behavior: smooth;-}--/* ── Parallax scroll container ──────────────────────────────────────────── */--.home-parallax {- position: relative;- height: 100vh;- width: 100vw;- overflow-x: hidden;- overflow-y: auto;- overscroll-behavior-y: none;- perspective: 2.4rem;- perspective-origin: 50% 0%;- scroll-behavior: smooth;- scrollbar-width: none;-}--.home-parallax::-webkit-scrollbar {- width: 0;- height: 0;-}--/* ── Hero parallax act ───────────────────────────────────────────────────── */--.h-hero-act {- position: relative;- height: 130vh;- overflow: hidden;- isolation: isolate;-}--/* ── Parallax depth layers ───────────────────────────────────────────────── */--.h-layer {- position: absolute;- inset: 0;- width: 100%;- height: 100%;- pointer-events: none;- z-index: calc(10 - var(--depth, 0));-}--/* ── Nebula background ───────────────────────────────────────────────────── */--.h-layer-nebula {- position: absolute;- inset: 0;- background:- radial-gradient(ellipse at 22% 25%, rgba(255, 255, 255, 0.22) 0%, transparent 60%),- radial-gradient(ellipse at 78% 65%, rgba(255, 100, 180, 0.13) 0%, transparent 55%),- radial-gradient(ellipse at 50% 100%, rgba(140, 80, 220, 0.12) 0%, transparent 70%),- #000;-}--/* ── Star canvas ─────────────────────────────────────────────────────────── */--.h-star-canvas {- position: absolute;- left: 0;- top: 0;- width: 100%;- height: 200%;- pointer-events: none;- animation: h-star-drift 120s linear infinite;-}--@keyframes h-star-drift {- from {- transform: translateY(0);- }- to {- transform: translateY(-50%);- }-}--/* ── Ghost model (depth 3) ───────────────────────────────────────────────── */--.h-ghost-model {- position: absolute;- inset: 0;- width: 100%;- height: 100%;- background: transparent;- --poster-color: transparent;- opacity: 0.1;- filter: blur(0.5px);- pointer-events: none;-}--/* ── Vignette ────────────────────────────────────────────────────────────── */--.h-vignette {- position: absolute;- inset: 0;- background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(6, 7, 11, 0.7) 100%);- pointer-events: none;-}--/* ── CZ click + idle trick animations ───────────────────────────────────── */--/* applied to model-viewer only — ring/glow/badge stay put as a stable frame,- so the avatar visibly moves *inside* its container, not the whole page. */-.h-avatar-viewer.cz-fall,-.h-avatar-viewer.cz-spin,-.h-avatar-viewer.cz-pushup,-.h-avatar-viewer.cz-jump,-.h-avatar-viewer.cz-dance {- transform-origin: 50% 95%;-}--.h-avatar-viewer.cz-fall {- animation: cz-fall 1.4s cubic-bezier(0.4, 1.6, 0.6, 1) both;-}-.h-avatar-viewer.cz-spin {- animation: cz-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) both;-}-.h-avatar-viewer.cz-pushup {- animation: cz-pushup 1.8s ease-in-out both;-}-.h-avatar-viewer.cz-jump {- animation: cz-jump 0.9s cubic-bezier(0.3, 1.4, 0.6, 1) both;-}-.h-avatar-viewer.cz-dance {- animation: cz-dance 2s ease-in-out both;-}--@keyframes cz-fall {- 0% {- transform: rotate(0deg);- }- 35% {- transform: rotate(-22deg);- }- 55% {- transform: rotate(-22deg);- }- 78% {- transform: rotate(-18deg);- }- 100% {- transform: rotate(0deg);- }-}--@keyframes cz-spin {- 0% {- transform: rotateY(0) scale(1);- }- 50% {- transform: rotateY(180deg) scale(0.97);- }- 100% {- transform: rotateY(360deg) scale(1);- }-}--@keyframes cz-pushup {- 0%,- 100% {- transform: translateY(0);- }- 25% {- transform: translateY(8px) scale(1, 0.97);- }- 50% {- transform: translateY(0);- }- 75% {- transform: translateY(8px) scale(1, 0.97);- }-}--@keyframes cz-jump {- 0%,- 100% {- transform: translateY(0) scale(1, 1);- }- 30% {- transform: translateY(0) scale(1.05, 0.93);- }- 60% {- transform: translateY(-32px) scale(0.96, 1.06);- }- 85% {- transform: translateY(0) scale(1.04, 0.96);- }-}--@keyframes cz-dance {- 0%,- 100% {- transform: rotate(0) translateX(0);- }- 15% {- transform: rotate(4deg) translateX(-6px) translateY(-2px);- }- 40% {- transform: rotate(-5deg) translateX(6px) translateY(-1px);- }- 65% {- transform: rotate(3deg) translateX(-4px) translateY(-3px);- }- 85% {- transform: rotate(-2deg) translateX(4px) translateY(0);- }-}--/* ── Avatar centered in its depth-1 parallax layer ─────────────────────── */--.h-avatar-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- pointer-events: none;-}--.h-avatar-wrap {- position: relative;- width: clamp(340px, 42vw, 560px);- aspect-ratio: 1;- display: flex;- align-items: center;- justify-content: center;- pointer-events: auto;-}--/* ── Sticky text pinned bottom-left (same as features page act-content) ─── */--.h-hero-text {- position: sticky;- top: 0;- height: 100vh;- margin-bottom: -100vh;- z-index: 20;- display: flex;- flex-direction: column;- justify-content: flex-end;- padding: 0 var(--space-lg) clamp(2.5rem, 6vh, 5rem);- pointer-events: none;- max-width: 640px;-}--.h-hero-text > * {- pointer-events: auto;-}--/* ── Scroll-driven float on the avatar wrap ─────────────────────────────── */--@supports (animation-timeline: scroll()) {- .h-avatar-wrap {- animation: hero-avatar-float linear both;- animation-timeline: scroll(nearest);- animation-range: 0vh 160vh;- }-- @keyframes hero-avatar-float {- 0% {- transform: translateY(0) scale(1);- }- 60% {- transform: translateY(-24px) scale(1.03);- }- 100% {- transform: translateY(-56px) scale(0.94);- opacity: 0.3;- }- }-- .h-layer {- animation: h-layer-parallax linear both;- animation-timeline: view();- animation-range: entry 0% exit 100%;- }-- @keyframes h-layer-parallax {- from {- transform: translateY(calc(var(--depth, 0) * 30px));- }- to {- transform: translateY(calc(var(--depth, 0) * -30px));- }- }-}--/* ── Acts 2 & 3 base ────────────────────────────────────────────────────── */--.h-act {- position: relative;- height: 130vh;- overflow: hidden;- isolation: isolate;-}--.h-act-warp {- position: absolute;- top: 0;- left: 0;- right: 0;- height: 28vh;- pointer-events: none;- z-index: 25;-}--.h-act-warp--amber {- background: linear-gradient(- to bottom,- rgba(6, 7, 11, 1) 0%,- rgba(255, 255, 255, 0.04) 60%,- transparent 100%- );-}--.h-act-warp--mint {- background: linear-gradient(- to bottom,- rgba(6, 7, 11, 1) 0%,- rgba(110, 231, 183, 0.04) 60%,- transparent 100%- );-}--/* ── Act layer backgrounds ───────────────────────────────────────────────── */--.h-layer-bg {- position: absolute;- inset: 0;-}--.h-layer-bg--amber {- background:- radial-gradient(ellipse at 70% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 55%),- radial-gradient(ellipse at 20% 75%, rgba(255, 255, 255, 0.08) 0%, transparent 55%),- #000;-}--.h-layer-bg--mint {- background:- radial-gradient(ellipse at 30% 40%, rgba(110, 231, 183, 0.12) 0%, transparent 55%),- radial-gradient(ellipse at 70% 60%, rgba(56, 189, 248, 0.1) 0%, transparent 50%),- radial-gradient(ellipse at 80% 75%, rgba(255, 255, 255, 0.04) 0%, transparent 55%),- #000;-}--/* ── Act depth orbs ──────────────────────────────────────────────────────── */--.h-layer-orb {- position: absolute;- width: clamp(400px, 55vw, 800px);- aspect-ratio: 1;- border-radius: 50%;- filter: blur(80px);- opacity: 0.55;-}--.h-layer-orb--amber {- background: radial-gradient(circle, var(--accent), transparent 70%);- top: 12%;- left: 8%;-}--.h-layer-orb--mint {- background: radial-gradient(- circle,- color-mix(in srgb, #6ee7b7 60%, #38bdf8 40%),- transparent 70%- );- top: 18%;- right: 8%;-}--/* ── Floating word glyphs (Act 2 depth 4) ───────────────────────────────── */--.h-layer-words {- position: absolute;- inset: 0;- width: 100%;- height: 100%;-}--/* ── Chain ribbon (Act 3 depth 4) ────────────────────────────────────────── */--.h-layer-chains {- position: absolute;- inset: 0;- display: flex;- flex-wrap: wrap;- align-content: center;- justify-content: center;- gap: 1.5rem 2.5rem;- padding: 6rem 4rem;-}--.h-layer-chains .chain-pill {- font-family: var(--font-display);- font-size: 17px;- font-weight: 600;- letter-spacing: 0.08em;- color: rgba(110, 231, 183, 0.18);- text-transform: uppercase;- border: 1px solid rgba(110, 231, 183, 0.1);- border-radius: var(--radius-sm);- padding: 0.4rem 1rem;- white-space: nowrap;-}--/* ── Readability backdrop behind Act 3 sticky text ──────────────────────── */--.h-act--deploy .h-act-text::before {- content: '';- position: absolute;- inset: -2rem -2rem -2rem -2rem;- background: linear-gradient(- 100deg,- rgba(4, 12, 20, 0.96) 0%,- rgba(4, 12, 20, 0.88) 45%,- rgba(4, 12, 20, 0.45) 75%,- transparent 100%- );- z-index: -1;- pointer-events: none;- border-radius: 0 24px 24px 0;-}--/* ── Hero avatar traversing mode (falling animation) ────────────────────── */--.h-avatar-wrap--traversing {- position: absolute !important;- inset: 0 !important;- width: 100% !important;- height: 100% !important;- aspect-ratio: unset !important;- border-radius: 0 !important;- pointer-events: none;-}--.h-avatar-wrap--traversing #hero-avatar {- border-radius: 0 !important;-}--.h-avatar-wrap--traversing .h-avatar-ring,-.h-avatar-wrap--traversing .h-avatar-glow,-.h-avatar-wrap--traversing .h-avatar-badge {- display: none;-}--/* ── Ghost avatar (Act 3, depth 1) ──────────────────────────────────────── */--.h-avatar-wrap--ghost {- opacity: 0.18;- filter: blur(0.5px) hue-rotate(150deg) saturate(0.5);- pointer-events: none;-}--.h-avatar-stage--trio {- flex-direction: row;- align-items: flex-end;- justify-content: center;- gap: 4vw;- padding-bottom: 4vh;-}--.h-avatar-wrap--trio {- width: clamp(140px, 20vw, 300px);- aspect-ratio: 2 / 3;-}--.h-avatar-viewer--tall {- border-radius: var(--radius-sm);- display: block;- width: 100%;- height: 100%;-}--/* ── Sticky act text (same as h-hero-text but for acts 2/3) ─────────────── */--.h-act-text {- position: sticky;- top: 0;- height: 100vh;- margin-bottom: -100vh;- z-index: 20;- display: flex;- flex-direction: column;- justify-content: flex-end;- padding: 0 var(--space-lg) clamp(2.5rem, 6vh, 5rem);- pointer-events: none;- max-width: 640px;-}--.h-act-text > * {- pointer-events: auto;-}--.h-act-eyebrow {- display: inline-flex;- align-items: center;- gap: 0.5rem;- font-size: 13px;- font-weight: 500;- letter-spacing: 0.12em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.65);- margin-bottom: 1rem;- font-family: var(--font-display);-}--.h-act-dot {- width: 6px;- height: 6px;- border-radius: 50%;- background: var(--features-gold, #ffffff);- box-shadow: 0 0 12px var(--features-gold, #ffffff);-}--.h-act-dot--mint {- background: #6ee7b7;- box-shadow: 0 0 12px #6ee7b7;-}--.h-act-title {- font-size: clamp(2rem, 5.5vw, 4rem);- font-weight: 600;- line-height: 1.05;- letter-spacing: -0.02em;- margin: 0 0 1rem;- color: #fff;-}--.h-act-title em {- font-style: italic;- font-weight: 500;- color: #ffffff;-}--.h-act-title--mint em {- color: #6ee7b7;-}--.h-act-lede {- font-size: clamp(1rem, 1.4vw, 1.15rem);- line-height: 1.55;- color: rgba(255, 255, 255, 0.68);- max-width: 52ch;- margin: 0 0 1.4rem;-}--.h-act-cta {- display: flex;- gap: 0.75rem;- flex-wrap: wrap;- margin-top: 0.5rem;-}--/* ── Avatar picker ───────────────────────────────────────────────────────── */--.h-avatar-picker {- display: flex;- gap: 0.5rem;- margin-bottom: 1rem;-}--.h-av-opt {- padding: 0.45rem 1.1rem;- background: rgba(255, 255, 255, 0.04);- border: 1px solid rgba(255, 255, 255, 0.12);- border-radius: var(--radius-sm);- color: rgba(255, 255, 255, 0.65);- font-size: 13px;- font-weight: 500;- font-family: var(--font-display);- cursor: pointer;- transition: all 0.2s ease;-}--.h-av-opt[aria-pressed='true'] {- background: rgba(255, 255, 255, 0.16);- border-color: #ffffff;- color: #ffffff;-}--.h-av-opt:hover {- border-color: rgba(255, 255, 255, 0.3);- color: #fff;-}--/* ── Animation chips ─────────────────────────────────────────────────────── */--.h-anim-chips {- display: flex;- flex-wrap: wrap;- gap: 0.5rem;- margin-bottom: 1.2rem;-}--.h-anim-chip {- display: inline-flex;- align-items: center;- gap: 0.35rem;- padding: 0.5rem 0.9rem;- background: rgba(255, 255, 255, 0.04);- border: 1px solid rgba(255, 255, 255, 0.2);- border-radius: var(--radius-sm);- color: rgba(255, 255, 255, 0.8);- font-size: 13px;- font-weight: 500;- font-family: var(--font-display);- cursor: pointer;- transition: all 0.15s ease;-}--.h-anim-chip:hover,-.h-anim-chip[data-active='true'] {- background: rgba(255, 255, 255, 0.16);- border-color: #ffffff;- color: #ffffff;-}--.h-anim-chip[hidden] {- display: none;-}--/* ── Deploy form ─────────────────────────────────────────────────────────── */--.h-deploy-form {- display: flex;- flex-direction: column;- gap: 1rem;- max-width: 400px;-}--.h-form-row {- display: flex;- flex-direction: column;- gap: 0.35rem;-}--.h-form-label {- font-size: 11px;- font-weight: 500;- letter-spacing: 0.12em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.42);- font-family: var(--font-display);-}--.h-form-input,-.h-form-select {- background: rgba(255, 255, 255, 0.04);- border: 1px solid rgba(110, 231, 183, 0.25);- border-radius: var(--radius-sm);- padding: 0.7rem 1rem;- color: #fff;- font-size: 15px;- font-family: var(--font-display);- outline: none;- transition: border-color 0.2s ease;- width: 100%;-}--.h-form-input:focus,-.h-form-select:focus {- border-color: #6ee7b7;- background: rgba(110, 231, 183, 0.04);-}--.h-form-input::placeholder {- color: rgba(255, 255, 255, 0.22);-}--.h-form-select option {- background: #0a120e;- color: #fff;-}--.h-deploy-stats {- display: flex;- gap: 2rem;- padding: 0.5rem 0;-}--.h-stat-label {- display: block;- font-size: 10px;- letter-spacing: 0.14em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.38);- font-family: var(--font-display);- margin-bottom: 0.2rem;-}--.h-stat-val {- display: block;- font-size: 1.15rem;- font-weight: 600;- color: #6ee7b7;- font-family: var(--font-display);-}--.h-btn-deploy {- background: #6ee7b7 !important;- color: #04201a !important;- border-color: #6ee7b7 !important;- width: fit-content;-}--/* ── Flat sections below hero need explicit bg to cover star layer ───────── */--.home-parallax .h-section,-.home-parallax .h-section-dark,-.home-parallax .h-cta-section,-.home-parallax .h-footer {- position: relative;- z-index: 30;- background: #070707;-}--.home-parallax .h-section-dark {- background: rgba(255, 255, 255, 0.018);-}--/* ── Skip to content (a11y) ── */--.h-skip-link {- position: absolute;- top: 0;- left: 0;- padding: 0.6rem 1rem;- background: #fff;- color: #000;- font-size: var(--text-sm);- font-weight: 500;- text-decoration: none;- border-radius: 0 0 var(--radius-sm) 0;- transform: translateY(-110%);- transition: transform 0.18s ease;- z-index: 9999;-}--.h-skip-link:focus {- transform: translateY(0);- outline: 2px solid #ffffff;- outline-offset: 2px;-}--/* ── Focus-visible outlines (a11y) ── */--.home-page a:focus-visible,-.home-page button:focus-visible,-.home-nav a:focus-visible,-.h-btn-primary:focus-visible,-.h-btn-ghost:focus-visible,-.h-feature-link:focus-visible,-.h-footer a:focus-visible {- outline: 2px solid #ffffff;- outline-offset: 3px;- border-radius: var(--radius-sm);-}--.home-main {- width: 100%;-}--/* All .home-nav styles (desktop dropdowns + mobile hamburger panel) live in- /public/nav.css. The previous duplicate here overrode nav.css's mobile- media query and prevented the menu from collapsing on phones. */--/* ── Scroll reveal ── */--.h-reveal {- opacity: 0;- transform: translateY(20px);- transition:- opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),- transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);-}--.h-reveal.revealed {- opacity: 1;- transform: translateY(0);-}--/* ── Hero ── */--.h-hero {- position: relative;- display: grid;- grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);- align-items: center;- gap: var(--space-2xl);- min-height: 100vh;- max-width: 1280px;- margin: 0 auto;- padding: calc(var(--space-2xl) + 2rem) var(--space-lg) var(--space-2xl);- overflow: hidden;- isolation: isolate;-}--.h-hero-bg {- position: absolute;- inset: 0;- pointer-events: none;- z-index: 0;- overflow: hidden;-}--.h-hero-grid {- position: absolute;- inset: -1px;- background-image:- linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),- linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);- background-size: 64px 64px;- mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);- -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);-}--.h-hero-mesh {- position: absolute;- inset: -20%;- background:- radial-gradient(40% 50% at 72% 38%, rgba(255, 255, 255, 0.13) 0%, transparent 60%),- radial-gradient(35% 45% at 20% 72%, rgba(80, 200, 255, 0.08) 0%, transparent 65%),- radial-gradient(55% 40% at 50% 100%, rgba(120, 80, 255, 0.05) 0%, transparent 60%);- filter: blur(40px);- animation: hMeshDrift 20s ease-in-out infinite alternate;-}--@keyframes hMeshDrift {- 0% {- transform: translate3d(0, 0, 0) scale(1);- }- 50% {- transform: translate3d(-2%, 1.5%, 0) scale(1.04);- }- 100% {- transform: translate3d(2%, -1%, 0) scale(1.02);- }-}--.h-hero-glow-a {- position: absolute;- width: 700px;- height: 700px;- border-radius: 50%;- background: radial-gradient(circle, rgba(255, 255, 255, 0.11) 0%, transparent 65%);- top: 38%;- right: -6%;- transform: translateY(-50%);- filter: blur(18px);- animation: hBreath 6s ease-in-out infinite;-}--.h-hero-glow-b {- position: absolute;- width: 400px;- height: 400px;- border-radius: 50%;- background: radial-gradient(circle, rgba(80, 220, 255, 0.07) 0%, transparent 65%);- bottom: -8%;- left: -2%;- filter: blur(18px);- animation: hBreathB 9s ease-in-out infinite;-}--@keyframes hBreath {- 0%,- 100% {- opacity: 0.85;- transform: translateY(-50%) scale(1);- }- 50% {- opacity: 1;- transform: translateY(-50%) scale(1.06);- }-}--@keyframes hBreathB {- 0%,- 100% {- opacity: 0.7;- transform: scale(1);- }- 50% {- opacity: 1;- transform: scale(1.09);- }-}--/* ── Hero content ── */--.h-hero-content {- position: relative;- z-index: 2;-}--.h-eyebrow {- display: inline-flex;- align-items: center;- gap: 0.6rem;- padding: 0.5rem 1.1rem;- background: rgba(255, 255, 255, 0.08);- border: 1px solid rgba(255, 255, 255, 0.25);- border-radius: var(--radius-sm);- font-size: 0.85rem;- color: rgba(255, 255, 255, 0.9);- letter-spacing: 0.01em;- margin-bottom: var(--space-lg);- backdrop-filter: blur(12px);- -webkit-backdrop-filter: blur(12px);- font-family: var(--font-display);- font-weight: 500;-}--.h-eyebrow-dot {- width: 6px;- height: 6px;- border-radius: 50%;- background: var(--success);- box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);- animation: hDotPulse 2.4s ease-out infinite;-}--@keyframes hDotPulse {- 0% {- box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);- }- 70% {- box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);- }- 100% {- box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);- }-}--.h-title {- font-family: var(--font-display);- font-size: clamp(3.2rem, 8.5vw, 6.4rem);- font-weight: 700;- color: #fff;- line-height: 0.98;- margin: 0 0 var(--space-lg);- letter-spacing: -0.04em;- text-wrap: balance;-}--.h-title em {- font-style: normal;- background: linear-gradient(100deg, #ffffff 0%, #ffffff 25%, #ff5ea0 55%, #b96bff 85%);- background-size: 220% 100%;- -webkit-background-clip: text;- background-clip: text;- color: transparent;- animation: hTitleShimmer 6s ease-in-out infinite;-}--@keyframes hTitleShimmer {- 0%,- 100% {- background-position: 0% 50%;- }- 50% {- background-position: 100% 50%;- }-}--.h-subtitle {- font-size: clamp(1.1rem, 1.4vw, 1.32rem);- color: rgba(255, 255, 255, 0.72);- font-weight: 400;- line-height: 1.55;- max-width: 32em;- margin: 0 0 var(--space-xl);-}--.h-cta-row {- display: flex;- gap: var(--space-md);- flex-wrap: wrap;- margin-bottom: var(--space-xl);-}--.h-btn-primary {- display: inline-flex;- align-items: center;- gap: 0.55em;- padding: 0.95rem 1.85rem;- background: #ffffff;- color: #1a0f08;- font-size: 0.95rem;- font-weight: 600;- border-radius: var(--radius-sm);- text-decoration: none;- letter-spacing: 0.005em;- font-family: var(--font-display);- transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);- box-shadow:- 0 6px 24px -8px rgba(255, 255, 255, 0.55),- 0 0 0 1px rgba(255, 255, 255, 0.05) inset;-}--.h-btn-primary:hover {- transform: translateY(-2px) scale(1.02);- box-shadow:- 0 12px 32px -8px rgba(255, 255, 255, 0.7),- 0 0 0 1px rgba(255, 255, 255, 0.1) inset;-}--.h-btn-primary .arrow {- transition: transform 0.25s ease;-}--.h-btn-primary:hover .arrow {- transform: translateX(3px);-}--.h-btn-ghost {- display: inline-flex;- align-items: center;- gap: 0.4em;- padding: 0.95rem 1.6rem;- color: rgba(255, 255, 255, 0.85);- font-size: 0.95rem;- font-weight: 500;- text-decoration: none;- letter-spacing: 0.005em;- font-family: var(--font-display);- border: 1px solid rgba(255, 255, 255, 0.18);- border-radius: var(--radius-sm);- transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);- background: rgba(255, 255, 255, 0.03);- backdrop-filter: blur(8px);- -webkit-backdrop-filter: blur(8px);-}--.h-btn-ghost:hover {- color: #fff;- border-color: rgba(255, 255, 255, 0.5);- background: rgba(255, 255, 255, 0.06);- transform: translateY(-1px);-}--.h-standards {- list-style: none;- padding: 0;- margin: 0;- display: flex;- flex-wrap: wrap;- gap: var(--space-md) var(--space-lg);- font-family: var(--font-mono);- font-size: 0.68rem;- color: rgba(255, 255, 255, 0.3);- letter-spacing: 0.14em;- text-transform: uppercase;-}--.h-standards li {- position: relative;-}--.h-standards li + li::before {- content: '';- position: absolute;- left: calc(var(--space-lg) * -0.5);- top: 50%;- width: 2px;- height: 2px;- border-radius: 50%;- background: rgba(255, 255, 255, 0.2);- transform: translateY(-50%);-}--/* ── Hero avatar column ── */--.h-hero-visual {- position: relative;- z-index: 1;- width: 100%;- aspect-ratio: 1 / 1;- max-width: 600px;- justify-self: end;- display: flex;- align-items: center;- justify-content: center;-}--.h-avatar-viewer {- width: 100%;- height: 100%;- background: transparent;- --poster-color: transparent;- border-radius: 50%;- outline: none;- position: relative;- z-index: 2;-}--.h-avatar-ring {- position: absolute;- inset: 4%;- border-radius: 50%;- background: conic-gradient(- from 140deg,- rgba(255, 255, 255, 0) 0deg,- rgba(255, 255, 255, 0.55) 60deg,- rgba(255, 100, 180, 0.4) 180deg,- rgba(157, 140, 255, 0.35) 260deg,- rgba(255, 255, 255, 0) 360deg- );- filter: blur(1px);- opacity: 0.9;- animation: hRingSpin 30s linear infinite;- mask: radial-gradient(circle, transparent 56%, #000 57%, #000 64%, transparent 65%);- -webkit-mask: radial-gradient(circle, transparent 56%, #000 57%, #000 64%, transparent 65%);- pointer-events: none;- z-index: 1;-}--@keyframes hRingSpin {- to {- transform: rotate(360deg);- }-}--.h-avatar-glow {- position: absolute;- inset: 8%;- border-radius: 50%;- background:- radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),- radial-gradient(circle at 40% 70%, rgba(125, 249, 255, 0.07) 0%, transparent 55%);- box-shadow: 0 40px 120px -20px rgba(255, 255, 255, 0.16);- animation: hBreath 5s ease-in-out infinite;- pointer-events: none;- z-index: 0;-}--.h-avatar-badge {- position: absolute;- bottom: 9%;- right: 0;- display: inline-flex;- align-items: center;- gap: 0.6em;- padding: 0.5rem 0.9rem;- background: rgba(10, 10, 14, 0.72);- border: 1px solid rgba(255, 255, 255, 0.07);- border-radius: var(--radius-lg);- font-family: var(--font-mono);- font-size: 0.68rem;- color: rgba(255, 255, 255, 0.75);- backdrop-filter: blur(12px);- -webkit-backdrop-filter: blur(12px);- z-index: 3;- box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);-}--.h-avatar-badge-label {- color: rgba(255, 255, 255, 0.65);- letter-spacing: 0.08em;- text-transform: uppercase;- font-size: 0.58rem;-}--.h-scroll-hint {- position: absolute;- bottom: var(--space-lg);- left: 50%;- transform: translateX(-50%);- display: flex;- flex-direction: column;- align-items: center;- gap: 0.5rem;- font-family: var(--font-mono);- font-size: 0.58rem;- color: rgba(255, 255, 255, 0.22);- letter-spacing: 0.25em;- text-transform: uppercase;- z-index: 2;- pointer-events: none;-}--.h-scroll-line {- width: 1px;- height: 32px;- background: linear-gradient(to bottom, rgba(255, 255, 255, 0.28), transparent);- animation: hScrollLine 2.2s ease-in-out infinite;- transform-origin: top;-}--@keyframes hScrollLine {- 0% {- transform: scaleY(0);- opacity: 0;- }- 40% {- opacity: 1;- }- 100% {- transform: scaleY(1);- opacity: 0;- }-}--/* ── Section base ── */--.h-section {- padding: var(--space-2xl) var(--space-lg);- max-width: 1080px;- margin: 0 auto;-}--.h-section-dark {- max-width: none;- background: rgba(255, 255, 255, 0.018);- border-top: 1px solid rgba(255, 255, 255, 0.04);- border-bottom: 1px solid rgba(255, 255, 255, 0.04);- padding: var(--space-2xl) var(--space-lg);-}--.h-section-dark > .h-section-inner {- max-width: 1080px;- margin: 0 auto;-}--.h-section-label {- font-family: var(--font-display);- font-size: 0.78rem;- color: rgba(255, 255, 255, 0.85);- letter-spacing: 0.18em;- text-transform: uppercase;- margin: 0 0 1rem;- text-align: center;- font-weight: 600;-}--.h-section-title {- font-family: var(--font-display);- font-size: clamp(2.2rem, 4.2vw, 3.6rem);- font-weight: 700;- color: #fff;- line-height: 1.05;- margin: 0 0 var(--space-md);- text-align: center;- letter-spacing: -0.03em;- text-wrap: balance;-}--.h-section-sub {- font-size: var(--text-base);- color: rgba(255, 255, 255, 0.4);- font-weight: 300;- text-align: center;- max-width: 36em;- margin: 0 auto var(--space-2xl);- line-height: var(--leading-normal);-}--/* ── Steps ── */--.h-steps {- display: grid;- grid-template-columns: repeat(3, 1fr);- gap: var(--space-xl);- position: relative;-}--.h-steps::before {- content: '';- position: absolute;- top: 1.8rem;- left: calc(33.333% + 1rem);- right: calc(33.333% + 1rem);- height: 1px;- background: linear-gradient(to right, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));-}--.h-step {- padding: var(--space-lg);- border: 1px solid rgba(255, 255, 255, 0.06);- border-radius: var(--radius-lg);- transition:- border-color 0.3s ease,- transform 0.3s ease;- position: relative;-}--.h-step:hover {- border-color: rgba(255, 255, 255, 0.12);- transform: translateY(-2px);-}--.h-step-num {- font-family: var(--font-mono);- font-size: var(--text-2xl);- font-weight: 600;- color: rgba(255, 255, 255, 0.13);- line-height: 1;- margin-bottom: var(--space-sm);-}--.h-step h3 {- color: #fff;- font-size: var(--text-lg);- font-weight: 500;- margin: 0 0 var(--space-xs);-}--.h-step p {- color: rgba(255, 255, 255, 0.42);- font-size: var(--text-sm);- line-height: var(--leading-normal);- margin: 0;-}--/* ── Feature rows (alternating, Avaturn-style) ── */--.h-feature {- display: grid;- grid-template-columns: 1fr 1fr;- gap: var(--space-2xl);- align-items: center;- padding: var(--space-2xl) var(--space-lg);- max-width: 1080px;- margin: 0 auto;-}--.h-feature.h-feature-flip {- direction: rtl;-}--.h-feature.h-feature-flip > * {- direction: ltr;-}--.h-feature-text h3 {- font-size: clamp(1.5rem, 2.5vw, 2.2rem);- font-weight: 600;- color: #fff;- line-height: 1.1;- margin: 0 0 var(--space-md);- letter-spacing: -0.02em;-}--.h-feature-text p {- font-size: var(--text-base);- color: rgba(255, 255, 255, 0.45);- font-weight: 300;- line-height: var(--leading-normal);- margin: 0 0 var(--space-lg);-}--.h-feature-link {- display: inline-flex;- align-items: center;- gap: 0.4em;- font-size: var(--text-sm);- color: rgba(255, 255, 255, 0.75);- text-decoration: none;- letter-spacing: 0.02em;- transition:- color 0.2s ease,- gap 0.2s ease;-}--.h-feature-link:hover {- color: #ffffff;- gap: 0.7em;-}--.h-feature-visual {- border-radius: var(--radius-lg);- background: rgba(255, 255, 255, 0.02);- border: 1px solid rgba(255, 255, 255, 0.06);- overflow: hidden;- display: flex;- align-items: center;- justify-content: center;- min-height: 280px;- position: relative;-}--.h-feature-visual model-viewer {- width: 100%;- height: 320px;- background: transparent;- --poster-color: transparent;-}--/* Widget preview card */-.h-widget-preview {- padding: var(--space-lg);- width: 100%;-}--.h-widget-card {- background: rgba(255, 255, 255, 0.03);- border: 1px solid rgba(255, 255, 255, 0.07);- border-radius: var(--radius-lg);- padding: var(--space-md);- margin-bottom: var(--space-sm);-}--.h-widget-card-label {- font-family: var(--font-mono);- font-size: 0.65rem;- color: rgba(255, 255, 255, 0.6);- letter-spacing: 0.12em;- text-transform: uppercase;- margin-bottom: var(--space-xs);-}--.h-widget-card-title {- color: #fff;- font-size: var(--text-sm);- font-weight: 500;- margin-bottom: var(--space-xs);-}--.h-widget-card-desc {- color: rgba(255, 255, 255, 0.35);- font-size: 0.75rem;-}--.h-embed-code {- background: var(--bg-0);- border: 1px solid rgba(255, 255, 255, 0.05);- border-radius: var(--radius-sm);- padding: var(--space-sm) var(--space-md);- font-family: var(--font-mono);- font-size: 0.68rem;- color: rgba(255, 255, 255, 0.45);- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;- margin-top: var(--space-sm);-}--.h-embed-code .tag {- color: rgba(125, 200, 255, 0.8);-}-.h-embed-code .attr {- color: rgba(168, 204, 140, 0.8);-}--/* Identity card */-.h-identity-card {- padding: var(--space-lg);- width: 100%;-}--.h-id-header {- display: flex;- align-items: center;- gap: var(--space-sm);- margin-bottom: var(--space-md);-}--.h-id-dot {- width: 8px;- height: 8px;- border-radius: 50%;- background: var(--success);-}--.h-id-title {- font-family: var(--font-mono);- font-size: 0.7rem;- color: rgba(255, 255, 255, 0.5);- letter-spacing: 0.08em;-}--.h-id-row {- display: flex;- justify-content: space-between;- align-items: center;- padding: var(--space-xs) 0;- border-bottom: 1px solid rgba(255, 255, 255, 0.04);- font-size: 0.75rem;-}--.h-id-row:last-child {- border-bottom: none;-}--.h-id-key {- font-family: var(--font-mono);- color: rgba(255, 255, 255, 0.3);- letter-spacing: 0.05em;-}--.h-id-val {- color: rgba(255, 255, 255, 0.65);- font-family: var(--font-mono);- font-size: 0.7rem;-}--.h-id-val.gold {- color: rgba(255, 255, 255, 0.7);-}--/* ── Final CTA ── */--.h-cta-section {- position: relative;- z-index: 30;- text-align: center;- padding: clamp(5rem, 12vh, 10rem) var(--space-lg);- background:- radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 50%),- radial-gradient(ellipse at 50% 100%, rgba(140, 80, 220, 0.12) 0%, transparent 50%),- linear-gradient(180deg, rgba(26, 14, 8, 0.6) 0%, #070707 80%);- overflow: hidden;-}--.h-cta-section::before {- content: '';- position: absolute;- top: 0;- left: 50%;- width: 1px;- height: 60px;- background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.6), transparent);- transform: translateX(-50%);-}--.h-cta-section h2 {- font-family: var(--font-display);- font-size: clamp(2.6rem, 6vw, 4.6rem);- font-weight: 700;- color: #fff;- line-height: 1;- margin: 0 0 1.2rem;- letter-spacing: -0.035em;- text-wrap: balance;-}--.h-cta-section p {- font-size: 1.15rem;- color: rgba(255, 255, 255, 0.6);- margin: 0 0 2rem;- font-family: var(--font-display);-}--.h-cta-row-center {- display: flex;- gap: var(--space-md);- justify-content: center;- flex-wrap: wrap;-}--/* ── Footer base (overridden by .h-footer-horizon above) ── */--.h-footer {- position: static;- padding: var(--space-xl) var(--space-lg);- pointer-events: auto;-}--/* ── Responsive ── */--@media (prefers-reduced-motion: reduce) {- .h-hero-mesh,- .h-hero-glow-a,- .h-hero-glow-b,- .h-avatar-ring,- .h-avatar-glow,- .h-eyebrow-dot,- .h-title em,- .h-scroll-line,- .h-star-canvas {- animation: none !important;- }-- .home-parallax {- perspective: none;- height: auto;- overflow: visible;- }-- .h-hero-act {- height: auto;- min-height: 100vh;- }-- .h-layer {- transform: none;- animation: none;- }-- .h-hero-text {- position: relative;- height: auto;- margin-bottom: 0;- }-}--@media screen and (max-width: 768px) {- .home-parallax {- perspective: none;- height: auto;- overflow: visible;- }-- .h-hero-act {- height: auto;- min-height: 100vh;- }-- .h-layer {- transform: none;- animation: none;- position: absolute;- }-- /* No GPU compositing hints needed on mobile — perspective is disabled and- will-change just wastes VRAM on low-end devices. */- .h-bento-visual,- .h-avatar-wrap {- will-change: auto;- transform: none;- }-- .h-avatar-stage {- position: relative;- height: 55vw;- min-height: 280px;- }-- .h-avatar-wrap {- width: clamp(240px, 70vw, 360px);- }-- .h-hero-text {- position: relative;- height: auto;- margin-bottom: 0;- padding: var(--space-lg) var(--space-md) var(--space-xl);- text-align: center;- }-- .h-cta-row {- justify-content: center;- }-- .h-standards {- justify-content: center;- }-- .h-cta-row {- justify-content: center;- }-- .h-standards {- justify-content: center;- }-- .h-steps {- grid-template-columns: 1fr;- gap: var(--space-md);- }-- .h-steps::before {- display: none;- }-- .h-feature {- grid-template-columns: 1fr;- gap: var(--space-lg);- padding: var(--space-xl) var(--space-md);- }-- .h-feature.h-feature-flip {- direction: ltr;- }-- .h-section {- padding: var(--space-xl) var(--space-md);- }-- .h-section-dark {- padding: var(--space-xl) var(--space-md);- }-- .h-scroll-hint {- display: none;- }-}--/* ── prefers-reduced-motion ──────────────────────────────────────────────── */-/*- * Users who request reduced motion (vestibular disorders, slow devices, battery- * saver) get: no looping animations, instant transitions, no parallax.- * WebGL viewers are still shown but stop auto-rotating (handled in JS).- */-@media (prefers-reduced-motion: reduce) {- /* kill ALL CSS animations and transitions site-wide */- *,- *::before,- *::after {- animation-duration: 0.01ms !important;- animation-iteration-count: 1 !important;- transition-duration: 0.01ms !important;- scroll-behavior: auto !important;- }-- /* reveal elements immediately — no fade/slide in */- .h-reveal {- opacity: 1;- transform: none;- }-- /* hide the star canvas entirely — it's decorative */- .h-star-canvas {- display: none;- }-- /* flatten the CSS scroll-driven parallax layers */- .h-layer {- transform: none !important;- }-- /* stop the hero avatar scroll-based float */- .h-avatar-wrap {- animation: none !important;- }-- /* stop ambient glow / mesh drift */- .h-hero-mesh,- .h-hero-glow-a,- .h-hero-glow-b,- .h-hero-haze {- animation: none !important;- }-- /* stop the floor scroll ribbon */- .h-floor-ribbon {- animation: none !important;- }-- /* stop the status dot pulse */- .h-status-dot::before {- animation: none !important;- }-}--@media (max-width: 768px) {- .h-form-select,- .h-form-input {- font-size: max(16px, 1em);- }-}+ :root {+ color-scheme: dark;+ /* Home-local names track the canonical /tokens.css vocabulary so this+ page reads as one product with the rest of the site AND flips cleanly+ between themes. --bg / --text / --text-2..4 / --hairline* are the+ shared "nav-source" tokens: declared here for the dark brand palette+ and remapped by [data-theme='light'] in tokens.css. --surface-1..3 and+ --accent are NOT re-forked here — they inherit their canonical values+ (which already flip). The three home-only tokens canonical can't reach+ (--surface-0 / --green / --accent-2) get their light values in the+ scoped [data-theme='light'] block just below. */+ --bg: var(--bg-0); /* #0a0a0a — same near-black as the app shell */+ --surface-0: #0e0e0f; /* opaque card / panel fill; light value set below */+ --hairline: var(--stroke);+ --hairline-strong: var(--stroke-strong);+ --text: #f6f6f6;+ --text-2: #a8a8a8;+ --text-3: #8a8a8a; /* AA: ≥4.5:1 on dark surfaces for secondary text */+ --text-4: #6e6e6e; /* AA: ≥3:1 (large/decorative only) */+ --accent-2: var(--accent);+ --green: var(--ink);+ --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;+ --font-body: 'Inter', system-ui, sans-serif;+ --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;+ }++ /* ── Light theme (home-local) ───────────────────────────────────────────+ Dark is the primary brand palette. tokens.css already flips the shared+ nav-source tokens under [data-theme='light']; these rules cover the+ home-only tokens and the handful of hardcoded surfaces canonical can't+ reach, so the page stays fully legible and on-brand in light mode. */+ :root[data-theme='light'] {+ --surface-0: var(--bg-1); /* #f3f4f6 — light card/panel on the white page */+ }+ /* Selection-state chips hardcode white tints — re-map to ink tints on light+ so the active/selected control stays visible. */+ [data-theme='light'] .pg-chip.active {+ border-color: var(--stroke-strong); background: var(--surface-3); color: var(--ink);+ }+ [data-theme='light'] .hero-chip[data-active="true"] {+ border-color: var(--stroke-strong); background: var(--surface-3); color: var(--ink);+ }+ /* Code-editor syntax spans hardcode light greys (legible only on a dark+ pane). On a light pane, re-map them to dark inks + the accent for strings. */+ [data-theme='light'] .pg-editor pre .tag,+ [data-theme='light'] .code-pane pre .tag { color: var(--ink); }+ [data-theme='light'] .pg-editor pre .attr,+ [data-theme='light'] .code-pane pre .attr { color: var(--ink-dim); }+ [data-theme='light'] .pg-editor pre .str,+ [data-theme='light'] .code-pane pre .str,+ [data-theme='light'] .dev-code .str,+ [data-theme='light'] .bento-code .str { color: var(--accent); }+ [data-theme='light'] .dev-code .num { color: var(--ink-dim); }+ /* Selection states that use pure-white tints (correct on dark) need ink+ equivalents on light so the active control stays visible. */+ [data-theme='light'] .bento-pill-btn.active {+ border-color: var(--stroke-strong); background: var(--surface-3); color: var(--ink);+ }+ [data-theme='light'] #home-sniper .snipe-stage.active .snipe-node,+ [data-theme='light'] #home-sniper .snipe-stage.flow .snipe-node {+ border-color: var(--accent); color: var(--accent);+ }+ * { box-sizing: border-box; }+ html { scroll-behavior: smooth; }+ html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }+ body {+ font-size: 15.5px; line-height: 1.55;+ min-height: 100vh; overflow-x: hidden;+ -webkit-font-smoothing: antialiased;+ text-rendering: optimizeLegibility;+ }+ a { color: inherit; text-decoration: none; }+ button { font-family: inherit; cursor: pointer; }+ ::selection { background: var(--text); color: var(--bg); }+ main#main-content { display: block; outline: none; }+ .skip-link {+ position: fixed; top: 12px; left: 12px; z-index: 1000;+ transform: translateY(-150%);+ padding: 10px 16px; border-radius: 8px;+ background: var(--text); color: var(--bg);+ font-family: var(--font-mono); font-size: 13px; font-weight: 600;+ text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,0.5);+ transition: transform 0.18s ease;+ }+ .skip-link:focus-visible { transform: translateY(0); outline: 2px solid var(--accent); outline-offset: 2px; }+ .wrap-1280 { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }+ .wrap-1440 { max-width: 1440px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }+ @media (max-width: 720px) { .wrap-1280, .wrap-1440 { padding-left: 20px; padding-right: 20px; } }++ /* Header/nav styles live in /nav.css (loaded by /nav.js). */++ /* Buttons: canonical shared system — see public/buttons.css (loaded above). */+ .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }++ /* ── HERO ────────────────────────────────────────────────── */+ .hero {+ display: grid; grid-template-columns: 1.05fr 1fr;+ gap: 0; min-height: calc(100vh - 57px); position: relative;+ }+ .hero::after {+ content: ""; position: absolute; left: 50%; top: 0; bottom: 0;+ width: 1px; background: var(--hairline);+ }+ @media (max-width: 980px) { .hero { grid-template-columns: 1fr; min-height: 0; } .hero::after { display: none; } .hero-text, .hero-stage { min-width: 0; } }+ .hero-text {+ padding: 96px 48px 96px 72px;+ display: flex; flex-direction: column; justify-content: center;+ }+ @media (max-width: 980px) { .hero-text { padding: 64px 20px 32px; } }+ .eyebrow {+ display: inline-flex; align-items: center; gap: 10px;+ font-family: var(--font-mono); font-size: 11.5px;+ text-transform: uppercase; letter-spacing: 0.18em;+ color: var(--text-3); margin-bottom: 32px;+ }+ .eyebrow::before {+ content: ""; width: 6px; height: 6px; border-radius: 50%;+ background: var(--green); box-shadow: 0 0 6px var(--green);+ animation: pulse-green 2.4s ease-in-out infinite;+ }+ @keyframes pulse-green { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }+ a.eyebrow {+ color: var(--text-2); text-decoration: none;+ padding: 7px 14px 7px 12px; margin-left: -12px;+ border: 1px solid var(--hairline); border-radius: 999px;+ transition: color 0.15s, border-color 0.15s, background 0.15s;+ }+ a.eyebrow .eyebrow-arrow { display: inline-block; transition: transform 0.15s; }+ a.eyebrow:hover, a.eyebrow:focus-visible {+ color: var(--text); border-color: var(--hairline-strong);+ background: rgba(255, 255, 255, 0.03);+ }+ a.eyebrow:hover .eyebrow-arrow, a.eyebrow:focus-visible .eyebrow-arrow { transform: translateX(3px); }+ h1.hero-h {+ font-family: var(--font-display);+ font-size: clamp(52px, 6.8vw, 108px);+ line-height: 0.92; letter-spacing: -0.045em;+ font-weight: 600; margin: 0 0 32px; color: var(--text);+ }+ h1.hero-h em { font-style: normal; color: var(--text-3); font-weight: 500; }+ .hero-sub {+ font-size: 18px; color: var(--text-2);+ max-width: 500px; margin: 0 0 36px; line-height: 1.55; font-weight: 400;+ }+ .hero-bullets {+ list-style: none; padding: 0; margin: 0 0 40px;+ display: flex; flex-direction: column; gap: 10px;+ }+ .hero-bullets li {+ display: flex; align-items: center; gap: 12px;+ font-size: 15px; color: var(--text-2);+ min-width: 0;+ }+ .hero-bullets li::before {+ content: ""; width: 5px; height: 5px; border-radius: 50%;+ background: var(--text-3); flex-shrink: 0;+ }+ /* On phones a bullet's sentence must wrap as one paragraph. Flex would+ split <strong>/glossary spans into separate wrapping items, so switch+ the row to normal inline flow with the dot as an inline marker. */+ @media (max-width: 560px) {+ .hero-bullets li {+ display: block; padding-left: 17px; position: relative;+ }+ .hero-bullets li::before {+ position: absolute; left: 0; top: 0.62em; transform: translateY(-50%);+ }+ }+ .hero-bullets li strong { color: var(--text); font-weight: 550; }++ /* ── Hero forge bar: the primary hero affordance ───────────────────── */+ .hero-forge {+ display: flex; align-items: center; gap: 10px;+ width: 100%; max-width: 560px; margin: 4px 0 12px;+ padding: 7px 7px 7px 16px; border-radius: 14px;+ background:+ linear-gradient(var(--surface-0), var(--surface-0)) padding-box,+ linear-gradient(120deg, rgba(255,180,84,.55), rgba(255,106,213,.55) 38%, rgba(139,92,246,.55) 64%, rgba(79,195,255,.55)) border-box;+ border: 1.5px solid transparent;+ box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 8px 30px -18px rgba(139,92,246,.5);+ transition: box-shadow .25s ease, transform .25s ease;+ }+ .hero-forge:focus-within {+ box-shadow: 0 0 0 4px rgba(139,92,246,.16), 0 10px 34px -16px rgba(139,92,246,.6);+ transform: translateY(-1px);+ }+ .hero-forge-glyph {+ font-size: 15px; line-height: 1; flex: 0 0 auto;+ background: linear-gradient(120deg, #ffb454, #ff6ad5 40%, #8b5cf6 66%, #4fc3ff);+ -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;+ animation: hero-forge-glyph-spin 8s linear infinite;+ }+ @keyframes hero-forge-glyph-spin { to { transform: rotate(360deg); } }+ .hero-forge-input {+ flex: 1 1 auto; min-width: 0;+ background: transparent; border: 0; outline: 0; padding: 8px 2px;+ color: var(--text); font-family: var(--font-body); font-size: 15px; letter-spacing: -0.01em;+ }+ .hero-forge-input::placeholder { color: var(--text-3); }+ .hero-forge-go {+ flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;+ padding: 10px 16px; border-radius: 9px; cursor: pointer;+ font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: -0.01em;+ color: #0a0a0a; border: 0;+ background: linear-gradient(120deg, #ffb454, #ff6ad5 40%, #8b5cf6 66%, #4fc3ff);+ background-size: 160% 160%; background-position: 0% 50%;+ transition: background-position .5s ease, box-shadow .25s ease, transform .12s ease, opacity .2s ease;+ }+ .hero-forge-go .arrow { transition: transform .2s ease; }+ .hero-forge-go:hover { background-position: 100% 50%; box-shadow: 0 0 22px -4px rgba(139,92,246,.55); }+ .hero-forge-go:hover .arrow { transform: translateX(3px); }+ .hero-forge-go:active { transform: translateY(1px); }+ .hero-forge-go:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }+ .hero-forge-go[data-busy="1"] { opacity: .72; cursor: progress; }+ .hero-forge-go .btn-forge-dot { background: rgba(10,10,10,.85); }+ .hero-forge-tries {+ display: flex; align-items: center; gap: 8px; flex-wrap: wrap;+ margin: 0 0 14px; font-size: 12.5px;+ }+ .hero-forge-tries-label {+ font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;+ text-transform: uppercase; color: var(--text-4);+ }+ .hero-try {+ padding: 5px 11px; border-radius: 999px; cursor: pointer;+ background: var(--surface-0); border: 1px solid var(--hairline);+ color: var(--text-2); font-family: var(--font-body); font-size: 12.5px;+ transition: color .15s ease, border-color .15s ease, background .15s ease, transform .12s ease;+ }+ .hero-try:hover { color: var(--text); border-color: var(--hairline-strong); transform: translateY(-1px); }+ .hero-try:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }+ .hero-forge-note { font-size: 12.5px; color: var(--text-3); margin: 0 0 20px; }+ .hero-forge-note a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--hairline-strong); }+ .hero-forge-note a:hover { color: var(--text); }+ @media (prefers-reduced-motion: reduce) {+ .hero-forge-glyph { animation: none; }+ .hero-forge:focus-within { transform: none; }+ }+ .hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }+ .hero-reassure {+ display: inline-flex; align-items: center; gap: 9px;+ font-size: 13.5px; line-height: 1.5; color: var(--text-3);+ margin: 0 0 52px; max-width: 460px;+ }+ .hero-reassure svg {+ width: 15px; height: 15px; flex-shrink: 0; color: var(--green);+ }+ .hero-reassure strong { color: var(--text-2); font-weight: 600; }+ .hero-reassure a {+ color: var(--text-2); text-decoration: none;+ border-bottom: 1px solid var(--hairline-strong);+ transition: color 0.15s, border-color 0.15s;+ }+ .hero-reassure a:hover, .hero-reassure a:focus-visible {+ color: var(--text); border-bottom-color: var(--text-3);+ }+ .hero-reassure a:focus-visible {+ outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));+ outline-offset: var(--focus-ring-offset,2px); border-radius: 2px;+ }++ .metrics {+ display: flex; gap: 28px; flex-wrap: wrap;+ padding-top: 28px; border-top: 1px solid var(--hairline);+ font-family: var(--font-mono); font-size: 12px;+ color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em;+ }+ .metric { display: flex; align-items: baseline; gap: 7px; }+ .metric strong {+ font-family: var(--font-display); color: var(--text); font-weight: 600;+ font-size: 17px; letter-spacing: -0.02em; text-transform: none;+ font-variant-numeric: tabular-nums;+ }++ /* ── Hero stage ──────────────────────────────────────────── */+ .hero-stage {+ position: relative; overflow: hidden; container-type: inline-size;+ background:+ radial-gradient(118% 78% at 50% 20%, rgba(255,255,255,0.075) 0%, rgba(255,255,255,0.022) 36%, transparent 60%),+ radial-gradient(72% 48% at 50% 104%, rgba(0,0,0,0.6) 0%, transparent 72%),+ var(--bg);+ }+ .hero-stage agent-3d {+ position: absolute; inset: 0; display: block; width: 100%; height: 100%;+ }+ .hero-stage-inner {+ position: absolute; inset: 0;+ transform-style: preserve-3d;+ transition: transform 0.35s cubic-bezier(.2,.7,.3,1);+ will-change: transform;+ }+ .hero-stage-fallback {+ position: absolute; inset: 0;+ display: flex; flex-direction: column;+ align-items: center; justify-content: center;+ gap: 12px; text-align: center; padding: 24px;+ }+ .hero-stage-fallback p {+ margin: 0; color: var(--text-3); font-size: 13.5px; max-width: 240px;+ }++ /* Hero loading state. The stage is the site's single most important first+ impression, and it used to be a silent near-black void for up to 15s while+ the GLB and the <agent-3d> CDN loader resolve on a cold cache. A breathing+ agent silhouette + "summoning" copy keeps it alive and on-brand; it fades+ out the instant agent:ready fires (bootHeroAvatar). */+ .hero-stage-loading {+ position: absolute; inset: 0; z-index: 3;+ display: flex; flex-direction: column;+ align-items: center; justify-content: center;+ gap: 16px; pointer-events: none;+ transition: opacity 0.5s ease;+ }+ .hero-stage-loading.is-hiding { opacity: 0; }+ .hero-stage-loading-figure {+ position: relative;+ width: clamp(84px, 26cqw, 138px); height: auto;+ color: var(--text-4);+ animation: hero-load-breathe 2.4s ease-in-out infinite;+ }+ .hero-stage-loading-figure::before {+ content: ''; position: absolute; left: 50%; top: 46%;+ width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%);+ background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 62%);+ z-index: -1;+ }+ @keyframes hero-load-breathe {+ 0%, 100% { opacity: 0.34; transform: translateY(0) scale(1); }+ 50% { opacity: 0.72; transform: translateY(-2px) scale(1.015); }+ }+ .hero-stage-loading-copy {+ font-size: 12.5px; letter-spacing: 0.02em; color: var(--text-3);+ }+ .hero-stage-loading-copy .dot { animation: hero-load-dot 1.4s ease-in-out infinite; }+ .hero-stage-loading-copy .dot:nth-child(2) { animation-delay: 0.18s; }+ .hero-stage-loading-copy .dot:nth-child(3) { animation-delay: 0.36s; }+ @keyframes hero-load-dot { 0%, 65%, 100% { opacity: 0.2; } 30% { opacity: 1; } }+ @media (prefers-reduced-motion: reduce) {+ .hero-stage-loading-figure { animation: none; opacity: 0.5; }+ .hero-stage-loading-copy .dot { animation: none; opacity: 0.6; }+ .hero-stage-loading { transition: none; }+ }++ /* ── CAPABILITY STRIP ──────────────────────────────────── */+ .capability-strip {+ position: relative;+ overflow: hidden;+ border-top: 1px solid var(--hairline);+ border-bottom: 1px solid var(--hairline);+ background: var(--surface-0);+ padding: 13px 0;+ cursor: default;+ user-select: none;+ }+ .capability-strip:hover .cap-track { animation-play-state: paused; }+ .cap-track {+ display: flex;+ width: max-content;+ animation: cap-scroll 55s linear infinite;+ will-change: transform;+ }+ .cap-inner {+ display: flex;+ align-items: center;+ flex-shrink: 0;+ }+ .cap-item {+ font-family: var(--font-mono);+ font-size: 11.5px;+ letter-spacing: 0.04em;+ color: var(--text-3);+ white-space: nowrap;+ padding: 0 2px;+ transition: color 0.15s;+ }+ .cap-item:hover { color: var(--text-2); }+ .cap-sep {+ font-size: 10px;+ color: var(--text-4);+ padding: 0 16px;+ flex-shrink: 0;+ pointer-events: none;+ }+ @keyframes cap-scroll {+ from { transform: translateX(0); }+ to { transform: translateX(-50%); }+ }+ .cap-fade {+ position: absolute;+ top: 0; bottom: 0;+ width: 120px;+ z-index: 2;+ pointer-events: none;+ }+ .cap-fade--l {+ left: 0;+ background: linear-gradient(to right, var(--surface-0) 30%, transparent);+ }+ .cap-fade--r {+ right: 0;+ background: linear-gradient(to left, var(--surface-0) 30%, transparent);+ }++ /* ── PARTNER / PRESS STRIP ───────────────────────────────── */+ .press-strip { padding: 38px 0 42px; }+ .press-strip-cap {+ font-family: var(--font-mono); font-size: 10.5px;+ letter-spacing: 0.2em; text-transform: uppercase;+ color: var(--text-3); text-align: center; margin-bottom: 24px;+ }+ .press-row {+ display: flex; flex-wrap: wrap; justify-content: center;+ gap: 18px 38px; align-items: center; max-width: 1000px; margin: 0 auto;+ }+ .press-logo {+ display: inline-flex; align-items: center; gap: 9px;+ /* Dim the ICON only, never the label: text-3 at 0.7 link opacity+ measured 3.7:1 on the dark bg (axe AA needs 4.5:1); undimmed+ text-3 is 5.7:1. */+ color: var(--text-3); text-decoration: none;+ font-family: var(--font-display); font-size: 15px; font-weight: 500;+ letter-spacing: -0.02em;+ transition: opacity 0.15s, color 0.15s;+ }+ .press-logo .ico { opacity: 0.7; transition: opacity 0.15s; }+ .press-logo:hover .ico, .press-logo:focus-visible .ico { opacity: 1; }+ .press-logo:hover, .press-logo:focus-visible { color: var(--text); }+ .press-logo:focus-visible {+ outline: 1px solid var(--hairline-strong); outline-offset: 4px; border-radius: 4px;+ }+ .press-logo .ico {+ width: 17px; height: 17px; flex: 0 0 auto; background: currentColor;+ -webkit-mask: var(--logo) center / contain no-repeat;+ mask: var(--logo) center / contain no-repeat;+ }+ @media (max-width: 720px) {+ .press-row { gap: 16px 26px; }+ .press-logo { font-size: 13.5px; }+ }++ /* ── SECTION FRAME ───────────────────────────────────────── */+ section.block { padding: 112px 0; border-top: 1px solid var(--hairline); }+ @media (max-width: 720px) { section.block { padding: 72px 0; } }+ .block-head { margin-bottom: 60px; max-width: 800px; }+ .block-eyebrow {+ font-family: var(--font-mono); font-size: 11.5px;+ letter-spacing: 0.2em; text-transform: uppercase;+ color: var(--text-3); margin: 0 0 16px;+ }+ .block-eyebrow .num { color: var(--text); margin-right: 12px; }+ .block-h {+ font-family: var(--font-display);+ font-size: clamp(34px, 4vw, 58px);+ line-height: 1.0; letter-spacing: -0.035em;+ font-weight: 600; margin: 0 0 20px;+ }+ .block-h em { font-style: normal; color: var(--text-3); font-weight: 500; }+ .block-lede {+ font-size: 17px; color: var(--text-2);+ max-width: 600px; line-height: 1.55; margin: 0;+ }++ /* ── EMBED SHOWCASE ──────────────────────────────────────── */+ .embed-grid {+ display: grid; grid-template-columns: 1fr 1fr; gap: 1px;+ background: var(--hairline); border: 1px solid var(--hairline);+ border-radius: 14px; overflow: hidden;+ }+ @media (max-width: 980px) { .embed-grid { grid-template-columns: 1fr; } }+ .pane { background: var(--surface-0); min-height: 420px; display: flex; flex-direction: column; }+ .pane-head {+ display: flex; align-items: center; justify-content: space-between;+ padding: 14px 18px; border-bottom: 1px solid var(--hairline);+ font-family: var(--font-mono); font-size: 12px; color: var(--text-3);+ }+ .pane-head .tabs { display: flex; gap: 4px; }+ .pane-head .tab {+ padding: 5px 11px; border-radius: 5px;+ font-family: var(--font-mono); font-size: 11.5px;+ color: var(--text-3); background: transparent; border: 0; cursor: pointer;+ }+ .pane-head .tab.active { background: var(--surface-2); color: var(--text); }+ .code-pane pre {+ margin: 0; padding: 28px;+ font-family: var(--font-mono); font-size: 13px; line-height: 1.75;+ color: var(--text); overflow-x: auto; flex: 1; background: var(--surface-0);+ }+ .code-pane pre .tag { color: #d3d3d3; }+ .code-pane pre .attr { color: #989898; }+ .code-pane pre .str { color: #f6f6f6; }+ .code-pane pre .com { color: var(--text-4); }+ .code-pane .pane-foot { padding: 14px 18px; border-top: 1px solid var(--hairline); }+ .copy-btn {+ background: transparent; color: var(--text);+ border: 1px solid var(--hairline-strong); cursor: pointer;+ padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 500;+ }+ .copy-btn:hover { border-color: var(--text); }+ .copy-btn.copied { background: var(--text); color: var(--bg); border-color: var(--text); }+ .render-pane { position: relative; padding: 0; }+ .render-pane agent-3d, .render-pane .live-agent-slot {+ position: absolute; inset: 49px 0 0; display: block;+ width: 100%; height: calc(100% - 49px);+ }++ /* ── THREE DOORS ─────────────────────────────────────────── */++ .doors {+ display: grid; grid-template-columns: repeat(3, 1fr);+ gap: 1px; background: var(--hairline);+ border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;+ }+ @media (max-width: 980px) { .doors { grid-template-columns: 1fr; } }+ .door {+ background: var(--surface-0); padding: 44px 36px 38px;+ display: flex; flex-direction: column; transition: background 0.15s;+ }+ .door:hover { background: var(--surface-1); }+ .door-num {+ font-family: var(--font-mono); font-size: 11.5px;+ letter-spacing: 0.18em; color: var(--text-3); margin-bottom: 28px;+ display: flex; justify-content: space-between; align-items: baseline;+ }+ .door-num .lbl { color: var(--text-3); }+ .door h3 {+ font-family: var(--font-display); font-size: 26px; line-height: 1.1;+ letter-spacing: -0.025em; font-weight: 600; margin: 0 0 14px;+ }+ .door p { color: var(--text-2); margin: 0 0 28px; font-size: 15px; line-height: 1.55; flex: 1; }+ .door .door-cta {+ font-size: 14px; font-weight: 500; color: var(--text);+ display: inline-flex; align-items: center; gap: 8px;+ }+ .door .door-cta::after { content: "→"; transition: transform 0.18s; }+ .door:hover .door-cta::after { transform: translateX(4px); }+ .door-screenshot {+ margin: 0 0 24px; border-radius: 8px; overflow: hidden;+ border: 1px solid var(--hairline-strong);+ aspect-ratio: 16/9; background: var(--surface-2);+ }+ .door-screenshot img { width: 100%; height: 100%; object-fit: cover; display: block; }++ /* ── START PATH (lite entry: three steps under the hero) ─── */+ .start-path { border-top: 1px solid var(--hairline); padding: 44px 0 48px; }+ .start-path-head {+ display: flex; align-items: baseline; justify-content: space-between;+ gap: 16px; flex-wrap: wrap; margin-bottom: 20px;+ }+ .start-path-eyebrow {+ font-family: var(--font-mono); font-size: 11.5px;+ letter-spacing: 0.2em; text-transform: uppercase;+ color: var(--text-3); margin: 0;+ }+ .start-path-note { font-size: 13px; color: var(--text-3); margin: 0; }+ .start-path-note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }+ .start-path-note a:hover, .start-path-note a:focus-visible { color: var(--text); }+ .start-steps {+ display: grid; grid-template-columns: repeat(3, 1fr);+ gap: 1px; background: var(--hairline);+ border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;+ }+ @media (max-width: 980px) { .start-steps { grid-template-columns: 1fr; } }+ .start-step {+ background: var(--surface-0); padding: 24px 26px 22px;+ display: flex; flex-direction: column; gap: 9px;+ transition: background 0.15s;+ }+ .start-step:hover { background: var(--surface-1); }+ .start-step:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; background: var(--surface-1); }+ .start-step-num {+ font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em;+ color: var(--text-3); display: flex; justify-content: space-between; align-items: baseline;+ }+ .start-step-num .time { letter-spacing: 0.06em; text-transform: none; }+ .start-step h3 {+ font-family: var(--font-display); font-size: 21px; font-weight: 600;+ letter-spacing: -0.02em; line-height: 1.15; margin: 0;+ display: flex; align-items: center; gap: 10px;+ }+ .start-step h3 .arrow { color: var(--text-3); transition: transform 0.18s, color 0.18s; }+ .start-step:hover h3 .arrow { transform: translateX(4px); color: var(--text); }+ .start-step p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }++ /* ── ADVANCED TIER (progressive disclosure) ────────────────+ html.home-lite is applied pre-paint from localStorage; the gate+ section (#advanced-gate) toggles it and persists the choice. */+ html.home-lite [data-tier="advanced"] { display: none; }+ .adv-gate { border-top: 1px solid var(--hairline); padding: 64px 0; }+ .adv-gate-card {+ border: 1px solid var(--hairline-strong); border-radius: 14px;+ background: var(--surface-0); padding: 36px 38px;+ display: flex; flex-wrap: wrap; align-items: center;+ justify-content: space-between; gap: 28px;+ transition: padding 0.2s;+ }+ @media (max-width: 720px) { .adv-gate-card { padding: 26px 24px; } }+ .adv-gate-text { max-width: 680px; }+ .adv-gate-eyebrow {+ font-family: var(--font-mono); font-size: 11.5px;+ letter-spacing: 0.2em; text-transform: uppercase;+ color: var(--text-3); margin: 0 0 12px;+ }+ .adv-gate-h {+ font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px);+ line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 12px;+ }+ .adv-gate-h em { font-style: normal; color: var(--text-3); font-weight: 500; }+ .adv-gate-desc { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); max-width: 560px; }+ .adv-gate-topics { display: flex; flex-wrap: wrap; gap: 8px; }+ .adv-topic {+ font-family: var(--font-mono); font-size: 12px; color: var(--text-2);+ padding: 6px 12px; border: 1px solid var(--hairline-strong); border-radius: 999px;+ background: transparent; transition: color 0.15s, border-color 0.15s, background 0.15s;+ }+ .adv-topic:hover, .adv-topic:focus-visible { color: var(--text); border-color: var(--text); background: var(--surface-1); }+ .adv-toggle {+ flex-shrink: 0; cursor: pointer;+ background: var(--text); color: var(--bg); border: 1px solid var(--text);+ padding: 13px 22px; border-radius: 9px; font-size: 14px; font-weight: 600;+ display: inline-flex; align-items: center; gap: 10px;+ transition: opacity 0.15s, transform 0.15s;+ }+ .adv-toggle:hover { opacity: 0.88; }+ .adv-toggle:active { transform: translateY(1px); }+ .adv-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }+ .adv-toggle .adv-toggle-hide { display: none; }+ /* Expanded state: the gate compacts into a slim divider with a collapse control. */+ html:not(.home-lite) .adv-gate { padding: 36px 0; }+ html:not(.home-lite) .adv-gate-card { padding: 20px 24px; }+ html:not(.home-lite) .adv-gate-h,+ html:not(.home-lite) .adv-gate-desc,+ html:not(.home-lite) .adv-gate-topics { display: none; }+ html:not(.home-lite) .adv-gate-eyebrow { margin: 0; }+ html:not(.home-lite) .adv-toggle {+ background: transparent; color: var(--text); border-color: var(--hairline-strong);+ font-weight: 500; padding: 9px 16px; font-size: 13px;+ }+ html:not(.home-lite) .adv-toggle:hover { border-color: var(--text); opacity: 1; }+ html:not(.home-lite) .adv-toggle .adv-toggle-show { display: none; }+ html:not(.home-lite) .adv-toggle .adv-toggle-hide { display: inline; }++ /* ── BENTO GRID ──────────────────────────────────────────── */+ .bento {+ display: grid;+ grid-template-columns: repeat(3, 1fr);+ grid-template-rows: auto;+ gap: 1px; background: var(--hairline);+ border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;+ }+ @media (max-width: 1080px) { .bento { grid-template-columns: repeat(2, 1fr); } }+ @media (max-width: 680px) { .bento { grid-template-columns: 1fr; } }+ .bento-card {+ background: var(--surface-0);+ padding: 36px 32px 32px;+ display: flex; flex-direction: column; gap: 12px;+ transition: background 0.15s;+ position: relative; overflow: hidden;+ }+ .bento-card:hover { background: var(--surface-1); }+ .bento-card.span2 { grid-column: span 2; }+ @media (max-width: 1080px) { .bento-card.span2 { grid-column: span 1; } }+ .bento-icon {+ font-size: 22px; line-height: 1; margin-bottom: 4px;+ display: flex; align-items: center; gap: 10px;+ }+ .bento-icon .dot {+ width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;+ }+ .bento-title {+ font-family: var(--font-display); font-size: 20px;+ font-weight: 600; letter-spacing: -0.02em; margin: 0;+ }+ .bento-desc {+ font-size: 14.5px; color: var(--text-2);+ line-height: 1.55; margin: 0; flex: 1;+ }+ .bento-tag {+ display: inline-flex; align-items: center;+ font-family: var(--font-mono); font-size: 10.5px;+ letter-spacing: 0.15em; text-transform: uppercase;+ color: var(--text-3); border: 1px solid var(--hairline-strong);+ padding: 4px 9px; border-radius: 99px;+ margin-top: 4px; width: fit-content;+ }+ .bento-screenshot {+ border-radius: 7px; overflow: hidden;+ border: 1px solid var(--hairline-strong);+ margin-top: 8px; background: var(--surface-2);+ }+ .bento-screenshot img { width: 100%; display: block; }+ .bento-pills {+ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;+ }+ .bento-pill {+ font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.1em; text-transform: uppercase;+ color: var(--text-3); border: 1px solid var(--hairline-strong);+ padding: 3px 8px; border-radius: 4px;+ }+ .bento-code {+ font-family: var(--font-mono); font-size: 12.5px;+ background: var(--surface-2); border: 1px solid var(--hairline-strong);+ border-radius: 7px; padding: 14px 16px; color: var(--text-2);+ line-height: 1.7; margin-top: 8px; overflow-x: auto;+ }+ .bento-code .kw { color: var(--text-3); }+ .bento-code .val { color: var(--text); }+ .bento-code .str { color: #c8c8c8; }++ /* ── FEATURE SPLIT SECTIONS ──────────────────────────────── */+ .feat-split {+ display: grid; grid-template-columns: 1fr 1fr;+ gap: 80px; align-items: center;+ }+ @media (max-width: 980px) { .feat-split { grid-template-columns: 1fr; gap: 48px; } }+ .feat-split.rev { direction: rtl; }+ .feat-split.rev > * { direction: ltr; }+ @media (max-width: 980px) { .feat-split.rev { direction: ltr; } }+ .feat-text { display: flex; flex-direction: column; gap: 20px; }+ .feat-eyebrow {+ font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3);+ }+ .feat-h {+ font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 44px);+ line-height: 1.05; letter-spacing: -0.03em;+ font-weight: 600; margin: 0; color: var(--text);+ }+ .feat-h em { font-style: normal; color: var(--text-3); font-weight: 500; }+ .feat-body { font-size: 16px; color: var(--text-2); line-height: 1.6; margin: 0; }+ .feat-list {+ list-style: none; padding: 0; margin: 0;+ display: flex; flex-direction: column; gap: 10px;+ }+ .feat-list li {+ display: flex; align-items: flex-start; gap: 12px;+ font-size: 14.5px; color: var(--text-2); line-height: 1.5;+ }+ .feat-list li::before {+ content: ""; width: 5px; height: 5px; border-radius: 50%;+ background: var(--text-3); flex-shrink: 0; margin-top: 7px;+ }+ .feat-list li strong { color: var(--text); font-weight: 550; }+ .feat-visual {+ border: 1px solid var(--hairline-strong);+ border-radius: 14px; overflow: hidden;+ background: var(--surface-0);+ position: relative;+ }+ .feat-visual img { width: 100%; display: block; }+ .feat-visual-inner {+ padding: 28px; display: flex; flex-direction: column; gap: 16px;+ }+ .feat-visual-label {+ font-family: var(--font-mono); font-size: 10.5px;+ letter-spacing: 0.18em; text-transform: uppercase;+ color: var(--text-3); padding: 14px 18px;+ border-bottom: 1px solid var(--hairline);+ }++ /* Walk embed preview */+ .walk-preview-wrap {+ display: flex; flex-direction: column; gap: 0;+ }+ .walk-preview-canvas-area {+ position: relative; aspect-ratio: 16 / 9;+ background: #0f0f0f; overflow: hidden; cursor: grab;+ }+ .walk-preview-canvas-area:active { cursor: grabbing; }+ .walk-preview-canvas {+ display: block; width: 100%; height: 100%;+ }+ .walk-preview-loading {+ position: absolute; inset: 0; display: flex;+ flex-direction: column; align-items: center;+ justify-content: center; gap: 12px;+ background: #0f0f0f; z-index: 4;+ font-family: var(--font-mono); font-size: 11px;+ color: var(--text-3); letter-spacing: 0.1em;+ transition: opacity 0.5s ease;+ }+ .walk-preview-loading.is-done { opacity: 0; pointer-events: none; }+ .walk-preview-retry {+ margin-top: 4px; padding: 7px 16px;+ font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;+ text-transform: uppercase; color: var(--text-1);+ background: transparent; border: 1px solid var(--hairline-strong);+ border-radius: 6px; cursor: pointer;+ transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;+ }+ .walk-preview-retry:hover { border-color: var(--text-2); background: rgba(255,255,255,0.04); }+ .walk-preview-retry:active { transform: translateY(1px); }+ .walk-preview-retry:focus-visible { outline: 2px solid var(--text-2); outline-offset: 2px; }+ .walk-preview-spinner {+ width: 24px; height: 24px; border: 2px solid var(--hairline-strong);+ border-top-color: var(--text-2); border-radius: 50%;+ animation: walk-spin 0.8s linear infinite;+ }+ @keyframes walk-spin { to { transform: rotate(360deg); } }+ .walk-preview-hint {+ position: absolute; bottom: 10px; left: 50%;+ transform: translateX(-50%); display: flex; gap: 14px;+ font-family: var(--font-mono); font-size: 9.5px;+ color: var(--text-2); letter-spacing: 0.06em;+ opacity: 0.85; pointer-events: none; z-index: 3;+ white-space: nowrap;+ }+ .walk-preview-hint kbd {+ display: inline-block; padding: 1px 4px;+ border: 1px solid var(--hairline-strong);+ border-radius: 3px; font-family: var(--font-mono);+ font-size: 9px; color: var(--text-3);+ background: var(--surface-2); margin: 0 1px;+ }+ .walk-preview-joystick {+ position: absolute; bottom: 14px; right: 14px;+ width: 90px; height: 90px; z-index: 5;+ }+ @media (min-width: 768px) {+ .walk-preview-joystick { display: none; }+ }+ @media (max-width: 767px) {+ .walk-preview-hint { display: none; }+ .walk-preview-joystick { display: block; }+ }++ /* Buy/sell semantic colors — the one place on the page we go full color.+ Everything else is monochrome; trading flow earns real green/red. */+ :root { --buy: #2ecc71; --sell: #ff5c5c; }++ /* Pump.fun earn rows */+ .earn-rows { display: flex; flex-direction: column; gap: 1px; }+ .earn-row {+ background: var(--surface-1); padding: 14px 18px;+ display: flex; justify-content: space-between; align-items: center;+ border-bottom: 1px solid var(--hairline);+ animation: earn-row-in 0.32s cubic-bezier(.22,.68,0,.98);+ }+ @keyframes earn-row-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }+ .earn-row:last-child { border-bottom: none; }+ .earn-row-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }+ .earn-row-name { font-size: 14px; font-weight: 500; color: var(--text); }+ .earn-row-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }+ .earn-row-amount { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--green); display: flex; align-items: baseline; gap: 7px; }+ .earn-row-amount.buy { color: var(--buy); }+ .earn-row-amount.sell { color: var(--sell); }+ .hlt-usd { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--text-3); }+ .hlt-side { font-weight: 700; }+ .hlt-side.buy { color: var(--buy); }+ .hlt-side.sell { color: var(--sell); }+ .hlt-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--buy); box-shadow: 0 0 6px var(--buy); margin-right: 7px; vertical-align: middle; animation: hlt-pulse 1.4s ease-in-out infinite; }+ @keyframes hlt-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }+ .hlt-idle .earn-row-name { color: var(--text-3); font-weight: 500; }+ .hlt-skel { pointer-events: none; }+ .hlt-skel-bar { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2, #1a1a1a) 25%, rgba(255,255,255,0.06) 50%, var(--surface-2, #1a1a1a) 75%); background-size: 200% 100%; animation: hlt-shimmer 1.3s linear infinite; }+ @keyframes hlt-shimmer { to { background-position: -200% 0; } }++ /* Token card */+ .token-card {+ background: var(--surface-1); border: 1px solid var(--hairline-strong);+ border-radius: 10px; padding: 18px; display: flex; gap: 14px; align-items: center;+ }+ .token-avatar {+ width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; overflow: hidden;+ background: linear-gradient(135deg, #2b2b2b 0%, #161616 100%);+ display: flex; align-items: center; justify-content: center;+ font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fff;+ }+ .token-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }+ .token-info { flex: 1; min-width: 0; }+ .token-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+ .token-ticker { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }+ .token-price { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--green); white-space: nowrap; transition: color .25s; }+ .token-price.up { color: var(--buy); }+ .token-price.down { color: var(--sell); }+ a.token-price { text-decoration: none; }++ /* ── STEPS ───────────────────────────────────────────────── */+ .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 64px; }+ @media (max-width: 980px) { .steps { grid-template-columns: 1fr; gap: 48px; } }+ .step { border-top: 1px solid var(--hairline-strong); padding-top: 28px; }+ .step-num { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em; color: var(--text-3); margin-bottom: 22px; }+ .step-title { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 12px; }+ .step-body { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0; }++ /* ── SHOWCASE 3D ─────────────────────────────────────────── */+ .showcase-3d { perspective: 1200px; perspective-origin: 50% 40%; }+ .showcase-3d-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }+ @media (max-width: 1080px) { .showcase-3d-grid { grid-template-columns: repeat(2, 1fr); } }+ @media (max-width: 560px) { .showcase-3d-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; } }+ .showcase-agent-card {+ position: relative; aspect-ratio: 3 / 4; border-radius: 16px;+ overflow: hidden; background: var(--surface-0); border: 1px solid var(--hairline);+ transform-style: preserve-3d;+ transform: rotateX(0) rotateY(0) translateZ(0);+ transition: transform 0.45s cubic-bezier(.22,.68,0,.98), box-shadow 0.4s, border-color 0.3s;+ cursor: pointer; text-decoration: none; display: block;+ }+ .showcase-agent-card:hover {+ transform: translateZ(24px) scale(1.03);+ border-color: rgba(255,255,255,0.12);+ box-shadow: 0 20px 60px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);+ }+ .showcase-agent-card agent-3d {+ position: absolute; inset: 0; width: 100%; height: 100%;+ display: block; opacity: 0; transition: opacity 0.6s ease;+ }+ .showcase-agent-card agent-3d.loaded { opacity: 1; }+ .showcase-card-grad { position: absolute; inset: 0; z-index: 0; opacity: 0.5; transition: opacity 0.4s; }+ .showcase-agent-card:hover .showcase-card-grad { opacity: 0.7; }+ .showcase-card-floor {+ position: absolute; bottom: 0; left: 0; right: 0; height: 50%;+ background: linear-gradient(180deg, transparent 0%, rgba(5,5,5,0.95) 100%);+ z-index: 1; pointer-events: none;+ }+ .showcase-card-meta {+ position: absolute; bottom: 0; left: 0; right: 0;+ padding: 18px 16px; z-index: 3; color: var(--text);+ }+ .showcase-card-name {+ font-family: var(--font-display); font-size: 15px; font-weight: 600;+ letter-spacing: -0.015em; margin: 0 0 3px;+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;+ }+ .showcase-card-sub {+ font-family: var(--font-mono); font-size: 10px; color: var(--text-3);+ letter-spacing: 0.08em; text-transform: uppercase;+ }+ .showcase-card-tag {+ position: absolute; top: 12px; left: 12px; z-index: 4;+ font-family: var(--font-mono); font-size: 9.5px;+ letter-spacing: 0.18em; text-transform: uppercase; color: var(--text);+ padding: 3px 8px; background: rgba(5,5,5,0.55);+ border: 1px solid var(--hairline-strong); border-radius: 99px; backdrop-filter: blur(6px);+ }+ .showcase-card-anim-tag {+ position: absolute; top: 12px; right: 12px; z-index: 4;+ font-family: var(--font-mono); font-size: 9px;+ letter-spacing: 0.08em; color: rgba(255,255,255,0.35); text-transform: lowercase;+ }+ .showcase-card-skel {+ position: absolute; inset: 0;+ display: flex; align-items: center; justify-content: center; z-index: 0;+ }+ .showcase-card-skel-ring {+ width: 32px; height: 32px;+ border: 2px solid rgba(255,255,255,0.08); border-top-color: rgba(255,255,255,0.25);+ border-radius: 50%; animation: showcase-spin 0.9s linear infinite;+ }+ @keyframes showcase-spin { to { transform: rotate(360deg); } }+ .showcase-cta-card {+ position: relative; aspect-ratio: 3 / 4; border-radius: 16px;+ overflow: hidden; border: 1px solid var(--hairline);+ display: flex; flex-direction: column; align-items: center; justify-content: center;+ text-align: center; text-decoration: none; background: var(--surface-0);+ transition: transform 0.35s cubic-bezier(.22,.68,0,.98), border-color 0.3s, background 0.3s;+ cursor: pointer; gap: 10px; padding: 24px;+ }+ .showcase-cta-card:hover {+ transform: translateZ(12px) scale(1.02);+ border-color: rgba(255,255,255,0.15); background: var(--surface-1);+ }+ .showcase-cta-icon { font-size: 28px; opacity: 0.4; transition: opacity 0.3s; }+ .showcase-cta-card:hover .showcase-cta-icon { opacity: 0.7; }+ .showcase-cta-label {+ font-family: var(--font-display); font-size: 15px; font-weight: 600;+ color: var(--text); letter-spacing: -0.01em;+ }+ .showcase-cta-sub {+ font-family: var(--font-mono); font-size: 10px; color: var(--text-3);+ letter-spacing: 0.06em; text-transform: uppercase;+ }++ /* ── DEVELOPER SECTION / API PLAYGROUND ──────────────────── */+ .dev-grid {+ display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1px;+ background: var(--hairline); border: 1px solid var(--hairline);+ border-radius: 14px; overflow: hidden;+ }+ @media (max-width: 980px) { .dev-grid { grid-template-columns: 1fr; } }+ .dev-pane { background: var(--surface-0); padding: 0; }+ .dev-pane-head {+ padding: 14px 20px; border-bottom: 1px solid var(--hairline);+ font-family: var(--font-mono); font-size: 11.5px;+ letter-spacing: 0.12em; color: var(--text-3);+ display: flex; justify-content: space-between; align-items: center;+ }+ .dev-tabs {+ display: flex; gap: 0; border-bottom: 1px solid var(--hairline);+ }+ .dev-tab {+ padding: 10px 18px; font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);+ cursor: pointer; border-bottom: 2px solid transparent;+ transition: color 0.15s, border-color 0.15s; user-select: none;+ background: none; border-top: none; border-left: none; border-right: none;+ }+ .dev-tab:hover { color: var(--text-2); }+ .dev-tab:focus-visible { outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent)); outline-offset: -2px; }+ .dev-tab.active { color: var(--text); border-bottom-color: var(--text); }+ .dev-tab-content { display: none; }+ .dev-tab-content.active { display: block; }+ .dev-code {+ font-family: var(--font-mono); font-size: 12.5px;+ line-height: 1.8; padding: 24px 24px; color: var(--text-2);+ overflow-x: auto;+ }+ .dev-code .kw { color: var(--text-3); }+ .dev-code .fn { color: var(--text); font-weight: 500; }+ .dev-code .str { color: #c5c5c5; }+ .dev-code .cmt { color: var(--text-4); }+ .dev-code .num { color: #b0b0b0; }+ .dev-links { padding: 16px 24px; border-top: 1px solid var(--hairline); }+ .dev-links-row { display: flex; gap: 10px; flex-wrap: wrap; }+ .dev-link {+ display: inline-flex; align-items: center; gap: 7px;+ padding: 7px 13px; border-radius: 6px;+ border: 1px solid var(--hairline-strong);+ font-size: 13px; font-weight: 500; color: var(--text-2);+ transition: border-color 0.15s, color 0.15s;+ }+ .dev-link:hover { border-color: var(--text); color: var(--text); }+ .dev-right { display: flex; flex-direction: column; }+ .dev-api-row {+ width: 100%; text-align: left; font: inherit; color: inherit;+ background: transparent; border: none;+ padding: 14px 20px; border-bottom: 1px solid var(--hairline);+ display: flex; flex-direction: column; gap: 4px;+ cursor: pointer; transition: background 0.15s;+ }+ .dev-api-row:hover { background: var(--surface-1); }+ .dev-api-row:focus-visible {+ outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));+ outline-offset: -2px;+ }+ .dev-api-row.active {+ background: var(--surface-2);+ box-shadow: inset 3px 0 0 var(--text-3);+ }+ .dev-api-method {+ font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);+ }+ .dev-api-path {+ font-family: var(--font-mono); font-size: 13px; color: var(--text);+ }+ .dev-api-desc { font-size: 12px; color: var(--text-3); }+ .dev-badge {+ display: inline-block; font-family: var(--font-mono); font-size: 10px;+ letter-spacing: 0.1em; text-transform: uppercase;+ padding: 2px 7px; border-radius: 4px; font-weight: 700;+ min-width: 36px; text-align: center;+ }+ .dev-badge.get { background: rgba(74,222,128,0.12); color: var(--success); }+ .dev-badge.post { background: rgba(96,165,250,0.12); color: #60a5fa; }+ .dev-badge.mcp { background: rgba(255,92,168,0.12); color: #ff8cc8; }++ /* ── Playground request builder ──────────────────────────── */+ .pg-request { padding: 20px 24px; }+ .pg-field { margin-bottom: 14px; }+ .pg-field-label {+ font-family: var(--font-mono); font-size: 10.5px;+ letter-spacing: 0.12em; text-transform: uppercase;+ color: var(--text-3); margin-bottom: 6px; display: block;+ }+ .pg-input {+ width: 100%; background: var(--surface-2); border: 1px solid var(--hairline-strong);+ border-radius: 6px; padding: 9px 12px; color: var(--text);+ font-family: var(--font-mono); font-size: 12.5px; outline: none;+ transition: border-color 0.15s;+ }+ .pg-input:focus { border-color: var(--text-3); }+ .pg-input:focus-visible, .pg-url-path:focus-visible {+ outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));+ outline-offset: var(--focus-ring-offset,2px);+ }+ .pg-input::placeholder { color: var(--text-4); }+ textarea.pg-input { min-height: 80px; resize: vertical; line-height: 1.6; }+ .pg-url-bar {+ display: flex; align-items: center; gap: 0;+ background: var(--surface-2); border: 1px solid var(--hairline-strong);+ border-radius: 6px; overflow: hidden; margin-bottom: 16px;+ }+ .pg-url-method {+ padding: 9px 12px; font-family: var(--font-mono); font-size: 11px;+ font-weight: 700; letter-spacing: 0.08em; color: var(--success);+ border-right: 1px solid var(--hairline-strong); background: var(--surface-1);+ min-width: 52px; text-align: center; user-select: none;+ }+ .pg-url-method.post { color: #60a5fa; }+ .pg-url-path {+ flex: 1; padding: 9px 12px; font-family: var(--font-mono); font-size: 12.5px;+ color: var(--text-2); background: transparent; border: none; outline: none;+ }+ .pg-url-path::placeholder { color: var(--text-4); }+ .pg-send {+ padding: 9px 20px; background: var(--text); color: var(--bg);+ font-family: var(--font-mono); font-size: 11px; font-weight: 700;+ letter-spacing: 0.1em; text-transform: uppercase; border: none;+ border-radius: 6px; cursor: pointer; transition: opacity 0.15s;+ }+ .pg-send:hover { opacity: 0.85; }+ .pg-send:active { opacity: 0.7; }+ .pg-send:disabled { opacity: 0.4; cursor: not-allowed; }+ .pg-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }+ .pg-status {+ font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.05em; color: var(--text-3);+ }+ .pg-status.ok { color: var(--success); }+ .pg-status.err { color: var(--danger); }+ .pg-status.warn { color: var(--warn); }+ .pg-status.err::before { background: var(--danger); box-shadow: 0 0 5px var(--danger); }+ .pg-status.warn::before { background: var(--warn); box-shadow: 0 0 5px var(--warn); }+ .pg-key-field { margin-bottom: 16px; }+ .pg-key-hint {+ float: right; text-transform: none; letter-spacing: 0;+ color: var(--text-3); text-decoration: none; font-size: 10.5px;+ transition: color 0.15s;+ }+ .pg-key-hint:hover { color: var(--text); }+ .pg-response {+ background: var(--surface-1); border: 1px solid var(--hairline);+ border-radius: 8px; overflow: hidden;+ }+ .pg-response-head {+ padding: 10px 16px; border-bottom: 1px solid var(--hairline);+ font-family: var(--font-mono); font-size: 10.5px;+ letter-spacing: 0.1em; text-transform: uppercase;+ color: var(--text-3); display: flex; justify-content: space-between;+ }+ .pg-response-body {+ padding: 16px; font-family: var(--font-mono); font-size: 12px;+ line-height: 1.7; color: var(--text-2); max-height: 260px;+ overflow-y: auto; white-space: pre-wrap; word-break: break-all;+ }+ .pg-response-body::-webkit-scrollbar { width: 5px; }+ .pg-response-body::-webkit-scrollbar-track { background: transparent; }+ .pg-response-body::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 3px; }+ .pg-empty {+ padding: 40px 24px; text-align: center; color: var(--text-3);+ font-size: 13px; line-height: 1.6;+ }+ .pg-empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.3; }+ .pg-response-body .json-key { color: #60a5fa; }+ .pg-response-body .json-str { color: var(--success); }+ .pg-response-body .json-num { color: var(--warn); }+ .pg-response-body .json-bool { color: var(--accent); }+ .pg-response-body .json-null { color: var(--text-4); }+ .pg-curl-code {+ font-family: var(--font-mono); font-size: 12px;+ line-height: 1.8; padding: 24px; color: var(--text-2);+ white-space: pre-wrap; word-break: break-all;+ }+ .pg-copy {+ padding: 4px 10px; background: var(--surface-2); border: 1px solid var(--hairline-strong);+ border-radius: 4px; color: var(--text-3); font-family: var(--font-mono);+ font-size: 10px; letter-spacing: 0.1em; cursor: pointer;+ transition: color 0.15s, border-color 0.15s;+ }+ .pg-copy:hover { color: var(--text); border-color: var(--text-3); }++ /* ── BOTTOM CTA ──────────────────────────────────────────── */+ .cta-card {+ padding: 80px 64px; border: 1px solid var(--hairline-strong);+ border-radius: 16px; text-align: center; background: var(--surface-0);+ }+ .cta-card h2 {+ font-family: var(--font-display); font-size: clamp(30px, 4vw, 50px);+ line-height: 1.0; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 18px;+ }+ .cta-card p { color: var(--text-2); font-size: 17px; margin: 0 0 36px; }+ .cta-card .cta-row { justify-content: center; }+ @media (max-width: 720px) { .cta-card { padding: 48px 24px; } }++ /* ── FOOTER ──────────────────────────────────────────────── */+ footer { border-top: 1px solid var(--hairline); padding: 60px 0 52px; }+ .foot-cols {+ display: grid;+ grid-template-columns: repeat(6, 1fr);+ gap: 32px; margin-bottom: 44px;+ padding-bottom: 40px; border-bottom: 1px solid var(--hairline);+ }+ .foot-col { display: flex; flex-direction: column; gap: 9px; }+ .foot-col-h {+ font-family: var(--font-mono); font-size: 10px; font-weight: 400;+ text-transform: uppercase; letter-spacing: 0.18em;+ color: var(--text-3); margin: 0 0 6px;+ }+ .foot-col a {+ color: var(--text-3); font-size: 13px;+ transition: color 0.14s;+ }+ .foot-col a:hover, .foot-col a:focus-visible { color: var(--text); }+ @media (max-width: 880px) {+ .foot-cols { grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }+ }+ @media (max-width: 460px) {+ .foot-cols { grid-template-columns: 1fr 1fr; }+ }+ .foot-inner {+ display: flex; justify-content: space-between; align-items: center;+ gap: 20px; flex-wrap: wrap;+ color: var(--text-3); font-size: 12px; font-family: var(--font-mono);+ letter-spacing: 0.04em;+ }+ .foot-ca {+ display: flex; align-items: center; gap: 8px;+ background: var(--surface-1); border: 1px solid var(--stroke);+ border-radius: 999px; padding: 5px 11px 5px 10px; cursor: pointer;+ font-family: var(--font-mono); font-size: 11px; color: var(--text-3);+ transition: background .15s, border-color .15s, color .15s;+ }+ .foot-ca:hover, .foot-ca:focus-visible {+ background: var(--surface-2); border-color: var(--stroke-strong);+ color: var(--text);+ }+ .foot-ca-label {+ color: #7ec8f8; font-weight: 700; font-size: 10.5px;+ text-transform: uppercase; letter-spacing: 0.10em;+ }+ /* No opacity dim: text-3 at .55 measured ~2.5:1 (axe AA needs 4.5:1),+ and the $THREE contract address should be legible anyway. */+ .foot-ca-addr { font-size: 10.5px; }+ .foot-ca { min-width: 0; max-width: 100%; }+ .foot-ca-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }+ @media (max-width: 480px) { .foot-inner { flex-direction: column; align-items: flex-start; } .foot-ca { width: 100%; justify-content: flex-start; } }++ /* ── HERO LOADING ───────────────────────────────────────── */+ /* Suppress the in-element skeleton silhouette on the hero — it lives in+ the component's shadow DOM, so a light-DOM `.skeleton` selector can't+ reach it; `::part(loading)` pierces the boundary. The hero fades the+ whole agent-3d in on `agent:ready`, so the model never appears under a+ stale skeleton. */+ .hero-stage agent-3d::part(loading) { display: none !important; }+ .hero-stage agent-3d {+ position: absolute; inset: 0; display: block; width: 100%; height: 100%;+ opacity: 0; transition: opacity 0.8s cubic-bezier(.2,.7,.3,1);+ }+ .hero-stage agent-3d.loaded { opacity: 1; }++ /* ── REVEAL ANIMATIONS ──────────────────────────────────── */+ .reveal {+ opacity: 0; transform: translateY(32px);+ transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);+ }+ .reveal.vis { opacity: 1; transform: translateY(0); }+ .reveal-d1 { transition-delay: 0.08s; }+ .reveal-d2 { transition-delay: 0.16s; }++ /* ── HERO TEXT ENTRANCE ──────────────────────────────────── */+ .hero-text > * {+ opacity: 0; transform: translateY(24px);+ transition: opacity 0.6s cubic-bezier(.2,.7,.3,1), transform 0.6s cubic-bezier(.2,.7,.3,1);+ }+ .hero-text.entered > * { opacity: 1; transform: translateY(0); }+ .hero-text > *:nth-child(1) { transition-delay: 0.05s; }+ .hero-text > *:nth-child(2) { transition-delay: 0.12s; }+ .hero-text > *:nth-child(3) { transition-delay: 0.22s; }+ .hero-text > *:nth-child(4) { transition-delay: 0.32s; }+ .hero-text > *:nth-child(5) { transition-delay: 0.42s; }++ /* ── BENTO GLOW ─────────────────────────────────────────── */+ .bento-card { --bx: 50%; --by: 50%; }+ .bento-card::before {+ content: ""; position: absolute; inset: 0; pointer-events: none;+ background: radial-gradient(600px circle at var(--bx) var(--by), rgba(255,255,255,0.04), transparent 40%);+ opacity: 0; transition: opacity 0.3s;+ }+ .bento-card:hover::before { opacity: 1; }++ /* ── ENHANCED INTERACTIVE STATES ─────────────────────────── */+ .copy-btn:focus-visible {+ outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px;+ }+ .door-screenshot img[src] { transition: transform 0.4s cubic-bezier(.2,.7,.3,1); }+ .door:hover .door-screenshot img { transform: scale(1.03); }++ @keyframes stat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }+ .stat-animated { animation: stat-in 0.5s cubic-bezier(.2,.7,.3,1) both; }++ /* ── ACCESSIBILITY ──────────────────────────────────────── */+ @media (prefers-reduced-motion: reduce) {+ .reveal, .hero-text > * { opacity: 1 !important; transform: none !important; transition: none !important; }+ .hero-stage agent-3d { opacity: 1 !important; transition: none !important; }+ }++ /* ── HERO ANIMATION CHIPS ────────────────────────────────── */+ .hero-chips-wrap {+ position: absolute;+ bottom: 0; left: 0; right: 0;+ z-index: 10;+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 8px;+ padding: 32px 20px 20px;+ background: linear-gradient(0deg, rgba(5,5,5,0.75) 0%, transparent 100%);+ pointer-events: none;+ }+ .hero-chips-wrap > * { pointer-events: auto; }+ .hero-chips-label {+ font-family: var(--font-mono);+ font-size: 10px;+ letter-spacing: 0.22em;+ text-transform: uppercase;+ color: var(--text-3);+ display: flex;+ align-items: center;+ gap: 8px;+ }+ .hero-chips-label::before {+ content: "";+ display: inline-block;+ width: 5px; height: 5px;+ border-radius: 50%;+ background: var(--text-3);+ box-shadow: 0 0 5px var(--text-3);+ animation: pulse-green 2.4s ease-in-out infinite;+ }+ .hero-chips {+ display: flex;+ flex-wrap: wrap;+ justify-content: center;+ gap: 6px;+ }+ .hero-chip {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 7px 13px;+ border-radius: 999px;+ background: rgba(5,5,5,0.6);+ backdrop-filter: blur(12px);+ -webkit-backdrop-filter: blur(12px);+ border: 1px solid var(--hairline-strong);+ color: var(--text-3);+ font: 500 12.5px/1 var(--font-body);+ cursor: pointer;+ transition: border-color 0.15s, color 0.15s, background 0.15s;+ user-select: none;+ }+ .hero-chip:hover {+ border-color: rgba(255,255,255,0.4);+ color: var(--text);+ background: rgba(255,255,255,0.06);+ }+ .hero-chip[data-active="true"] {+ border-color: rgba(255,255,255,0.55);+ color: var(--text);+ background: rgba(255,255,255,0.1);+ }+ .hero-chips-counter {+ font-family: var(--font-mono);+ font-size: 10px;+ letter-spacing: 0.12em;+ color: var(--text-3);+ }+ .hero-chips-counter strong { color: var(--text-3); font-weight: 600; }+ @media (max-width: 980px) {+ .hero-chips-label, .hero-chips { display: none; }+ .hero-chips-wrap { padding: 20px; background: linear-gradient(0deg, rgba(5,5,5,0.7) 0%, transparent 100%); }+ }+ @media (prefers-reduced-motion: reduce) {+ .hero-chips-label::before { animation: none !important; }+ }++ /* ── 3D STACK GRID ───────────────────────────────────────────── */+ .stack-3d {+ perspective: 1400px;+ perspective-origin: 50% 40%;+ }+ .stack-3d-scene {+ display: grid;+ grid-template-columns: repeat(3, 1fr);+ gap: 1px;+ background: var(--hairline);+ border: 1px solid var(--hairline);+ border-radius: 14px;+ overflow: hidden;+ transform-style: preserve-3d;+ transform: rotateX(0deg) rotateY(0deg);+ transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);+ will-change: transform;+ }+ .stack-card {+ position: relative;+ background: var(--surface-0);+ padding: 40px 32px 36px;+ display: flex;+ flex-direction: column;+ gap: 10px;+ text-decoration: none;+ color: var(--text);+ transition:+ background 0.3s ease,+ opacity 0.35s ease;+ cursor: pointer;+ overflow: hidden;+ min-height: 210px;+ }+ .stack-card::before {+ content: '';+ position: absolute;+ inset: 0;+ opacity: 0;+ background: radial-gradient(+ 600px circle at var(--mx, 50%) var(--my, 50%),+ rgba(255,255,255,0.045),+ transparent 40%+ );+ transition: opacity 0.4s ease;+ pointer-events: none;+ z-index: 1;+ }+ .stack-card:hover::before { opacity: 1; }+ .stack-card::after {+ content: '';+ position: absolute;+ inset: -1px;+ border-radius: inherit;+ opacity: 0;+ background: radial-gradient(+ 400px circle at var(--mx, 50%) var(--my, 50%),+ rgba(255,255,255,0.13),+ transparent 40%+ );+ mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);+ mask-composite: exclude;+ -webkit-mask-composite: xor;+ padding: 1px;+ transition: opacity 0.4s ease;+ pointer-events: none;+ z-index: 2;+ }+ .stack-card:hover::after { opacity: 1; }+ .stack-card:hover {+ background: var(--surface-1);+ z-index: 3;+ }+ .stack-3d-scene:hover .stack-card:not(:hover) {+ opacity: 0.55;+ }+ .stack-card-num {+ font-family: var(--font-mono);+ font-size: 11px;+ letter-spacing: 0.18em;+ color: var(--text-3);+ margin-bottom: 6px;+ }+ .stack-card-title {+ font-family: var(--font-display);+ font-size: clamp(22px, 2.2vw, 30px);+ font-weight: 600;+ letter-spacing: -0.025em;+ line-height: 1.1;+ margin: 0;+ }+ .stack-card-desc {+ color: var(--text-2);+ font-size: 14px;+ line-height: 1.55;+ margin: 0;+ flex: 1;+ }+ .stack-card-arrow {+ font-family: var(--font-mono);+ font-size: 16px;+ color: var(--text-4);+ align-self: flex-end;+ transition: color 0.25s, transform 0.25s;+ }+ .stack-card:hover .stack-card-arrow {+ color: var(--text);+ transform: translate(4px, -4px);+ }+ /* staggered entrance */+ .stack-3d .stack-card {+ opacity: 0;+ transform: translateY(30px);+ transition:+ background 0.3s ease,+ opacity 0.55s cubic-bezier(0.23, 1, 0.32, 1),+ transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);+ }+ .stack-3d.vis .stack-card {+ opacity: 1;+ transform: translateY(0);+ }+ .stack-3d.vis .stack-card:nth-child(1) { transition-delay: 0.04s; }+ .stack-3d.vis .stack-card:nth-child(2) { transition-delay: 0.09s; }+ .stack-3d.vis .stack-card:nth-child(3) { transition-delay: 0.14s; }+ .stack-3d.vis .stack-card:nth-child(4) { transition-delay: 0.19s; }+ .stack-3d.vis .stack-card:nth-child(5) { transition-delay: 0.24s; }+ .stack-3d.vis .stack-card:nth-child(6) { transition-delay: 0.29s; }+ .stack-3d.vis.settled .stack-card { transition-delay: 0s; }+ @media (max-width: 980px) {+ .stack-3d-scene { grid-template-columns: repeat(2, 1fr); }+ .stack-3d { perspective: 1000px; }+ }+ @media (max-width: 600px) {+ .stack-3d-scene { grid-template-columns: 1fr; }+ .stack-3d { perspective: none; }+ .stack-card { min-height: auto; padding: 28px 24px 24px; }+ .stack-3d .stack-card,+ .stack-3d .stack-card:hover,+ .stack-3d-scene:hover .stack-card:not(:hover) {+ transform: none !important; opacity: 1 !important;+ }+ }+ @media (prefers-reduced-motion: reduce) {+ .stack-card, .stack-3d-scene { transition: none !important; }+ .stack-3d .stack-card { opacity: 1 !important; transform: none !important; }+ }++ /* ── WHAT YOU GET ────────────────────────────────────────────── */+ .wyg-head {+ text-align: center; margin-bottom: 64px;+ }+ .wyg-eyebrow {+ font-family: var(--font-mono); font-size: 11.5px;+ letter-spacing: 0.22em; text-transform: uppercase;+ color: var(--text-3); margin: 0 0 20px;+ }+ .wyg-title {+ font-family: var(--font-display);+ font-size: clamp(36px, 4.8vw, 64px);+ line-height: 1.0; letter-spacing: -0.04em;+ font-weight: 600; margin: 0; color: var(--text);+ }+ .wyg-grid {+ display: grid;+ grid-template-columns: 1.15fr 0.85fr;+ gap: 1px;+ background: var(--hairline);+ border: 1px solid var(--hairline);+ border-radius: 16px;+ overflow: hidden;+ }+ @media (max-width: 1080px) { .wyg-grid { grid-template-columns: 1fr; } }++ .wyg-viewer {+ background: var(--surface-0);+ position: relative;+ min-height: 640px;+ display: flex; flex-direction: column;+ }+ @media (max-width: 1080px) { .wyg-viewer { min-height: 480px; } }+ @media (max-width: 600px) { .wyg-viewer { min-height: 380px; } }+ .wyg-viewer agent-3d {+ position: absolute; inset: 0; width: 100%; height: 100%;+ display: block;+ opacity: 0; transition: opacity 0.6s ease;+ }+ .wyg-viewer agent-3d.loaded { opacity: 1; }+ .wyg-viewer-skel {+ position: absolute; inset: 0;+ display: flex; align-items: center; justify-content: center;+ }+ .wyg-viewer-skel-ring {+ width: 32px; height: 32px;+ border: 2px solid rgba(255,255,255,0.08);+ border-top-color: rgba(255,255,255,0.25);+ border-radius: 50%;+ animation: showcase-spin 0.9s linear infinite;+ }+ .wyg-anim-bar {+ position: absolute; bottom: 0; left: 0; right: 0;+ z-index: 10;+ display: flex; flex-direction: column; gap: 8px;+ padding: 24px 20px 16px;+ background: linear-gradient(0deg, rgba(5,5,5,0.85) 0%, rgba(5,5,5,0.5) 60%, transparent 100%);+ }+ .wyg-anim-head {+ display: flex; align-items: center; justify-content: space-between;+ }+ .wyg-anim-label {+ font-family: var(--font-mono); font-size: 10px;+ letter-spacing: 0.22em; text-transform: uppercase;+ color: var(--text-3);+ }+ .wyg-anim-stop {+ width: 14px; height: 14px;+ background: var(--text-3); border-radius: 2px;+ border: none; cursor: pointer;+ opacity: 0.5; transition: opacity 0.15s;+ position: relative;+ }+ .wyg-anim-stop:hover { opacity: 1; }+ /* Touch: extend the hit area to 44px around the 14px glyph without+ altering its visual size or the header layout (WCAG 2.5.8). */+ @media (hover: none) and (pointer: coarse) {+ .wyg-anim-stop::after {+ content: ''; position: absolute;+ top: 50%; left: 50%; transform: translate(-50%, -50%);+ width: 44px; height: 44px;+ }+ }+ .wyg-anim-scroll {+ display: flex; gap: 6px;+ overflow-x: auto; overflow-y: hidden;+ -webkit-overflow-scrolling: touch;+ scrollbar-width: none;+ padding-bottom: 4px;+ }+ .wyg-anim-scroll::-webkit-scrollbar { display: none; }+ .wyg-anim-chip {+ display: inline-flex; flex-direction: column;+ align-items: center; gap: 4px;+ padding: 8px 10px 6px;+ border-radius: 10px;+ background: rgba(255,255,255,0.06);+ border: 1px solid var(--hairline-strong);+ color: var(--text-3);+ font: 500 10.5px/1 var(--font-body);+ cursor: pointer; user-select: none;+ transition: border-color 0.15s, color 0.15s, background 0.15s;+ white-space: nowrap; flex-shrink: 0;+ min-width: 64px;+ }+ .wyg-anim-chip:hover {+ border-color: rgba(255,255,255,0.3);+ color: var(--text);+ background: rgba(255,255,255,0.1);+ }+ .wyg-anim-chip[data-active="true"] {+ border-color: rgba(255,255,255,0.5);+ color: var(--text);+ background: rgba(255,255,255,0.12);+ }+ .wyg-anim-chip-icon { font-size: 18px; line-height: 1; }++ .wyg-cards {+ display: flex; flex-direction: column;+ background: var(--hairline); gap: 1px;+ }+ .wyg-card {+ background: var(--surface-0);+ padding: 28px 28px 24px;+ display: flex; flex-direction: column; gap: 8px;+ transition: background 0.15s;+ }+ .wyg-card:hover { background: var(--surface-1); }+ .wyg-card-eyebrow {+ font-family: var(--font-mono); font-size: 10.5px;+ letter-spacing: 0.2em; text-transform: uppercase;+ margin: 0;+ }+ .wyg-card-eyebrow.clr-gold { color: #c9a94e; }+ .wyg-card-eyebrow.clr-teal { color: #5eadad; }+ .wyg-card-eyebrow.clr-purple { color: var(--ink-dim); }+ .wyg-card-eyebrow.clr-rose { color: #e879a0; }+ .wyg-card-eyebrow.clr-sky { color: #7ab8e0; }+ .wyg-card-eyebrow.clr-amber { color: #d4a04a; }+ .wyg-card-title {+ font-family: var(--font-display); font-size: 20px;+ font-weight: 600; letter-spacing: -0.02em; margin: 0;+ }+ .wyg-card-body {+ font-size: 14px; color: var(--text-2);+ line-height: 1.5; margin: 0;+ }+ .wyg-card-code {+ font-family: var(--font-mono); font-size: 12px;+ background: var(--surface-2); border: 1px solid var(--hairline-strong);+ border-radius: 8px; padding: 12px 14px;+ color: var(--text-2); line-height: 1.6; margin-top: 4px;+ }+ .wyg-card-pills {+ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;+ }+ .wyg-card-pill {+ display: inline-flex; align-items: center; gap: 6px;+ font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.08em;+ color: var(--text-2);+ border: 1px solid var(--hairline-strong);+ padding: 4px 10px; border-radius: 99px;+ }+ .wyg-card-pill .dot {+ width: 7px; height: 7px; border-radius: 50%;+ }+ .wyg-card-link {+ font-size: 13.5px; font-weight: 500; color: var(--text);+ display: inline-flex; align-items: center; gap: 7px;+ margin-top: 4px; transition: gap 0.15s;+ }+ .wyg-card:hover .wyg-card-link { gap: 10px; }+ .wyg-card-link::after { content: "\2192"; }++ /* ── V4-STYLE IMMERSIVE CLOSE ────────────────────────────────── */+ .vclose {+ position: relative; min-height: 100vh;+ display: flex; align-items: center; justify-content: center;+ overflow: hidden; border-top: 1px solid var(--hairline);+ }+ .vclose-agent {+ position: absolute; inset: 0; width: 100%; height: 100%;+ display: block; z-index: 1;+ opacity: 0; transition: opacity 0.9s cubic-bezier(.2,.7,.3,1);+ }+ .vclose-agent.loaded { opacity: 1; }+ .vclose-grid {+ position: absolute; inset: 0; z-index: 0; pointer-events: none;+ background-image:+ linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),+ linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);+ background-size: 60px 60px;+ mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 100%);+ }+ .vclose-vignette {+ position: absolute; inset: 0; z-index: 2; pointer-events: none;+ background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 30%, rgba(5,5,5,0.92) 100%);+ }+ .vclose-overlay {+ position: relative; z-index: 3;+ display: flex; flex-direction: column; align-items: center;+ text-align: center; gap: 24px;+ padding: 80px 32px;+ max-width: 720px; margin: 0 auto;+ }+ .vclose-eyebrow {+ font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3);+ display: flex; align-items: center; gap: 8px;+ }+ .vclose-eyebrow::before {+ content: ""; width: 5px; height: 5px; border-radius: 50%;+ background: var(--text-3); box-shadow: 0 0 5px var(--text-3);+ animation: pulse-green 2.4s ease-in-out infinite;+ }+ .vclose-title {+ font-family: var(--font-display);+ font-size: clamp(48px, 7vw, 96px);+ line-height: 0.92; letter-spacing: -0.045em;+ font-weight: 600; margin: 0; color: var(--text);+ }+ .vclose-title em { font-style: normal; color: var(--text-3); font-weight: 500; }+ .vclose-sub {+ font-size: 17px; color: var(--text-2); max-width: 460px; line-height: 1.55; margin: 0;+ }+ .vclose-chips {+ display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;+ margin-top: 8px;+ }+ @media (prefers-reduced-motion: reduce) {+ .vclose-eyebrow::before { animation: none !important; }+ .vclose-agent { opacity: 1 !important; transition: none !important; }+ }+++ /* ── PLAYGROUND ──────────────────────────────────────────── */+ .pg {+ border: 1px solid var(--hairline); border-radius: 14px;+ overflow: hidden; background: var(--hairline);+ display: flex; flex-direction: column; gap: 1px;+ }+ .pg-toolbar {+ display: flex; align-items: center; justify-content: space-between;+ padding: 10px 16px; background: var(--surface-0);+ }+ .pg-tabs { display: flex; gap: 2px; }+ .pg-tab {+ padding: 5px 12px; border-radius: 5px;+ font-family: var(--font-mono); font-size: 11.5px;+ color: var(--text-3); background: transparent; border: 0;+ cursor: pointer; transition: background 0.12s, color 0.12s;+ }+ .pg-tab:hover { color: var(--text-2); }+ .pg-tab.active { background: var(--surface-2); color: var(--text); }+ .pg-toolbar-end { display: flex; gap: 6px; align-items: center; }+ .pg-copy {+ background: transparent; color: var(--text);+ border: 1px solid var(--hairline-strong);+ padding: 5px 12px; border-radius: 6px;+ font-family: var(--font-mono); font-size: 11.5px;+ cursor: pointer; transition: border-color 0.15s, background 0.15s;+ }+ .pg-copy:hover { border-color: var(--text); }+ .pg-copy.copied { background: var(--text); color: var(--bg); border-color: var(--text); }++ /* Controls strip */+ .pg-controls {+ display: flex; gap: 1px; background: var(--hairline);+ }+ @media (max-width: 980px) { .pg-controls { flex-wrap: wrap; } }+ .pg-control-group {+ background: var(--surface-0); padding: 10px 16px;+ display: flex; align-items: center; gap: 10px;+ }+ .pg-avatars-group { flex: 1.5; min-width: 0; overflow: hidden; }+ .pg-control-label {+ font-family: var(--font-mono); font-size: 10px;+ letter-spacing: 0.18em; text-transform: uppercase;+ color: var(--text-3); flex-shrink: 0;+ }+ .pg-chips { display: flex; gap: 4px; flex-wrap: wrap; }+ .pg-chip {+ padding: 4px 10px; border-radius: 5px;+ font-family: var(--font-mono); font-size: 11px;+ color: var(--text-3); background: transparent;+ border: 1px solid var(--hairline-strong); cursor: pointer;+ transition: border-color 0.12s, color 0.12s, background 0.12s;+ white-space: nowrap;+ }+ .pg-chip:hover { border-color: var(--text-3); color: var(--text-2); }+ .pg-chip.active {+ border-color: rgba(255,255,255,0.5); color: var(--text);+ background: rgba(255,255,255,0.08);+ }++ /* Avatar row */+ .pg-avatar-row {+ display: flex; gap: 6px; overflow-x: auto;+ scrollbar-width: none; padding: 2px;+ }+ .pg-avatar-row::-webkit-scrollbar { display: none; }+ .pg-avatar-item {+ flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;+ border: 2px solid transparent; cursor: pointer; overflow: hidden;+ transition: border-color 0.15s, transform 0.15s;+ background: var(--surface-2); padding: 0;+ }+ .pg-avatar-item:hover { border-color: var(--text-3); transform: scale(1.1); }+ .pg-avatar-item.active { border-color: var(--text); }+ .pg-avatar-item img {+ width: 100%; height: 100%; object-fit: cover; display: block;+ border-radius: 50%;+ }+ .pg-avatar-item .pg-avatar-initial {+ width: 100%; height: 100%; display: none;+ align-items: center; justify-content: center;+ font-family: var(--font-mono); font-size: 11px; font-weight: 600;+ color: var(--text-3); text-transform: uppercase; line-height: 1;+ }++ /* Split: code + preview */+ .pg-split {+ display: grid; grid-template-columns: 1fr 1fr;+ gap: 1px; background: var(--hairline); min-height: 480px;+ }+ @media (max-width: 980px) { .pg-split { grid-template-columns: 1fr; } }++ .pg-left {+ background: var(--surface-0);+ display: flex; flex-direction: column;+ }+ .pg-editor-head {+ padding: 10px 16px; border-bottom: 1px solid var(--hairline);+ font-family: var(--font-mono); font-size: 11px;+ color: var(--text-4); letter-spacing: 0.08em;+ }++ /* Editor: textarea overlay on pre for highlighting */+ .pg-editor {+ position: relative; flex: 1; min-height: 320px;+ }+ .pg-editor:focus-within {+ outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));+ outline-offset: -2px;+ }+ .pg-editor textarea,+ .pg-editor pre {+ font-family: var(--font-mono); font-size: 13px; line-height: 1.75;+ padding: 20px 24px; margin: 0; border: 0;+ position: absolute; top: 0; left: 0;+ width: 100%; height: 100%;+ white-space: pre; word-wrap: normal; overflow-wrap: normal;+ tab-size: 2; box-sizing: border-box; overflow: auto;+ }+ .pg-editor textarea {+ resize: none; background: transparent;+ color: transparent; caret-color: var(--text);+ z-index: 2; outline: none;+ -webkit-text-fill-color: transparent;+ }+ .pg-editor pre {+ pointer-events: none; z-index: 1;+ color: var(--text-2); background: transparent;+ }+ .pg-editor pre .tag { color: #d3d3d3; }+ .pg-editor pre .attr { color: #989898; }+ .pg-editor pre .str { color: #f6f6f6; }+ .pg-editor pre .com { color: var(--text-4); }+ .pg-editor pre .kw { color: var(--text-3); }++ .pg-right {+ background: var(--surface-0);+ display: flex; flex-direction: column; position: relative;+ }+ .pg-preview-head {+ padding: 10px 16px; border-bottom: 1px solid var(--hairline);+ font-family: var(--font-mono); font-size: 11px;+ color: var(--text-4); letter-spacing: 0.08em;+ display: flex; justify-content: space-between; align-items: center;+ }+ .pg-status {+ color: var(--text-3); display: flex; align-items: center; gap: 6px;+ }+ .pg-status::before {+ content: ""; width: 5px; height: 5px; border-radius: 50%;+ background: var(--green); box-shadow: 0 0 5px var(--green);+ animation: pulse-green 2.4s ease-in-out infinite;+ }+ .pg-preview {+ flex: 1; position: relative; min-height: 340px;+ transition: background-color 0.3s;+ overflow: hidden;+ }+ .pg-preview agent-3d {+ position: absolute; inset: 0; display: block;+ width: 100%; height: 100%;+ }+ /* Shown only when no avatar GLB could be resolved (API + fallback pool+ both unreachable) — mirrors the other sections' designed error states. */+ .pg-preview-msg {+ position: absolute; inset: 0; display: flex; flex-direction: column;+ align-items: center; justify-content: center; gap: 10px;+ text-align: center; padding: 24px; color: var(--text-3); font-size: 13px;+ }+ .pg-preview-msg a { color: var(--text-2); text-decoration: underline; }+ .pg-preview-msg a:hover, .pg-preview-msg a:focus-visible { color: var(--text); }++ /* Animation bar */+ .pg-anims {+ padding: 10px 16px; border-top: 1px solid var(--hairline);+ display: flex; gap: 4px; flex-wrap: wrap;+ position: relative; z-index: 2;+ }+ .pg-anim {+ padding: 4px 10px; border-radius: 5px;+ font-family: var(--font-mono); font-size: 11px;+ color: var(--text-3); background: transparent;+ border: 1px solid var(--hairline-strong); cursor: pointer;+ transition: border-color 0.12s, color 0.12s, background 0.12s;+ }+ .pg-anim:hover { border-color: var(--text-3); color: var(--text-2); }+ .pg-anim.active {+ border-color: rgba(255,255,255,0.5); color: var(--text);+ background: rgba(255,255,255,0.08);+ }++ .pg-copy:focus-visible, .pg-tab:focus-visible, .pg-chip:focus-visible,+ .pg-anim:focus-visible, .pg-avatar-item:focus-visible {+ outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px;+ }++ /* ── COLOR PICKER ────────────────────────────────────────── */+ .pg-color-trigger {+ position: relative;+ width: 26px; height: 26px; border-radius: 6px;+ border: 1px solid var(--hairline-strong);+ cursor: pointer; flex-shrink: 0;+ background: conic-gradient(+ from 0deg,+ #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000+ );+ transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;+ padding: 0;+ }+ .pg-color-trigger:hover {+ border-color: var(--text-3);+ transform: scale(1.1);+ }+ .pg-color-trigger.active {+ border-color: var(--text);+ box-shadow: 0 0 0 2px rgba(255,255,255,0.15);+ }+ .pg-color-trigger.has-color {+ background: var(--pg-picked-color, #888);+ }+ .pg-color-popover {+ position: absolute;+ top: calc(100% + 8px);+ left: 50%;+ transform: translateX(-50%);+ z-index: 50;+ background: var(--surface-1);+ border: 1px solid var(--hairline-strong);+ border-radius: 10px;+ padding: 14px;+ box-shadow: 0 12px 40px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);+ display: none;+ flex-direction: column;+ gap: 10px;+ width: 220px;+ }+ .pg-color-popover.open {+ display: flex;+ animation: pg-pop-in 0.18s cubic-bezier(.2,.7,.3,1);+ }+ @keyframes pg-pop-in {+ from { opacity: 0; transform: translateY(-4px) scale(0.97); }+ to { opacity: 1; transform: translateY(0) scale(1); }+ }+ .pg-color-popover-label {+ font-family: var(--font-mono); font-size: 10px;+ letter-spacing: 0.15em; text-transform: uppercase;+ color: var(--text-3);+ }+ .pg-color-swatches {+ display: grid;+ grid-template-columns: repeat(6, 1fr);+ gap: 5px;+ }+ .pg-color-swatch {+ width: 100%; aspect-ratio: 1; border-radius: 5px;+ border: 2px solid transparent;+ cursor: pointer; padding: 0;+ transition: border-color 0.12s, transform 0.12s;+ }+ .pg-color-swatch:hover {+ border-color: rgba(255,255,255,0.4);+ transform: scale(1.12);+ }+ .pg-color-swatch.active {+ border-color: var(--text);+ }+ .pg-color-hex-row {+ display: flex; align-items: center; gap: 6px;+ }+ .pg-color-hex-input {+ flex: 1;+ background: var(--surface-2);+ border: 1px solid var(--hairline-strong);+ border-radius: 5px;+ padding: 6px 8px;+ font-family: var(--font-mono);+ font-size: 12px;+ color: var(--text);+ outline: none;+ transition: border-color 0.15s;+ }+ .pg-color-hex-input:focus { border-color: var(--text-3); }+ .pg-color-hex-input:focus-visible {+ outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));+ outline-offset: var(--focus-ring-offset,2px);+ }+ .pg-color-preview {+ width: 28px; height: 28px; border-radius: 5px;+ border: 1px solid var(--hairline-strong);+ flex-shrink: 0;+ }++ @media (prefers-reduced-motion: reduce) {+ .pg-status::before { animation: none !important; }+ }++ /* ── LIVE FEATURE AGENTS ──────────────────────────────────── */+ .door-screenshot { position: relative; }+ .door-agent { position: absolute; inset: 0; }+ .door-agent agent-3d {+ width: 100%; height: 100%; display: block;+ pointer-events: none;+ transition: transform 0.4s cubic-bezier(.2,.7,.3,1);+ }+ .door:hover .door-agent agent-3d { transform: scale(1.03); }+ .door-earn-overlay {+ position: absolute; bottom: 10px; left: 10px; right: 10px;+ padding: 10px 14px; z-index: 2;+ background: rgba(5,5,5,0.82); backdrop-filter: blur(12px);+ border: 1px solid var(--hairline-strong); border-radius: 7px;+ display: flex; justify-content: space-between; align-items: baseline;+ pointer-events: none;+ }+ .door-earn-val {+ font-family: var(--font-display); font-size: 18px; font-weight: 600;+ letter-spacing: -0.02em; color: var(--text);+ font-variant-numeric: tabular-nums;+ }+ .door-earn-lbl {+ font-family: var(--font-mono); font-size: 9px;+ letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-3);+ }+ .door-earn-viz {+ position: absolute; inset: 0; overflow: hidden;+ transition: transform 0.4s cubic-bezier(.2,.7,.3,1);+ }+ .door:hover .door-earn-viz { transform: scale(1.03); }+ .door-earn-spark { position: absolute; inset: 0; width: 100%; height: 100%; }+ .door-earn-area { opacity: 0; transition: opacity 1.1s ease 0.35s; }+ .door-earn-line {+ fill: none; stroke: var(--green); stroke-width: 2;+ stroke-linejoin: round; stroke-linecap: round;+ vector-effect: non-scaling-stroke;+ stroke-dasharray: 1000; stroke-dashoffset: 1000;+ }+ .door-earn-viz.is-live .door-earn-area { opacity: 1; }+ .door-earn-viz.is-live .door-earn-line {+ transition: stroke-dashoffset 1.7s cubic-bezier(.4,0,.2,1);+ stroke-dashoffset: 0;+ }+ @media (prefers-reduced-motion: reduce) {+ .door-earn-line { transition: none; stroke-dashoffset: 0; }+ .door-earn-area { transition: none; opacity: 1; }+ }+ .bento-screenshot { position: relative; }+ .bento-agent { position: absolute; inset: 0; }+ .bento-agent agent-3d { width: 100%; height: 100%; display: block; }+ .bento-agent-mini {+ position: relative; height: 200px;+ border-radius: 7px; overflow: hidden;+ border: 1px solid var(--hairline-strong);+ background: var(--surface-2); margin-top: 8px;+ }+ .bento-agent-mini agent-3d {+ position: absolute; inset: 0;+ width: 100%; height: 100%; display: block;+ }+ .bento-pill-btn {+ cursor: pointer; background: transparent;+ font-family: var(--font-mono); font-size: 11px;+ letter-spacing: 0.1em; text-transform: uppercase;+ color: var(--text-3); border: 1px solid var(--hairline-strong);+ padding: 3px 8px; border-radius: 4px;+ transition: border-color 0.12s, color 0.12s, background 0.12s;+ }+ .bento-pill-btn:hover { border-color: var(--text-3); color: var(--text-2); }+ .bento-pill-btn.active {+ border-color: rgba(255,255,255,0.5); color: var(--text);+ background: rgba(255,255,255,0.08);+ }++ /* ── WALK IFRAME ─────────────────────────────────────────── */+ .walk-iframe-wrap {+ position: relative; aspect-ratio: 4/3;+ overflow: hidden; border-radius: 0 0 13px 13px;+ }+ .walk-iframe {+ position: absolute; inset: 0;+ width: 100%; height: 100%; border: 0;+ background: var(--surface-2);+ }++ /* ── AVATAR DROP ──────────────────────────────────────────────── */+ .body-drop {+ position: relative;+ min-height: 70vh;+ display: flex;+ align-items: center;+ overflow: visible;+ }+ .body-drop-content {+ position: relative; z-index: 10;+ max-width: 560px;+ padding: 80px 0 140px;+ }+ .body-drop-title {+ font-family: var(--font-display);+ font-size: clamp(44px, 5.5vw, 80px);+ line-height: 0.95; letter-spacing: -0.04em;+ font-weight: 600; margin: 0 0 24px;+ }+ .body-drop-title em { font-style: normal; color: var(--text-3); font-weight: 500; }+ #drop-sit-line {+ text-shadow: var(--drop-shadow, none);+ transition: text-shadow 90ms linear;+ }+ .body-drop-sub {+ font-size: 17px; color: var(--text-2);+ max-width: 440px; line-height: 1.55; margin: 0 0 44px;+ }+ #drop-canvas {+ position: absolute; inset: 0;+ width: 100%; height: 100%;+ pointer-events: none; z-index: 20;+ }+ .body-drop .cta-row { position: relative; z-index: 10; }+ .body-drop .btn { transform-origin: bottom center; will-change: transform; }+ @media (max-width: 720px) {+ .body-drop { min-height: auto; }+ .body-drop-content { padding: 48px 0 100px; }+ }++ /* ── MANIFESTO ──────────────────────────────────────────── */+ .manifesto {+ display: flex;+ flex-direction: column;+ gap: 0;+ }+ .manifesto-beat {+ padding: 64px 0;+ border-bottom: 1px solid var(--hairline);+ }+ .manifesto-beat:first-child { padding-top: 0; }+ .manifesto-beat:last-child { border-bottom: none; padding-bottom: 0; }++ .manifesto-statement {+ font-family: var(--font-display);+ font-size: clamp(36px, 4.8vw, 68px);+ line-height: 1.05;+ letter-spacing: -0.04em;+ font-weight: 600;+ margin: 0;+ color: var(--text);+ }+ .manifesto-statement em {+ font-style: normal;+ color: var(--text-3);+ font-weight: 500;+ }+ .manifesto-statement--dim {+ color: var(--text-3);+ }++ .manifesto-aside {+ font-size: 17px;+ color: var(--text-3);+ margin: 20px 0 0;+ max-width: 540px;+ line-height: 1.6;+ }++ .manifesto-steps {+ display: flex;+ flex-direction: column;+ gap: 6px;+ }+ .manifesto-step {+ font-family: var(--font-display);+ font-size: clamp(22px, 2.8vw, 36px);+ font-weight: 500;+ letter-spacing: -0.02em;+ color: var(--text-4);+ line-height: 1.2;+ }+ .manifesto-step:nth-child(2) { color: var(--text-3); }+ .manifesto-step:nth-child(3) { color: var(--text-2); }++ .manifesto-lead {+ font-size: clamp(18px, 2vw, 22px);+ color: var(--text-3);+ margin: 0 0 28px;+ line-height: 1.5;+ max-width: 480px;+ }+ .manifesto-keyword {+ font-family: var(--font-display);+ font-size: clamp(80px, 14vw, 180px);+ line-height: 0.88;+ letter-spacing: -0.055em;+ font-weight: 700;+ margin: 0;+ color: var(--text);+ position: relative;+ }+ .manifesto-keyword::after {+ content: "";+ position: absolute;+ left: 0; right: 30%; bottom: -4px;+ height: 2px;+ background: linear-gradient(90deg, var(--text-3), transparent);+ opacity: 0.4;+ }++ .manifesto-negations {+ margin-bottom: 36px;+ display: flex;+ flex-direction: column;+ gap: 6px;+ }+ .manifesto-neg {+ font-size: clamp(16px, 1.6vw, 19px);+ color: var(--text-3);+ margin: 0;+ line-height: 1.5;+ text-decoration: line-through;+ text-decoration-color: rgba(255,255,255,0.15);+ text-decoration-thickness: 1px;+ }+ .manifesto-affirmation {+ font-family: var(--font-display);+ font-size: clamp(24px, 3vw, 40px);+ line-height: 1.2;+ letter-spacing: -0.025em;+ font-weight: 600;+ color: var(--text);+ margin: 0;+ max-width: 640px;+ }++ .manifesto-body {+ font-size: 17px;+ color: var(--text-2);+ margin: 28px 0 0;+ max-width: 560px;+ line-height: 1.65;+ }++ .manifesto-caps {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ margin-bottom: 28px;+ }+ .manifesto-cap {+ font-family: var(--font-mono);+ font-size: 11.5px;+ letter-spacing: 0.1em;+ text-transform: uppercase;+ color: var(--text-2);+ padding: 8px 16px;+ border: 1px solid var(--hairline-strong);+ border-radius: 999px;+ transition: border-color 0.2s, color 0.2s, background 0.2s;+ }+ .manifesto-cap:hover {+ border-color: var(--text-3);+ color: var(--text);+ background: rgba(255,255,255,0.03);+ }++ .manifesto-close-dim {+ font-family: var(--font-display);+ font-size: clamp(22px, 2.8vw, 36px);+ font-weight: 500;+ letter-spacing: -0.02em;+ color: var(--text-4);+ margin: 0 0 12px;+ line-height: 1.15;+ }+ .manifesto-close {+ font-family: var(--font-display);+ font-size: clamp(40px, 5.5vw, 76px);+ line-height: 1.0;+ letter-spacing: -0.04em;+ font-weight: 600;+ margin: 0;+ color: var(--text);+ }++ .manifesto-embed {+ font-family: var(--font-mono);+ font-size: 13px;+ color: var(--text-3);+ margin: 20px 0 0;+ letter-spacing: 0.02em;+ }+ .manifesto-embed code {+ color: var(--text);+ font-weight: 500;+ }++ @media (max-width: 720px) {+ .manifesto-beat { padding: 44px 0; }+ .manifesto-keyword::after { right: 10%; }+ }+ /* ── INTERACTIVE BENTO DEMOS ─────────────────────────────── */+ .bento-interact{margin-top:10px;position:relative}+ .bento-action-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:7px;font-family:var(--font-mono);font-size:11.5px;letter-spacing:0.06em;color:var(--text);background:var(--surface-2);border:1px solid var(--hairline-strong);cursor:pointer;transition:border-color .15s,background .15s,transform .12s}+ .bento-action-btn:hover{border-color:var(--text-3);background:rgba(255,255,255,.06);transform:translateY(-1px)}+ .bento-action-btn:active{transform:translateY(0)}+ .bento-action-btn:focus-visible{outline:2px solid rgba(255,255,255,.5);outline-offset:2px}+ .bento-action-btn.sm{padding:5px 11px;font-size:10.5px}+ .bento-action-btn.primary{background:var(--text);color:var(--bg);border-color:var(--text);font-weight:600}+ .bento-action-btn.primary:hover{background:var(--ink-bright);border-color:var(--ink-bright)}+ .bento-action-btn.ghost{background:transparent;color:var(--text-2)}+ .studio-zone{display:flex;gap:8px;align-items:stretch}+ .studio-drop{flex:1;width:100%;background:transparent;border:1px dashed var(--hairline-strong);border-radius:8px;padding:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;transition:border-color .2s,background .2s;font-family:var(--font-mono);font-size:11px;color:var(--text-3);text-align:center;min-height:80px}+ .studio-drop:hover,.studio-drop.drag-over{border-color:var(--text-2);background:rgba(255,255,255,.03)}+ .studio-drop:focus-visible{outline:var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));outline-offset:var(--focus-ring-offset,2px)}+ .studio-drop-icon{font-size:22px;opacity:.5}+ .studio-preview-img{width:44px;height:44px;border-radius:50%;object-fit:cover;border:1px solid var(--hairline-strong);flex:none}+ .studio-ready{display:none;flex-direction:column;align-items:stretch;gap:12px;padding:14px;border:1px solid var(--hairline-strong);border-radius:8px;background:rgba(255,255,255,.02)}+ .studio-ready.show{display:flex}+ .studio-ready > .studio-preview-img{align-self:flex-start}+ .studio-ready-body{display:flex;flex-direction:column;gap:4px}+ .studio-ready-title{font-family:var(--font-display);font-size:14px;font-weight:600;color:var(--text)}+ .studio-ready-sub{font-family:var(--font-mono);font-size:11px;line-height:1.5;color:var(--text-3)}+ .studio-ready-actions{display:flex;gap:8px;flex-wrap:wrap}+ .studio-ready-actions .bento-action-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}+ .studio-error{display:none;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--hairline-strong);border-radius:8px;font-family:var(--font-mono);font-size:11px;color:var(--text-2)}+ .studio-error.show{display:flex}+ .mocap-demo{display:flex;flex-direction:column;gap:8px}+ .mocap-bar{display:flex;align-items:center;gap:10px}+ .mocap-waveform{width:100%;height:48px;border-radius:6px;background:var(--surface-2);border:1px solid var(--hairline-strong);display:block}+ .mocap-status{font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;color:var(--text-3);text-align:center}+ .mocap-status.live{color:var(--text-2)}+ .walk-minimap-wrap{position:relative;border-radius:8px;overflow:hidden;border:1px solid var(--hairline-strong);background:#0d0d0d}+ .walk-minimap{width:100%;height:140px;display:block;cursor:crosshair}+ .walk-minimap:focus{outline:2px solid rgba(255,255,255,.3);outline-offset:-2px}+ .walk-minimap-hud{position:absolute;top:6px;left:8px;display:flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:9px;color:var(--text-3);letter-spacing:.08em}+ .walk-minimap-dot{width:5px;height:5px;border-radius:50%;background:var(--success);box-shadow:0 0 4px color-mix(in srgb, var(--success) 53%, transparent)}+ .walk-minimap-hint{position:absolute;bottom:6px;left:50%;transform:translateX(-50%);font-family:var(--font-mono);font-size:8.5px;color:var(--text-3);letter-spacing:.06em;white-space:nowrap}+ .walk-minimap-hint kbd{display:inline-block;padding:0 3px;border:1px solid var(--hairline-strong);border-radius:2px;font-family:var(--font-mono);font-size:8px;background:var(--surface-2)}+ .x402-demo{display:flex;flex-direction:column;gap:8px}+ .x402-step{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:8px;transition:all .3s ease}+ .x402-code{font-family:var(--font-mono);font-size:11.5px;color:var(--text-2);flex:1}+ .x402-code.err{color:var(--danger)}+ .x402-code.ok{color:var(--success)}+ .x402-spinner{width:16px;height:16px;border:2px solid var(--hairline-strong);border-top-color:var(--text-2);border-radius:50%;animation:walk-spin .6s linear infinite;display:none}+ .x402-amount{font-family:var(--font-display);font-size:14px;font-weight:600;color:var(--success);display:none}+ .x402-amount.show{display:block}+ .mint-demo{perspective:600px}+ .mint-card{position:relative;padding:16px;background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:10px;transition:transform .6s cubic-bezier(.2,.7,.3,1),box-shadow .3s,border-color .3s}+ .mint-card.minted{border-color:rgba(255,255,255,.2);box-shadow:0 0 20px -4px rgba(255,255,255,.08)}+ .mint-card-inner{display:flex;align-items:center;justify-content:space-between;gap:10px}+ .mint-card-info{display:flex;flex-direction:column;gap:2px}+ .mint-card-label{font-family:var(--font-mono);font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--text-3);transition:color .3s}+ .mint-card-name{font-family:var(--font-display);font-size:16px;font-weight:600;color:var(--text);background:transparent;border:none;border-bottom:1px dashed transparent;padding:0 1px 1px;margin:0;width:auto;max-width:170px;outline:none;transition:border-color .15s}+ .mint-card-name:hover:not(:disabled),.mint-card-name:focus{border-bottom-color:var(--text-2)}+ .mint-card-name:focus-visible{outline:var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));outline-offset:var(--focus-ring-offset,2px);border-radius:2px}+ .mint-card-name::placeholder{color:var(--text-4)}+ .mint-card-name:disabled{opacity:.65;cursor:default}+ .mint-card.error{border-color:rgba(248,113,113,.45)}+ .mint-card-name.shake{animation:mint-shake .4s cubic-bezier(.36,.07,.19,.97)}+ @keyframes mint-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(2px)}30%,50%,70%{transform:translateX(-4px)}40%,60%{transform:translateX(4px)}}+ .mint-card-chain{font-family:var(--font-mono);font-size:10px;color:var(--text-3);display:block}+ .mint-card-chain a{color:var(--success);text-decoration:none;border-bottom:1px solid rgba(74,222,128,.3)}+ .mint-card-chain a:hover{border-bottom-color:var(--success)}+ .mint-card.minted .mint-card-label{color:var(--success)}+ .mint-status{margin:11px 0 0;font-family:var(--font-mono);font-size:10.5px;line-height:1.4;color:var(--text-3)}+ .mint-status.err{color:var(--danger)}+ .mint-status.ok{color:var(--success)}+ .mint-status a{color:inherit;text-decoration:underline;text-underline-offset:2px}+ .mint-progress{width:28px;height:28px;position:relative;display:none}+ .mint-progress.active{display:block}+ .mint-progress svg{width:100%;height:100%;transform:rotate(-90deg)}+ .mint-progress.active:not(.done) svg{animation:mint-spin .9s linear infinite}+ @keyframes mint-spin{from{transform:rotate(-90deg)}to{transform:rotate(270deg)}}+ .mint-progress circle{fill:none;stroke-width:3;stroke:var(--text-2);stroke-linecap:round;stroke-dasharray:78.5;stroke-dashoffset:78.5;transition:stroke-dashoffset 1.2s cubic-bezier(.2,.7,.3,1)}+ .mint-progress.active:not(.done) circle{stroke-dashoffset:55}+ .mint-progress.done circle{stroke-dashoffset:0;stroke:var(--success);transition:stroke-dashoffset .5s cubic-bezier(.2,.7,.3,1)}+ .skill-demo{display:flex;flex-direction:column;gap:8px}+ .skill-result{background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 14px;font-family:var(--font-mono);font-size:11px;color:var(--text-2);line-height:1.6;max-height:100px;overflow-y:auto;transition:border-color .3s}+ .skill-result.fresh{border-color:rgba(255,255,255,.2)}+ .skill-result .json-key{color:#60a5fa}+ .skill-result .json-str{color:var(--success)}+ .skill-result .json-num{color:var(--warn)}+ .skill-result .json-dim{color:var(--text-3)}+ .skill-result.loading{color:var(--text-3)}+ .skill-result.err{border-color:rgba(248,113,113,.4)}+ .skill-loading .json-key{color:#60a5fa}+ .skill-err{color:var(--danger)}+ .skill-cursor{color:var(--text-3);animation:skillBlink 1s steps(2,end) infinite}+ .skill-dots::after{content:'';animation:skillDots 1.4s steps(4,end) infinite}+ @keyframes skillDots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}+ @keyframes skillBlink{50%{opacity:0}}+ .bento-pill-btn[aria-busy="true"]{opacity:.6;cursor:progress}+ .memory-demo{display:flex;flex-direction:column;gap:8px}+ .memory-input-row{display:flex;gap:6px}+ .memory-input{flex:1;background:var(--surface-2);border:1px solid var(--hairline-strong);border-radius:6px;padding:7px 10px;font-family:var(--font-mono);font-size:11.5px;color:var(--text);outline:none;transition:border-color .15s}+ .memory-input:focus{border-color:var(--text-3)}+ .memory-input:focus-visible{outline:var(--focus-ring-width,2px) solid var(--focus-ring-color,var(--accent));outline-offset:var(--focus-ring-offset,2px)}+ .memory-input::placeholder{color:var(--text-4)}+ .memory-log{display:flex;flex-direction:column;gap:4px;max-height:72px;overflow-y:auto}+ .memory-entry{font-family:var(--font-mono);font-size:10.5px;color:var(--text-3);line-height:1.5;padding:3px 0;animation:mem-in .3s ease}+ .memory-entry .mem-op{color:var(--text-4);margin-right:4px}+ .memory-entry .mem-val{color:var(--text-2)}+ @keyframes mem-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}+ .ar-demo{display:flex;align-items:center;gap:12px}+ .ar-phone{width:64px;height:100px;border:2px solid var(--hairline-strong);border-radius:10px;background:var(--surface-2);position:relative;overflow:hidden;flex-shrink:0;transition:border-color .3s}+ .ar-phone.active{border-color:var(--text-3)}+ .ar-phone-notch{width:24px;height:4px;background:var(--hairline-strong);border-radius:2px;margin:4px auto 0}+ .ar-phone-screen{position:absolute;inset:10px 3px 6px;background:#111;border-radius:4px;display:flex;align-items:center;justify-content:center;overflow:hidden}+ .ar-phone-avatar{width:32px;height:32px;border-radius:50%;background:var(--surface-1);border:1px solid var(--hairline-strong);display:flex;align-items:center;justify-content:center;font-size:14px;opacity:0;transition:opacity .4s,transform .4s}+ .ar-phone.active .ar-phone-avatar{opacity:1;transform:scale(1.1)}+ .ar-phone-crosshair{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transition:opacity .3s}+ .ar-phone.active .ar-phone-crosshair{opacity:.5}+ .ar-phone-crosshair::before,.ar-phone-crosshair::after{content:'';position:absolute;background:var(--text-3)}+ .ar-phone-crosshair::before{width:16px;height:1px}+ .ar-phone-crosshair::after{width:1px;height:16px}+ .ar-info{display:flex;flex-direction:column;gap:4px}+ .ar-status{font-family:var(--font-mono);font-size:10px;color:var(--text-3);letter-spacing:.08em}+ .ar-status.ready{color:var(--success)}+ .mktplace-strip{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 0}+ .mktplace-strip::-webkit-scrollbar{display:none}+ .mktplace-item{flex-shrink:0;width:52px;height:52px;border-radius:10px;overflow:hidden;border:1px solid var(--hairline-strong);cursor:pointer;background:var(--surface-2);transition:border-color .15s,transform .15s;position:relative;display:block}+ .mktplace-item:hover{border-color:var(--text-3);transform:translateY(-2px)}+ .mktplace-item img{width:100%;height:100%;object-fit:cover;display:block}+ .mktplace-item-initial{width:100%;height:100%;display:none;align-items:center;justify-content:center;font-family:var(--font-mono);font-size:16px;font-weight:600;color:var(--text-3);text-transform:uppercase;line-height:1}+ .mktplace-item-name{position:absolute;bottom:0;left:0;right:0;padding:2px 4px;font-family:var(--font-mono);font-size:7px;color:var(--text);background:rgba(0,0,0,.7);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}+ .mktplace-more{flex-shrink:0;width:52px;height:52px;border-radius:10px;border:1px dashed var(--hairline-strong);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-size:18px;color:var(--text-4);cursor:pointer;transition:border-color .15s,color .15s;text-decoration:none}+ .mktplace-more:hover{border-color:var(--text-3);color:var(--text-2)}+ .analytics-demo{display:flex;flex-direction:column;gap:10px;--spark:var(--success);--spark-deep:#10b981}+ .analytics-example-tag{align-self:flex-start;font-family:var(--font-mono);font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-3);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px}+ .analytics-counters{display:flex;gap:16px}+ .analytics-counter{display:flex;flex-direction:column;gap:1px}+ .analytics-val{font-family:var(--font-display);font-size:18px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;letter-spacing:-0.02em}+ .analytics-val#an-revenue{color:var(--spark)}+ .analytics-lbl{font-family:var(--font-mono);font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-3)}+ .analytics-spark{width:100%;height:40px;display:block}+ .analytics-spark path{fill:none;stroke:var(--spark);stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 3px color-mix(in srgb,var(--spark) 55%,transparent))}+ .analytics-spark .spark-fill{fill:url(#spark-grad);stroke:none;opacity:1;filter:none}+ .analytics-spark .spark-dot{fill:var(--spark);r:2.5;filter:drop-shadow(0 0 4px var(--spark));animation:spark-pulse 2s ease-in-out infinite}+ @keyframes spark-pulse{0%,100%{opacity:1}50%{opacity:.4}}++ /* ── DRAGON VISION SECTION ───────────────────────────────── */+ .vision-block{padding-bottom:0}+ .vision-block .block-eyebrow{margin-bottom:24px}+ .dragon-wrap{position:relative;height:76vh;min-height:420px;max-height:880px;overflow:hidden;background:#050505;cursor:crosshair;border-top:1px solid var(--hairline)}+ .dragon-hint{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);color:rgba(255,255,255,.18);font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;pointer-events:none;transition:opacity 1.5s ease;white-space:nowrap;z-index:5}+ .dragon-hint.fade{opacity:0}+ @media(max-width:720px){.dragon-wrap{height:55vh;min-height:300px}}+ @media(prefers-reduced-motion:reduce){.dragon-wrap canvas{display:none}}++ /* ── Microinteractions (B11) — focus rings + press states ──────────+ Covers every interactive element above that had hover-only states.+ Ring tokens come from /tokens.css + /buttons.css. */+ .door:focus-visible,+ .stack-card:focus-visible,+ .showcase-agent-card:focus-visible,+ .showcase-cta-card:focus-visible,+ .bento-card a:focus-visible,+ .bento-pill-btn:focus-visible,+ .dev-tab:focus-visible,+ .dev-link:focus-visible,+ .pg-key-hint:focus-visible,+ .pg-send:focus-visible,+ .pg-color-trigger:focus-visible,+ .pg-color-swatch:focus-visible,+ .wyg-card:focus-visible,+ .wyg-anim-chip:focus-visible,+ .wyg-anim-stop:focus-visible,+ .hero-chip:focus-visible,+ .foot-col a:focus-visible,+ .foot-ca:focus-visible,+ .mint-card-chain a:focus-visible,+ .mktplace-item:focus-visible,+ .mktplace-more:focus-visible {+ outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, #fff);+ outline-offset: var(--focus-ring-offset, 2px);+ }+ /* Press feedback — buttons squash a hair, links/rows tint deeper. */+ .bento-pill-btn:active,+ .dev-tab:active,+ .wyg-anim-chip:active,+ .wyg-anim-stop:active,+ .pg-color-trigger:active,+ .pg-color-swatch:active,+ .mktplace-more:active,+ .hero-chip:active,+ .foot-ca:active {+ transform: scale(0.97);+ }+ .mktplace-item:active { transform: translateY(0) scale(0.97); }+ /* 3D-transformed cards (stack, showcase) and full-bleed cells press via+ a tint instead of a transform so their perspective layout holds. */+ .door:active,+ .stack-card:active,+ .wyg-card:active { background: var(--surface-2); }+ .showcase-agent-card:active,+ .showcase-cta-card:active { border-color: rgba(255,255,255,0.22); }+ .foot-col a:active,+ .dev-link:active,+ .mint-card-chain a:active { opacity: 0.7; }+ @media (prefers-reduced-motion: reduce) {+ .mktplace-item:active,+ .bento-pill-btn:active, .dev-tab:active, .wyg-anim-chip:active,+ .wyg-anim-stop:active, .pg-color-trigger:active, .pg-color-swatch:active,+ .mktplace-more:active, .hero-chip:active, .foot-ca:active {+ transform: none;+ }+ }++ /* ── HOME AR SECTION ─────────────────────────────────────────── */+ #home-ar { background: var(--bg); }+ .har-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }+ @media (max-width: 860px) { .har-inner { grid-template-columns: 1fr; gap: 40px; } }+ .har-viewer-wrap {+ position: relative;+ border-radius: 20px;+ overflow: hidden;+ /* A soft floor gradient so the model reads as sitting in a space, not+ floating in a void — sells the "real-world scale" promise on desktop. */+ background:+ radial-gradient(120% 80% at 50% 118%, rgba(139,92,246,.16), transparent 60%),+ linear-gradient(180deg, #0a0a14 0%, #0a0a14 55%, #12121e 100%);+ border: 1px solid var(--hairline);+ aspect-ratio: 1 / 1;+ display: flex; align-items: center; justify-content: center;+ }+ /* Faint horizon line where the "floor" meets the "wall". */+ .har-viewer-wrap::after {+ content: ''; position: absolute; left: 8%; right: 8%; bottom: 26%;+ height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);+ pointer-events: none;+ }+ .har-viewer-wrap model-viewer { position: relative; z-index: 1; width: 100%; height: 100%; --poster-color: transparent; background: transparent; }+ .har-viewer-nav {+ position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);+ display: flex; align-items: center; gap: 8px;+ background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);+ border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 6px 10px;+ }+ .har-nav-btn {+ background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer;+ padding: 4px 8px; border-radius: 6px; font-size: 14px; line-height: 1;+ transition: color .15s, background .15s;+ }+ .har-nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); }+ .har-prompt { font-size: 11px; color: rgba(255,255,255,.5); font-family: var(--font-mono); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+ .har-cat {+ position: absolute; top: 14px; left: 14px; z-index: 2;+ font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;+ color: rgba(255,255,255,.7); background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);+ border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 4px 9px;+ opacity: 0; transition: opacity .3s ease;+ }+ .har-cat[data-shown="1"] { opacity: 1; }+ .har-count { font-size: 13px; color: var(--text-3); margin: 10px 0 0; min-height: 18px; opacity: 0; transition: opacity .4s ease; }+ .har-count[data-shown="1"] { opacity: 1; }+ .har-count b { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }+ .har-count .har-dot-live { display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: #34d399; margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: har-pulse 2.4s ease-out infinite; }+ @keyframes har-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }+ @media (prefers-reduced-motion: reduce) { .har-count .har-dot-live { animation: none; } }+ .har-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }+ .har-empty p { color: var(--text-3); font-size: 14px; margin: 0; max-width: 240px; line-height: 1.5; }+ .har-empty a { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #000; font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 999px; text-decoration: none; transition: transform .15s, box-shadow .15s; }+ .har-empty a:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,.14); }+ #home-ar .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }+ .har-viewer-wrap:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }+ .har-dots { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }+ .har-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.25); border: none; padding: 0; cursor: pointer; transition: background .2s, transform .2s; }+ .har-dot:hover { background: rgba(255,255,255,.5); }+ .har-dot[data-active="1"] { background: rgba(255,255,255,.9); transform: scale(1.35); }+ .har-autobar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: linear-gradient(90deg, rgba(139,92,246,.9), rgba(255,255,255,.9)); z-index: 2; }+ .har-autobar[data-run="1"] { width: 100%; transition: width var(--har-auto-ms, 5000ms) linear; }+ @media (prefers-reduced-motion: reduce) { .har-autobar { display: none; } }+ .har-poster-fade { opacity: 0; transition: opacity .35s ease; }+ .har-poster-fade[data-shown="1"] { opacity: 1; }+ .har-skeleton { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; }+ .har-right { display: flex; flex-direction: column; gap: 28px; }+ .har-mobile-btn {+ display: inline-flex; align-items: center; gap: 10px;+ padding: 16px 24px; border-radius: 14px; background: #fff; color: #000;+ font-size: 16px; font-weight: 600; border: none; cursor: pointer;+ transition: transform .15s, box-shadow .15s, opacity .15s; align-self: flex-start;+ }+ .har-mobile-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(255,255,255,.15); }+ .har-mobile-btn:active { transform: none; }+ .har-mobile-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }+ .har-mobile-btn svg { width: 20px; height: 20px; flex-shrink: 0; }+ .har-qr-wrap {+ width: 120px; height: 120px; border-radius: 12px; background: #fff;+ display: flex; align-items: center; justify-content: center;+ padding: 8px; box-sizing: border-box;+ }+ .har-qr-wrap canvas { border-radius: 4px; display: block; }+ .har-qr-label { font-size: 13px; color: var(--text-3); line-height: 1.5; }+ .har-compat { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }+ .har-compat-pill {+ padding: 4px 12px; border-radius: 999px;+ background: rgba(255,255,255,.05); border: 1px solid var(--hairline);+ font-size: 12px; color: var(--text-3);+ }+ .har-cta-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; text-decoration: none; transition: color .15s; }+ .har-cta-link:hover { color: var(--text); }+ /* Show/hide platform-specific UI: default desktop */+ .har-desktop-only { display: flex; flex-direction: column; gap: 12px; }+ .har-mobile-only { display: none; }+ @media (hover: none) and (pointer: coarse) {+ .har-desktop-only { display: none; }+ .har-mobile-only { display: flex; flex-direction: column; gap: 16px; }+ }++ /* iOS auto-zooms any focused field whose font-size is < 16px. Bump every+ editable/focusable text field to 16px on phones — desktop sizing above+ is untouched. Covers chat, playground, forge, mint, memory, hex inputs. */+ @media (max-width: 720px) {+ .pg-input, .pg-url-path, .pg-color-hex-input,+ .pg-editor textarea, .pg-editor pre,+ #home-forge textarea.hf-prompt, #home-forge textarea.hf-embed-code,+ .memory-input, .mint-card-name { font-size: 16px; }+ /* Primary CTAs need a comfortable 44px touch target on phones. The+ shared .btn system runs ~37px tall by default — lift only the+ homepage's lead actions, leaving the desktop button height intact. */+ .hero-cta-row .btn, .cta-card .cta-row .btn,+ .body-drop .cta-row .btn { min-height: 44px; }+ }++ /* ── Oracle conviction mini-cards (home section) ─────────────── */+ .hoc-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); transition: background .14s; text-decoration: none; color: inherit; }+ .hoc-item:last-child { border-bottom: none; }+ .hoc-item:hover { background: rgba(255,255,255,0.03); }+ .hoc-score { font-family: var(--font-mono,monospace); font-size: 22px; font-weight: 800; line-height: 1; width: 42px; text-align: center; flex-shrink: 0; }+ .hoc-score.t-prime, .hoc-score.t-strong { color: var(--green, #22c55e); }+ .hoc-score.t-lean { color: var(--amber, #f59e0b); }+ .hoc-score.t-watch { color: var(--text-3, #6a6a6a); }+ .hoc-score.t-avoid { color: var(--red, #ef4444); }+ .hoc-info { flex: 1; min-width: 0; }+ .hoc-sym { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+ .hoc-name { font-size: 11px; color: var(--text-3, #6a6a6a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }+ .hoc-pillars { display: flex; gap: 4px; margin-top: 5px; }+ .hoc-pillar { height: 3px; border-radius: 2px; flex: 1; background: rgba(255,255,255,.06); position: relative; overflow: hidden; }+ .hoc-pillar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }+ .hoc-tier { font-family: var(--font-mono,monospace); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 3px 7px; border-radius: 5px; white-space: nowrap; flex-shrink: 0; }+ .hoc-tier.t-prime, .hoc-tier.t-strong { background: rgba(34,197,94,.14); color: var(--green, #22c55e); }+ .hoc-tier.t-lean { background: rgba(245,158,11,.13); color: var(--amber, #f59e0b); }+ .hoc-tier.t-watch { background: rgba(255,255,255,.05); color: var(--text-3, #6a6a6a); }+ .hoc-tier.t-avoid { background: rgba(239,68,68,.14); color: var(--red, #ef4444); }+ .hoc-loading { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }+ .hoc-sk { height: 48px; border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: hoc-shimmer 1.3s linear infinite; }+ @keyframes hoc-shimmer { to { background-position: -200% 0; } }+ .hoc-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green, #22c55e); margin-right: 7px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: hoc-pulse 2s infinite; }+ @keyframes hoc-pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5)} 70%{box-shadow:0 0 0 6px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }++ /* ── MOTION SAFETY ──────────────────────────────────────────+ Honor the OS "reduce motion" setting. This page hardcodes ~30+ keyframe animations and many transitions that tokens.css cannot+ reach; neutralize all decorative motion globally so the layout+ stays static for vestibular-sensitive visitors. Essential state+ feedback still renders — only the animation/transition is dropped. */+ @media (prefers-reduced-motion: reduce) {+ html { scroll-behavior: auto; }+ *, *::before, *::after {+ animation-duration: 0.001ms !important;+ animation-iteration-count: 1 !important;+ animation-delay: 0ms !important;+ transition-duration: 0.001ms !important;+ transition-delay: 0ms !important;+ scroll-behavior: auto !important;+ }+ }diff --git a/public/legal/aws-marketplace-eula.html b/public/legal/aws-marketplace-eula.htmlindex 51ad0562f..217e29d56 100644--- a/public/legal/aws-marketplace-eula.html+++ b/public/legal/aws-marketplace-eula.html@@ -1,37 +1,39 @@<!doctype html><html lang="en"><head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="legal_aws_marketplace_eula.meta_title">AWS Marketplace EULA · three.ws</title><link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/tokens.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" /><style>- :root { color-scheme: dark; }* { box-sizing: border-box; }body {font: 16px/1.7 -apple-system, system-ui, 'Segoe UI', sans-serif;- background: #000000;- color: #ccc;+ background: var(--bg-0);+ color: var(--ink);margin: 0;- padding: 48px 24px 80px;}- .wrap { max-width: 720px; margin: 0 auto; }- .brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin: 0 0 32px; display: block; text-decoration: none; }- .header-logo { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }- h1 { font-size: 32px; color: #eee; margin: 0 0 6px; letter-spacing: -.02em; }- .meta { color: #8a8a8a; font-size: 14px; margin: 0 0 40px; }- h2 { font-size: 18px; color: #eee; margin: 40px 0 10px; }- p, li { color: #aaa; font-size: 15px; }+ .wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }+ main.wrap:focus { outline: none; }+ h1 { font-size: 32px; color: var(--ink-bright); margin: 0 0 6px; letter-spacing: -.02em; }+ .meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 40px; }+ h2 { font-size: 18px; color: var(--ink-bright); margin: 40px 0 10px; }+ p, li { color: var(--ink); font-size: 15px; }ul { padding-left: 20px; }li { margin-bottom: 6px; }- a { color: #cccccc; }- hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }- .foot { color: #8a8a8a; font-size: 13px; }+ a { color: var(--ink-bright); }+ hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }+ .foot { color: var(--ink-faint); font-size: 13px; }</style></head><body>-<div class="wrap">- <a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>+<main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_aws_marketplace_eula.aws_marketplace_end_user_license_agreement">AWS Marketplace End User License Agreement</h1><p class="meta" data-i18n-html="legal_aws_marketplace_eula.effective_may_30_2026_terms_of_service">Effective: May 30, 2026 · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a></p>@@ -98,7 +100,9 @@<hr><p class="foot" data-i18n-html="legal_aws_marketplace_eula.three_ws_terms_of_service_privacy_policy">three.ws · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a> · <a href="/">Home</a></p>-</div>+</main>+ <div id="footer-container"></div>+ <script src="/footer.js"></script><script src="/brand.js" defer></script><!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. --><script type="module" src="/i18n.js"></script>diff --git a/public/legal/content-policy.html b/public/legal/content-policy.htmlindex 4bb4e6a1d..b9de24a60 100644--- a/public/legal/content-policy.html+++ b/public/legal/content-policy.html@@ -1,32 +1,33 @@<!doctype html><html lang="en"><head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="legal_content_policy.meta_title">Content Policy · three.ws</title><link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/tokens.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" /><style>- :root { color-scheme: dark; }* { box-sizing: border-box; }body {font: 16px/1.7 -apple-system, system-ui, 'Segoe UI', sans-serif;- background: #000000;- color: #ccc;+ background: var(--bg-0);+ color: var(--ink);margin: 0;- padding: 48px 24px 80px;}- .wrap { max-width: 720px; margin: 0 auto; }- .brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin: 0 0 32px; display: block; text-decoration: none; }- .header-logo { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }- h1 { font-size: 32px; color: #eee; margin: 0 0 6px; letter-spacing: -.02em; }- .meta { color: #8a8a8a; font-size: 14px; margin: 0 0 40px; }- h2 { font-size: 18px; color: #eee; margin: 40px 0 10px; }- p, li { color: #aaa; font-size: 15px; }+ .wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }+ main.wrap:focus { outline: none; }+ h1 { font-size: 32px; color: var(--ink-bright); margin: 0 0 6px; letter-spacing: -.02em; }+ .meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 40px; }+ h2 { font-size: 18px; color: var(--ink-bright); margin: 40px 0 10px; }+ p, li { color: var(--ink); font-size: 15px; }ul { padding-left: 20px; }li { margin-bottom: 6px; }- a { color: #cccccc; }- hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }- .foot { color: #8a8a8a; font-size: 13px; }+ a { color: var(--ink-bright); }+ hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }+ .foot { color: var(--ink-faint); font-size: 13px; }</style><meta name="description" content="Content policy for three.ws — what you may publish, mint, and monetise on the platform." data-i18n-attr="content:legal_content_policy.meta_description">@@ -51,8 +52,9 @@<meta name="twitter:site" content="@trythreews"></head><body>-<div class="wrap">- <a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>+<main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_content_policy.content_policy">Content Policy</h1><p class="meta" data-i18n-html="legal_content_policy.effective_june_21_2026_terms_of_service">Effective: June 21, 2026 · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a></p>@@ -99,7 +101,9 @@<hr><p class="foot" data-i18n-html="legal_content_policy.three_ws_terms_of_service_privacy_policy">three.ws · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a> · <a href="/">Home</a></p>-</div>+</main>+ <div id="footer-container"></div>+ <script src="/footer.js"></script><script src="/brand.js" defer></script><!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. --><script type="module" src="/i18n.js"></script>diff --git a/public/legal/eula.html b/public/legal/eula.htmlindex f7b6f16c5..c6fc3fad2 100644--- a/public/legal/eula.html+++ b/public/legal/eula.html@@ -1,32 +1,33 @@<!doctype html><html lang="en"><head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="legal_eula.meta_title">End-User License Agreement (EULA) · three.ws</title><link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/tokens.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" /><style>- :root { color-scheme: dark; }* { box-sizing: border-box; }body {font: 16px/1.7 -apple-system, system-ui, 'Segoe UI', sans-serif;- background: #000000;- color: #ccc;+ background: var(--bg-0);+ color: var(--ink);margin: 0;- padding: 48px 24px 80px;}- .wrap { max-width: 720px; margin: 0 auto; }- .brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin: 0 0 32px; display: block; text-decoration: none; }- .header-logo { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }- h1 { font-size: 32px; color: #eee; margin: 0 0 6px; letter-spacing: -.02em; }- .meta { color: #8a8a8a; font-size: 14px; margin: 0 0 40px; }- h2 { font-size: 18px; color: #eee; margin: 40px 0 10px; }- p, li { color: #aaa; font-size: 15px; }+ .wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }+ main.wrap:focus { outline: none; }+ h1 { font-size: 32px; color: var(--ink-bright); margin: 0 0 6px; letter-spacing: -.02em; }+ .meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 40px; }+ h2 { font-size: 18px; color: var(--ink-bright); margin: 40px 0 10px; }+ p, li { color: var(--ink); font-size: 15px; }ul { padding-left: 20px; }li { margin-bottom: 6px; }- a { color: #cccccc; }- hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }- .foot { color: #8a8a8a; font-size: 13px; }+ a { color: var(--ink-bright); }+ hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }+ .foot { color: var(--ink-faint); font-size: 13px; }</style><meta name="description" content="License terms for the three.ws Seeker/Saga app." data-i18n-attr="content:legal_eula.meta_description">@@ -51,8 +52,9 @@<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"End-User License Agreement","description":"License terms for the three.ws Seeker/Saga app.","url":"https://three.ws/legal/eula","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=legal&t=End-User+License+Agreement&d=License+terms+for+the+three.ws+Seeker%2FSaga+app.&p=%2Flegal%2Feula"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://three.ws/"},{"@type":"ListItem","position":2,"name":"Legal","item":"https://three.ws/legal"},{"@type":"ListItem","position":3,"name":"Eula","item":"https://three.ws/legal/eula"}]}]}</script></head><body>-<div class="wrap">- <a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>+<main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_eula.end_user_license_agreement">End-User License Agreement</h1><p class="meta" data-i18n-html="legal_eula.effective_july_14_2026_terms_of_service">Effective: July 14, 2026 · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a></p>@@ -123,7 +125,9 @@<hr><p class="foot" data-i18n-html="legal_eula.three_ws_terms_of_service_privacy_policy">three.ws · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a> · <a href="/">Home</a></p>-</div>+</main>+ <div id="footer-container"></div>+ <script src="/footer.js"></script><script src="/brand.js" defer></script><!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. --><script type="module" src="/i18n.js"></script>diff --git a/public/legal/index.html b/public/legal/index.htmlindex 4cc0f7be2..8ed44ddb7 100644--- a/public/legal/index.html+++ b/public/legal/index.html@@ -1,32 +1,33 @@<!doctype html><html lang="en"><head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="legal_index.meta_title">Legal · three.ws</title><link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/tokens.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" /><style>- :root { color-scheme: dark; }* { box-sizing: border-box; }body {font: 16px/1.7 -apple-system, system-ui, 'Segoe UI', sans-serif;- background: #000000;- color: #ccc;+ background: var(--bg-0);+ color: var(--ink);margin: 0;- padding: 48px 24px 80px;}- .wrap { max-width: 720px; margin: 0 auto; }- .brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin: 0 0 32px; display: block; text-decoration: none; }- .header-logo { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }- h1 { font-size: 32px; color: #eee; margin: 0 0 6px; letter-spacing: -.02em; }- .meta { color: #8a8a8a; font-size: 14px; margin: 0 0 40px; }- h2 { font-size: 18px; color: #eee; margin: 40px 0 10px; }- p, li { color: #aaa; font-size: 15px; }+ .wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }+ main.wrap:focus { outline: none; }+ h1 { font-size: 32px; color: var(--ink-bright); margin: 0 0 6px; letter-spacing: -.02em; }+ .meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 40px; }+ h2 { font-size: 18px; color: var(--ink-bright); margin: 40px 0 10px; }+ p, li { color: var(--ink); font-size: 15px; }ul { padding-left: 20px; }li { margin-bottom: 6px; }- a { color: #cccccc; }- hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }- .foot { color: #8a8a8a; font-size: 13px; }+ a { color: var(--ink-bright); }+ hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }+ .foot { color: var(--ink-faint); font-size: 13px; }/* Policy index. Each row is one whole click target, so the title, thesummary and the date are all part of the same link — no small tap area@@ -36,31 +37,31 @@.doc {display: block;padding: 16px 18px;- border: 1px solid #1e1e1e;+ border: 1px solid var(--stroke);border-radius: 10px;text-decoration: none;- background: #070707;+ background: var(--surface-1);transition: border-color .15s ease, background .15s ease, transform .15s ease;}- .doc:hover, .doc:focus-visible { border-color: #3a3a3a; background: #0d0d0d; transform: translateY(-1px); }- .doc:focus-visible { outline: 2px solid #6ea8ff; outline-offset: 2px; }- .doc:active { transform: translateY(0); background: #101010; }- .doc-title { display: block; color: #eee; font-size: 16px; font-weight: 600; margin: 0 0 3px; }- .doc-desc { display: block; color: #999; font-size: 14px; line-height: 1.55; }- .doc-date { display: block; color: #8a8a8a; font-size: 12px; margin-top: 6px; }+ .doc:hover, .doc:focus-visible { border-color: var(--stroke-strong); background: var(--surface-2); transform: translateY(-1px); }+ .doc:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); }+ .doc:active { transform: translateY(0); background: var(--surface-3); }+ .doc-title { display: block; color: var(--ink-bright); font-size: 16px; font-weight: 600; margin: 0 0 3px; }+ .doc-desc { display: block; color: var(--ink-faint); font-size: 14px; line-height: 1.55; }+ .doc-date { display: block; color: var(--ink-faint); font-size: 12px; margin-top: 6px; }/* Contact table: which address actually reaches the right desk. */.contacts { list-style: none; padding: 0; margin: 0; }.contacts li { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; font-size: 15px; }- .contacts .who { color: #eee; min-width: 190px; }- .contacts .what { color: #888; font-size: 14px; flex: 1 1 240px; }+ .contacts .who { color: var(--ink-bright); min-width: 190px; }+ .contacts .what { color: var(--ink-faint); font-size: 14px; flex: 1 1 240px; }@media (prefers-reduced-motion: reduce) {.doc { transition: none; }.doc:hover, .doc:focus-visible, .doc:active { transform: none; }}@media (max-width: 520px) {- body { padding: 32px 18px 64px; }+ .wrap { padding: 32px 18px 64px; }h1 { font-size: 26px; }.contacts .who { min-width: 0; }}@@ -88,8 +89,9 @@<meta name="twitter:site" content="@trythreews"></head><body>-<div class="wrap">- <a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>+<main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_index.legal">Legal</h1><p class="meta" data-i18n="legal_index.every_policy_that_governs_your_use_of">Every policy that governs your use of three.ws, and where to reach us.</p>@@ -156,7 +158,9 @@<hr><p class="foot" data-i18n-html="legal_index.three_ws_terms_of_service_privacy_policy">three.ws · <a href="/legal/tos">Terms of Service</a> · <a href="/legal/privacy">Privacy Policy</a> · <a href="/">Home</a></p>-</div>+</main>+ <div id="footer-container"></div>+ <script src="/footer.js"></script><script src="/brand.js" defer></script><!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. --><script type="module" src="/i18n.js"></script>diff --git a/public/legal/privacy.html b/public/legal/privacy.htmlindex 2d18e32bc..736791105 100644--- a/public/legal/privacy.html+++ b/public/legal/privacy.html@@ -1,35 +1,36 @@<!doctype html><html lang="en"><head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="legal_privacy.meta_title">Privacy Policy · three.ws</title><link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/tokens.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" /><style>- :root { color-scheme: dark; }* { box-sizing: border-box; }body {font: 16px/1.7 -apple-system, system-ui, 'Segoe UI', sans-serif;- background: #000000;- color: #ccc;+ background: var(--bg-0);+ color: var(--ink);margin: 0;- padding: 48px 24px 80px;}- .wrap { max-width: 720px; margin: 0 auto; }- .brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin: 0 0 32px; display: block; text-decoration: none; }- .header-logo { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }- h1 { font-size: 32px; color: #eee; margin: 0 0 6px; letter-spacing: -.02em; }- .meta { color: #8a8a8a; font-size: 14px; margin: 0 0 40px; }- h2 { font-size: 18px; color: #eee; margin: 40px 0 10px; }- p, li { color: #aaa; font-size: 15px; }+ .wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }+ main.wrap:focus { outline: none; }+ h1 { font-size: 32px; color: var(--ink-bright); margin: 0 0 6px; letter-spacing: -.02em; }+ .meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 40px; }+ h2 { font-size: 18px; color: var(--ink-bright); margin: 40px 0 10px; }+ p, li { color: var(--ink); font-size: 15px; }ul { padding-left: 20px; }li { margin-bottom: 6px; }- a { color: #cccccc; }+ a { color: var(--ink-bright); }table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }- th { text-align: left; color: #eee; padding: 8px 12px; border-bottom: 1px solid #2a2a2a; }- td { padding: 8px 12px; border-bottom: 1px solid #1a1a1a; color: #aaa; vertical-align: top; }- hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }- .foot { color: #8a8a8a; font-size: 13px; }+ th { text-align: left; color: var(--ink-bright); padding: 8px 12px; border-bottom: 1px solid var(--stroke-strong); }+ td { padding: 8px 12px; border-bottom: 1px solid var(--hairline); color: var(--ink); vertical-align: top; }+ hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }+ .foot { color: var(--ink-faint); font-size: 13px; }</style><meta name="description" content="How three.ws handles user data." data-i18n-attr="content:legal_privacy.meta_description">@@ -54,8 +55,9 @@<meta name="twitter:site" content="@trythreews"></head><body>-<div class="wrap">- <a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>+<main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_privacy.privacy_policy">Privacy Policy</h1><p class="meta" data-i18n-html="legal_privacy.effective_july_16_2026_version_2_terms">Effective: July 16, 2026 · Version 2 · <a href="/legal/tos">Terms of Service</a></p>@@ -161,7 +163,9 @@<hr><p class="foot" data-i18n-html="legal_privacy.three_ws_terms_of_service_risk_disclosure">three.ws · <a href="/legal/tos">Terms of Service</a> · <a href="/legal/risk">Risk Disclosure</a> · <a href="/">Home</a></p>-</div>+</main>+ <div id="footer-container"></div>+ <script src="/footer.js"></script><script src="/brand.js" defer></script><!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. --><script type="module" src="/i18n.js"></script>diff --git a/public/legal/risk.html b/public/legal/risk.htmlindex 86cc1723a..d1123e660 100644--- a/public/legal/risk.html+++ b/public/legal/risk.html@@ -1,37 +1,40 @@<!doctype html><html lang="en"><head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="legal_risk.meta_title">Risk Disclosure · three.ws</title><link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/tokens.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" /><style>- :root { color-scheme: dark; }* { box-sizing: border-box; }body {font: 16px/1.7 -apple-system, system-ui, 'Segoe UI', sans-serif;- background: #000000;- color: #ccc;+ background: var(--bg-0);+ color: var(--ink);margin: 0;- padding: 48px 24px 80px;}- .wrap { max-width: 720px; margin: 0 auto; }- .brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin: 0 0 32px; display: block; text-decoration: none; }- .header-logo { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }- h1 { font-size: 32px; color: #eee; margin: 0 0 6px; letter-spacing: -.02em; }- .meta { color: #8a8a8a; font-size: 14px; margin: 0 0 40px; }- h2 { font-size: 18px; color: #eee; margin: 40px 0 10px; }- p, li { color: #aaa; font-size: 15px; }+ .wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }+ main.wrap:focus { outline: none; }+ h1 { font-size: 32px; color: var(--ink-bright); margin: 0 0 6px; letter-spacing: -.02em; }+ .meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 40px; }+ h2 { font-size: 18px; color: var(--ink-bright); margin: 40px 0 10px; }+ p, li { color: var(--ink); font-size: 15px; }ul { padding-left: 20px; }li { margin-bottom: 6px; }- a { color: #cccccc; }- hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }- .foot { color: #8a8a8a; font-size: 13px; }+ a { color: var(--ink-bright); }+ hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }+ .foot { color: var(--ink-faint); font-size: 13px; }.callout {- border: 1px solid #3a2f14; background: #14100a; border-radius: 10px;+ border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);+ background: color-mix(in srgb, var(--warn) 8%, var(--bg-0));+ border-radius: 10px;padding: 14px 18px; margin: 0 0 32px;}- .callout p { color: #d8b96a; margin: 0; font-size: 15px; }+ .callout p { color: color-mix(in srgb, var(--warn) 40%, var(--ink)); margin: 0; font-size: 15px; }</style><meta name="description" content="Risk disclosure for real-funds features on three.ws: experimental software, total-loss risk, autonomous agents, no liability." data-i18n-attr="content:legal_risk.meta_description">@@ -56,8 +59,9 @@<meta name="twitter:site" content="@trythreews"></head><body>-<div class="wrap">- <a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>+<main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_risk.risk_disclosure">Risk Disclosure</h1><p class="meta" data-i18n-html="legal_risk.effective_july_3_2026_version_1_terms">Effective: July 3, 2026 · Version 1 · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a></p>@@ -113,7 +117,9 @@<hr /><p class="foot" data-i18n-html="legal_risk.three_ws_terms_of_service_privacy_policy">three.ws · <a href="/legal/tos.html">Terms of Service</a> · <a href="/legal/privacy.html">Privacy Policy</a> · <a href="/legal/content-policy.html">Content Policy</a></p>-</div>+</main>+ <div id="footer-container"></div>+ <script src="/footer.js"></script><!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. --><script type="module" src="/i18n.js"></script></body>diff --git a/public/legal/tos.html b/public/legal/tos.htmlindex 905a98a63..01a17c00b 100644--- a/public/legal/tos.html+++ b/public/legal/tos.html@@ -1,33 +1,34 @@<!doctype html><html lang="en"><head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="legal_tos.meta_title">Terms of Service · three.ws</title><link rel="icon" href="/favicon.ico" />+ <link rel="stylesheet" href="/tokens.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" /><style>- :root { color-scheme: dark; }* { box-sizing: border-box; }body {font: 16px/1.7 -apple-system, system-ui, 'Segoe UI', sans-serif;- background: #000000;- color: #ccc;+ background: var(--bg-0);+ color: var(--ink);margin: 0;- padding: 48px 24px 80px;}- .wrap { max-width: 720px; margin: 0 auto; }- .brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin: 0 0 32px; display: block; text-decoration: none; }- .header-logo { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }- h1 { font-size: 32px; color: #eee; margin: 0 0 6px; letter-spacing: -.02em; }- .meta { color: #8a8a8a; font-size: 14px; margin: 0 0 40px; }- h2 { font-size: 18px; color: #eee; margin: 40px 0 10px; }- p, li { color: #aaa; font-size: 15px; }+ .wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }+ main.wrap:focus { outline: none; }+ h1 { font-size: 32px; color: var(--ink-bright); margin: 0 0 6px; letter-spacing: -.02em; }+ .meta { color: var(--ink-faint); font-size: 14px; margin: 0 0 40px; }+ h2 { font-size: 18px; color: var(--ink-bright); margin: 40px 0 10px; }+ p, li { color: var(--ink); font-size: 15px; }ul { padding-left: 20px; }li { margin-bottom: 6px; }- a { color: #cccccc; }- hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }- .foot { color: #8a8a8a; font-size: 13px; }- .callout { border: 1px solid #2a2a2a; border-radius: 10px; padding: 14px 18px; background: #0a0a0a; }+ a { color: var(--ink-bright); }+ hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }+ .foot { color: var(--ink-faint); font-size: 13px; }+ .callout { border: 1px solid var(--stroke-strong); border-radius: 10px; padding: 14px 18px; background: var(--surface-1); }</style><meta name="description" content="Terms of service for three.ws." data-i18n-attr="content:legal_tos.meta_description">@@ -52,8 +53,9 @@<meta name="twitter:site" content="@trythreews"></head><body>-<div class="wrap">- <a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>+<main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_tos.terms_of_service">Terms of Service</h1><p class="meta" data-i18n-html="legal_tos.effective_july_16_2026_version_2_privacy">Effective: July 16, 2026 · Version 2 · <a href="/legal/privacy">Privacy Policy</a> · <a href="/legal/risk">Risk Disclosure</a></p>@@ -151,7 +153,9 @@<hr><p class="foot" data-i18n-html="legal_tos.three_ws_privacy_policy_risk_disclosure_cont">three.ws · <a href="/legal/privacy">Privacy Policy</a> · <a href="/legal/risk">Risk Disclosure</a> · <a href="/legal/content-policy">Content Policy</a> · <a href="/">Home</a></p>-</div>+</main>+ <div id="footer-container"></div>+ <script src="/footer.js"></script><script src="/brand.js" defer></script><!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. --><script type="module" src="/i18n.js"></script>diff --git a/public/locales/ka.json b/public/locales/ka.jsonindex da91fa80b..d7214e19d 100644--- a/public/locales/ka.json+++ b/public/locales/ka.json@@ -12180,7 +12180,7 @@"marketplace": "მარკეტფლეისი","meta_description": "three.ws პოდკასტი ახლა უკვე ხელმისაწვდომია @Spotify-ზე. არ მოგწონთ ზედმეტად გრძელი სტატიები? გვესმის თქვენი. აღმოაჩინეთ ჩვენი ახლად გაშვებული ონ-ჩეინ 3D აგენტები და შეიტყვეთ მეტი, თუ როგორ ვაქცევთ AI-ს ხელმისაწვდომს ყველასთვის მთელ მსოფლიოში.","meta_og_description": "three.ws პოდკასტი ახლა უკვე ხელმისაწვდომია @Spotify-ზე. არ მოგწონთ ზედმეტად გრძელი სტატიები? გვესმის თქვენი. აღმოაჩინეთ ჩვენი ახლად გაშვებული ონ-ჩეინ 3D აგენტები და შეიტყვეთ მეტი, თუ როგორ ვაქცევთ AI-ს ხელმისაწვდომს ყველასთვის მთელ მსოფლიოში.",- "meta_og_title": "",+ "meta_og_title": "The","meta_title": "three.ws —","meta_twitter_description": "three.ws პოდკასტი უკვე ხელმისაწვდომია @Spotify-ზე. არ გიყვართ ზედმეტად გრძელი სტატიები? გვესმის თქვენი. აღმოაჩინეთ ჩვენი ახლად გაშვებული ონჩეინ 3D აგენტები და გაიგეთ მეტი, თუ როგორ ვაქცევთ ხელოვნურ ინტელექტს ხელმისაწვდომს ყველასთვის მთელ მსოფლიოში.","meta_twitter_title": "სიახლე",diff --git a/public/locales/si.json b/public/locales/si.jsonindex fcba59952..a5b955d60 100644--- a/public/locales/si.json+++ b/public/locales/si.json@@ -12707,7 +12707,7 @@"news": "පුවත්","news_announcements": "පුවත් සහ නිවේදන","originally_shared_on_x": "<em>මුලින්ම <a href=\"https://x.com/trythreews/status/2052418108837781511\" rel=\"noopener\">X</a> ඔස්සේ බෙදා ගන්නා ලදී.</em>",- "the": "",+ "the": "The","the_three_ws_podcast_is_now_live": "<br>three.ws පොඩ්කාස්ට් එක දැන් <br><a href=\"https://x.com/amazonmusic\" rel=\"noopener\">@amazonmusic</a> ඔස්සේ සජීවීයි.","three_ws_home_news_rss_x_github": "© three.ws · <a href=\"/\">මුල් පිටුව</a> · <a href=\"/news\">පුවත්</a> · <a href=\"/rss/announcements.xml\">RSS</a> · <a href=\"https://x.com/trythreews\" rel=\"noopener\">X</a> · <a href=\"https://github.com/nirholas/three.ws\" rel=\"noopener\">GitHub</a>","trythreews": "@trythreews",diff --git a/public/my-agents/index.html b/public/my-agents/index.htmlindex 69b137678..9268ddad9 100644--- a/public/my-agents/index.html+++ b/public/my-agents/index.html@@ -7,6 +7,20 @@<title data-i18n="my_agents_index.meta_title">My Agents · three.ws</title><meta name="description" content="Manage your 3D AI agents on three.ws — edit, chat, check on-chain registration, and create new ones." data-i18n-attr="content:my_agents_index.meta_description"/><meta name="robots" content="noindex" />+ <link rel="canonical" href="https://three.ws/my-agents" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:url" content="https://three.ws/my-agents" />+ <meta property="og:title" content="My Agents · three.ws" />+ <meta property="og:description" content="Your private collection of agents and avatars on three.ws: edit, chat, check on-chain registration, and create new ones." />+ <meta property="og:image" content="https://three.ws/api/page-og?s=agent-tools&t=My+Agents&d=Your+private+collection+of+agents+and+avatars+on+three.ws%3A+edit%2C+chat%2C+check+on-chain+registration%2C+and+create+new+ones.&p=%2Fmy-agents" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="My Agents · three.ws" />+ <meta name="twitter:description" content="Your private collection of agents and avatars on three.ws: edit, chat, check on-chain registration, and create new ones." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=agent-tools&t=My+Agents&d=Your+private+collection+of+agents+and+avatars+on+three.ws%3A+edit%2C+chat%2C+check+on-chain+registration%2C+and+create+new+ones.&p=%2Fmy-agents" /><meta name="theme-color" content="#0a0a0c" /><link rel="icon" href="/favicon.ico" sizes="any" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" />diff --git a/public/nav-data.js b/public/nav-data.jsindex adcb14136..c9662732f 100644--- a/public/nav-data.js+++ b/public/nav-data.js@@ -239,6 +239,13 @@ export const NAV_GROUPS = [href: '/pulse',desc: 'Live, platform-wide feed of real agent wallet activity — tips, launches, trades & payments',},+ {+ title: 'Agent Symphony',+ href: '/symphony',+ badge: 'Live',+ badgeTone: 'live',+ desc: 'The agent economy played as generative music: every real payment, trade & launch becomes a note',+ },{title: 'On-chain Deployments',href: '/deployments',diff --git a/public/settings/index.html b/public/settings/index.htmlindex 543b847d2..5787b2dcf 100644--- a/public/settings/index.html+++ b/public/settings/index.html@@ -4,6 +4,21 @@<meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title data-i18n="settings_index.meta_title">Settings · three.ws</title>+ <meta name="description" content="Account, profile, and notification settings." />+ <meta name="robots" content="noindex" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:url" content="https://three.ws/settings" />+ <meta property="og:title" content="Settings · three.ws" />+ <meta property="og:description" content="Account, profile, and notification settings." />+ <meta property="og:image" content="https://three.ws/api/page-og?s=account&t=Settings&d=Account%2C+profile%2C+and+notification+settings.&p=%2Fsettings" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Settings · three.ws" />+ <meta name="twitter:description" content="Account, profile, and notification settings." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=account&t=Settings&d=Account%2C+profile%2C+and+notification+settings.&p=%2Fsettings" /><link rel="icon" href="/favicon.ico" /><link rel="stylesheet" href="/fonts/fonts.css" /><link rel="stylesheet" href="/footer.css" />diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex c79d294e7..765a11302 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -5,7 +5,21 @@<meta name="viewport" content="width=device-width,initial-scale=1" /><title>Sitemap · three.ws</title><meta name="description" content="Complete index of every public page on three.ws." />+<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" /><link rel="canonical" href="https://three.ws/sitemap" />+<meta property="og:type" content="website" />+<meta property="og:site_name" content="three.ws" />+<meta property="og:url" content="https://three.ws/sitemap" />+<meta property="og:title" content="Sitemap · three.ws" />+<meta property="og:description" content="Complete index of every public page on three.ws." />+<meta property="og:image" content="https://three.ws/api/page-og?s=main&t=Sitemap&d=Complete+index+of+every+public+page+on+three.ws.&p=%2Fsitemap" />+<meta property="og:image:width" content="1200" />+<meta property="og:image:height" content="630" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:site" content="@trythreews" />+<meta name="twitter:title" content="Sitemap · three.ws" />+<meta name="twitter:description" content="Complete index of every public page on three.ws." />+<meta name="twitter:image" content="https://three.ws/api/page-og?s=main&t=Sitemap&d=Complete+index+of+every+public+page+on+three.ws.&p=%2Fsitemap" /><link rel="alternate" type="application/xml" title="XML sitemap" href="/sitemap.xml" /><link rel="alternate" type="text/plain" title="llms.txt" href="/llms.txt" /><link rel="stylesheet" href="/nav.css" />diff --git a/scripts/build-page-index.mjs b/scripts/build-page-index.mjsindex c56248808..01d8ff889 100644--- a/scripts/build-page-index.mjs+++ b/scripts/build-page-index.mjs@@ -232,14 +232,36 @@ ${items}.map((s) => `\t\t\t<a href="#${escapeHtml(s.id)}">${escapeHtml(s.title)}</a>`).join('\n');+ const sitemapDescription = `Complete index of every public page on ${site.name}.`;+ const sitemapOgImage = `${baseUrl}/api/page-og?${new URLSearchParams({+ s: 'main',+ t: 'Sitemap',+ d: sitemapDescription,+ p: '/sitemap',+ })}`;+return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title>Sitemap · ${escapeHtml(site.name)}</title>-<meta name="description" content="Complete index of every public page on ${escapeHtml(site.name)}." />+<meta name="description" content="${escapeHtml(sitemapDescription)}" />+<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" /><link rel="canonical" href="${escapeHtml(baseUrl)}/sitemap" />+<meta property="og:type" content="website" />+<meta property="og:site_name" content="${escapeHtml(site.name)}" />+<meta property="og:url" content="${escapeHtml(baseUrl)}/sitemap" />+<meta property="og:title" content="Sitemap · ${escapeHtml(site.name)}" />+<meta property="og:description" content="${escapeHtml(sitemapDescription)}" />+<meta property="og:image" content="${escapeHtml(sitemapOgImage)}" />+<meta property="og:image:width" content="1200" />+<meta property="og:image:height" content="630" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:site" content="@trythreews" />+<meta name="twitter:title" content="Sitemap · ${escapeHtml(site.name)}" />+<meta name="twitter:description" content="${escapeHtml(sitemapDescription)}" />+<meta name="twitter:image" content="${escapeHtml(sitemapOgImage)}" /><link rel="alternate" type="application/xml" title="XML sitemap" href="/sitemap.xml" /><link rel="alternate" type="text/plain" title="llms.txt" href="/llms.txt" /><link rel="stylesheet" href="/nav.css" />diff --git a/scripts/check-claude-md.mjs b/scripts/check-claude-md.mjsnew file mode 100644index 000000000..0785dff51--- /dev/null+++ b/scripts/check-claude-md.mjs@@ -0,0 +1,77 @@+#!/usr/bin/env node+// Assert CLAUDE.md tells the truth about this repository.+//+// CLAUDE.md is the operating brain for every agent in this workspace: it names+// npm scripts, file paths, and runbook steps that agents execute verbatim. When+// the repo moves and CLAUDE.md doesn't, agents follow instructions into dead+// ends (a renamed script, a moved runbook, a deleted directory) and burn a+// session discovering the drift. This check makes that drift a red build+// instead of a wasted session.+//+// Three assertions:+// 1. Every `npm run <script>` and backticked script-name (build:gcp,+// check:dist, ...) referenced in CLAUDE.md exists in package.json.+// 2. Every concrete repo path referenced in CLAUDE.md exists on disk.+// Placeholders (<name>), globs (*), brace sets ({a,b}), URLs, and build+// artifacts are skipped; the check only fails on paths an agent would+// try to open and not find.+// 3. CLAUDE.md honors its own typography rule: no em/en-dashes outside the+// Tone paragraph that names the banned characters.+//+// Run: node scripts/check-claude-md.mjs (wired as `npm run check:claude`)++import { existsSync, readFileSync } from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const md = readFileSync(path.join(root, 'CLAUDE.md'), 'utf8');+const pkg = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8'));+const scripts = pkg.scripts || {};++const failures = [];++// 1. npm scripts: `npm run x` prose plus bare backticked script names.+const referenced = new Set();+for (const m of md.matchAll(/npm run ([a-z0-9:._-]+)/g)) referenced.add(m[1]);+for (const m of md.matchAll(/`([a-z][a-z0-9-]*(?::[a-z0-9-]+)+)`/g)) referenced.add(m[1]);+for (const name of [...referenced].sort()) {+ if (!scripts[name]) failures.push(`npm script \`${name}\` is referenced but missing from package.json`);+}++// 2. Repo paths: backticked tokens and markdown link targets that contain a+// slash. Anything an agent could not literally open is skipped, not guessed.+const artifactPaths = new Set([+ 'dist/',+ 'node_modules',+ 'chat/node_modules',+ 'character-studio/build',+ '.github/workflows/', // named only to be forbidden; must not be required to exist+]);+const candidates = new Set();+for (const m of md.matchAll(/`([^`\n]+)`/g)) candidates.add(m[1]);+for (const m of md.matchAll(/\]\(([^)\s]+)\)/g)) candidates.add(m[1]);+for (const raw of [...candidates].sort()) {+ if (!raw.includes('/')) continue;+ if (!/^[A-Za-z0-9_./-]+$/.test(raw)) continue; // placeholders, globs, braces, spaces, @scopes+ if (raw.startsWith('/') || raw.startsWith('-') || raw.includes('://')) continue; // routes, flags, URLs+ if (raw.startsWith('three.ws/') || raw.startsWith('pump.fun/')) continue; // domains in prose+ if (artifactPaths.has(raw)) continue;+ if (!existsSync(path.join(root, raw))) failures.push(`path \`${raw}\` is referenced but does not exist`);+}++// 3. Typography: the ban applies to the file that declares it. Only the lines+// that name the banned characters may contain them.+md.split('\n').forEach((line, i) => {+ if (/[—–]/.test(line) && !/em-dash|en-dash/.test(line)) {+ failures.push(`line ${i + 1} contains an em/en-dash, which CLAUDE.md itself bans`);+ }+});++if (failures.length) {+ console.error(`[check-claude] ${failures.length} drift issue(s) between CLAUDE.md and the repo:`);+ for (const f of failures) console.error(`[check-claude] ${f}`);+ console.error('[check-claude] Fix CLAUDE.md (or the repo) so agents are never handed a dead instruction.');+ process.exit(1);+}+console.log('[check-claude] OK: every script, path, and typography rule in CLAUDE.md matches the repo');diff --git a/scripts/fact-check-benchmark.mjs b/scripts/fact-check-benchmark.mjsindex 0cdfe3cde..e0b1d4cc2 100644--- a/scripts/fact-check-benchmark.mjs+++ b/scripts/fact-check-benchmark.mjs@@ -16,6 +16,13 @@// FACT_CHECK_BYPASS_TOKEN=… node scripts/fact-check-benchmark.mjs// FACT_CHECK_ENDPOINT=https://three.ws/api/x402/fact-check node scripts/fact-check-benchmark.mjs//+// In-process mode (how the published numbers are produced): imports+// api/x402/fact-check.js#_checkClaim directly and runs the REAL chain (live+// search + live LLM) with no HTTP or payment layer in between. The Redis cache+// is disabled for the run so every claim exercises the live chain instead of a+// stale cached verdict:+// node --env-file=.env scripts/fact-check-benchmark.mjs --in-process+//// The scoring core (scoreResults / summarize) is pure and unit-tested in// tests/api/fact-check-v2.test.js.@@ -143,6 +150,10 @@ async function main() {const claims = validateFixture(fixture);console.log(`Loaded ${claims.length} benchmark claims (validated).`);+ const inProcess =+ process.argv.includes('--in-process') || process.env.FACT_CHECK_INPROCESS === '1';+ if (inProcess) return mainInProcess(claims, fixture);+const endpoint = process.env.FACT_CHECK_ENDPOINT || 'https://three.ws/api/x402/fact-check';const bypassToken = process.env.FACT_CHECK_BYPASS_TOKEN || '';@@ -194,6 +205,66 @@ async function main() {console.log(`Wrote ${OUT_FILE}`);}+// ── In-process mode ──────────────────────────────────────────────────────────+// Runs the real chain by importing the endpoint's exported _checkClaim — the+// same code path a paying caller hits, minus the HTTP/x402 wrapper. Used to+// produce the published data/_generated numbers so the benchmark measures the+// product's verdict quality, not payment plumbing.++async function mainInProcess(claims, fixture) {+ // Disable the shared Redis verdict cache for the run: a benchmark that reads+ // week-old cached verdicts measures the cache, not the chain.+ delete process.env.UPSTASH_REDIS_REST_URL;+ delete process.env.UPSTASH_REDIS_REST_TOKEN;+ delete process.env.three_KV_REST_API_URL;+ delete process.env.three_KV_REST_API_TOKEN;+ delete process.env.KV_REST_API_URL;+ delete process.env.KV_REST_API_TOKEN;++ const { _checkClaim } = await import('../api/x402/fact-check.js');+ const endpoint = 'in-process:api/x402/fact-check.js#_checkClaim (real chain, no HTTP/x402 payment layer)';+ console.log(`Running ${claims.length} claims in-process (live search + live LLM, cache disabled) …`);++ const results = [];+ const details = [];+ for (const [i, c] of claims.entries()) {+ let actual = null;+ let detail = null;+ try {+ const r = await _checkClaim(c.claim, 'medium', null);+ actual = r?.verdict ?? null;+ detail = {+ confidence: r?.confidence ?? null,+ sources: (r?.sources || []).map((s) => ({ url: s.url, stance: s.stance, weight: s.weight })),+ };+ } catch (err) {+ console.warn(` [${i + 1}/${claims.length}] error: ${err.message}`);+ }+ const ok = actual === c.expected_verdict;+ console.log(` [${i + 1}/${claims.length}] ${ok ? 'PASS' : 'MISS'} expected=${c.expected_verdict} actual=${actual ?? 'ERR'} :: ${c.claim.slice(0, 60)}`);+ results.push({ claim: c.claim, expected_verdict: c.expected_verdict, difficulty: c.difficulty, actual_verdict: actual });+ details.push({ claim: c.claim, expected: c.expected_verdict, actual, ...detail });+ }++ const score = scoreResults(results);+ const report = {+ generated_at: new Date().toISOString(),+ endpoint,+ fixture_version: fixture.version || '1.0.0',+ claim_count: claims.length,+ ...score,+ };+ await mkdir(OUT_DIR, { recursive: true });+ await writeFile(OUT_FILE, JSON.stringify(report, null, 2) + '\n');+ // Per-claim detail for diagnosis (not published; scratch aid for whoever is+ // tuning the chain). Written next to nothing public.+ if (process.env.FACT_CHECK_DETAIL_FILE) {+ await writeFile(process.env.FACT_CHECK_DETAIL_FILE, JSON.stringify(details, null, 2) + '\n');+ }+ console.log(`\nOverall accuracy: ${score.accuracy_pct}% (${score.correct}/${score.total}, ${score.errors} errors)`);+ console.log(`Wrote ${OUT_FILE}`);+}+// Only run main() when invoked directly, not when imported by the test.if (process.argv[1] && process.argv[1].endsWith('fact-check-benchmark.mjs')) {main().catch((err) => {diff --git a/scripts/gcp-triage.mjs b/scripts/gcp-triage.mjsindex 55b1f4541..36b40c9c5 100644--- a/scripts/gcp-triage.mjs+++ b/scripts/gcp-triage.mjs@@ -18,6 +18,7 @@*/import { spawnSync } from 'node:child_process';+import { auditCapacity, recommend as recommendCapacity } from './gpu-capacity.mjs';const PROJECT = process.env.GCP_PROJECT || 'aerial-vehicle-466722-p5';const HEALTHZ_URL = process.env.TRIAGE_HEALTHZ_URL || 'https://three.ws/api/healthz';@@ -115,6 +116,21 @@ const KNOWN_SIGNATURES = [class: 'self-healing',action: `The pump.fun launch handler simulates every transaction before broadcasting; this line is the simulation REFUSING a launch that would have failed on-chain (program custom errors: slippage moved, mint state raced, metadata rejected), which protects the user's fees. The caller gets a clean 502 and a retry succeeds (verify: a 201 from the same route usually follows within minutes). Investigate only if the same wallet repeats the failure many times or the 502 rate on /api/pump/launch-agent becomes a sustained group. ${RUNBOOK} §pump-launch-sim-rejected.`,},+ {+ id: 'colyseus-seat-expired',+ match: /Error: seat reservation expired\./i,+ class: 'self-healing',+ action: `Colyseus matchmaking issued a seat and the client never completed the WebSocket upgrade inside the reservation TTL (slow network, closed tab, backgrounded mobile browser). The server correctly refuses the stale ticket; the client's next join request gets a fresh seat. Steady low cadence is normal. Investigate only if it spikes alongside multiplayer connect complaints (then suspect LB/WebSocket latency, not Colyseus). ${RUNBOOK} §colyseus-seat-expired.`,+ },+ {+ // Scoped to the service: an identical signal line from any OTHER service+ // must stay `investigate` — this entry only explains the pinned SRH image.+ id: 'redis-proxy-srh-crash',+ match: /Uncaught signal: 10, pid=\d+, tid=\d+/i,+ services: ['three-ws-redis-proxy'],+ class: 'self-healing',+ action: `The pinned hiett/serverless-redis-http (SRH) image aborts sporadically (~3x/day observed) and Cloud Run restarts it; minScale 2 keeps a warm sibling serving and the API's cache circuit breaker + memory fallback ride out the blip (healthz cache stays ok). No user impact at the observed rate. Durable fix when the owner approves an image change: bump the SRH image tag on three-ws-redis-proxy. Investigate only if the crash rate climbs to many per hour or healthz cache degrades. ${RUNBOOK} §redis-proxy-srh-crash.`,+ },];// Known signatures for request-log (5xx) groups. `test` sees the http group:@@ -257,9 +273,14 @@ export function fingerprint(message) {.slice(0, 160);}-export function classify(message) {+export function classify(message, services) {for (const sig of KNOWN_SIGNATURES) {- if (sig.match.test(message)) return sig;+ if (!sig.match.test(message)) continue;+ // A signature may scope itself to specific services (e.g. a known crash in+ // one pinned third-party image); the same text from anywhere else must+ // stay unclassified so it surfaces as `investigate`.+ if (sig.services && !(services || []).some((s) => sig.services.includes(s))) continue;+ return sig;}return null;}@@ -323,7 +344,7 @@ export function buildFindings(entries) {const findings = [];for (const g of appGroups.values()) {- const sig = classify(g.sample) || classify(g.title);+ const sig = classify(g.sample, [...g.services]) || classify(g.title, [...g.services]);findings.push({kind: 'app',class: sig ? sig.class : 'investigate',@@ -399,6 +420,40 @@ function renderReport({ opts, healthz, findings, scanned }) {return lines.join('\n');}+// A GPU-starvation finding names the symptom; the fix depends on where the free+// capacity actually is, which only the per-region capacity audit knows. Rather+// than making every triage run pay for that sweep, run it ONLY when the sweep+// already saw starvation, and fold the concrete answer into the finding.+function gpuCapacityFindings(findings) {+ const starved = findings.filter((f) => f.signature === 'gpu-quota-starved');+ if (!starved.length) return [];+ let report;+ try {+ report = auditCapacity({ project: PROJECT });+ } catch {+ return []; // capacity audit is advisory; never let it fail the sweep+ }+ if (!report) return [];+ const recs = recommendCapacity(report).filter((r) => r.priority <= 2);+ if (!recs.length) return [];+ const free = report.regions+ .filter((r) => r.headroom > 0)+ .map((r) => `${r.region} (${r.headroom} free of ${r.granted})`);+ return [{+ kind: 'capacity',+ class: 'env-action',+ signature: 'gpu-capacity-plan',+ title: 'GPU capacity plan for the starvation above',+ severity: 'WARNING',+ count: starved.reduce((n, f) => n + f.count, 0),+ services: [...new Set(starved.flatMap((f) => f.services))],+ firstSeen: starved[0].firstSeen,+ lastSeen: starved[starved.length - 1].lastSeen,+ sample: free.length ? `unpinned GPUs available in: ${free.join(', ')}` : 'no region currently has an unpinned GPU',+ action: `${recs.map((r, i) => `${i + 1}. ${r.detail} → ${r.command}`).join(' ')} Full picture: npm run gpu. Fleet map: docs/ops/gcp-credits-plan.md.`,+ }];+}+async function main() {const opts = parseArgs(process.argv.slice(2));const [healthz, entries] = await Promise.all([@@ -406,6 +461,7 @@ async function main() {Promise.resolve().then(() => readLogs(opts)),]);const findings = buildFindings(entries);+ findings.push(...gpuCapacityFindings(findings));const actionable = findings.filter((f) => f.class !== 'self-healing');const unhealthy = !healthz.reachable|| (healthz.degraded && healthz.degraded.length > 0)diff --git a/scripts/gpu-capacity.mjs b/scripts/gpu-capacity.mjsindex 55b441857..78dc48578 100644--- a/scripts/gpu-capacity.mjs+++ b/scripts/gpu-capacity.mjs@@ -237,10 +237,11 @@ export function bucketUsage(services, quotas) {return [...buckets.values()].sort((a, b) => a.label.localeCompare(b.label));}-function audit(opts) {- const grants = quotaGrants(opts.project);- const regions = opts.regions.map((region) => {- const services = gpuServices(region, opts.project);+export function auditCapacity(opts) {+ const project = opts.project || PROJECT;+ const grants = quotaGrants(project);+ const regions = (opts.regions?.length ? opts.regions : GPU_REGIONS).map((region) => {+ const services = gpuServices(region, project);const quotas = grants.get(region) || [];const buckets = bucketUsage(services, quotas);// The L4 no-redundancy pool is what every 3D engine shares; it is the@@ -260,7 +261,7 @@ function audit(opts) {starved: services.filter((s) => s.min === 0 && s.quotaId === L4_BUCKET),};});- return { project: opts.project, checkedAt: new Date().toISOString(), regions };+ return { project, checkedAt: new Date().toISOString(), regions };}/** Where to put work, and how to get more capacity. Ordered by time-to-effect. */@@ -541,7 +542,7 @@ if (opts.port) {} else if (opts.request != null) {requestQuota(opts);} else {- const report = audit(opts);+ const report = auditCapacity(opts);if (opts.json) {console.log(JSON.stringify({ ...report, recommendations: recommend(report) }, null, 2));} else {diff --git a/scripts/i18n-translate.mjs b/scripts/i18n-translate.mjsindex a071f8d73..194e40278 100644--- a/scripts/i18n-translate.mjs+++ b/scripts/i18n-translate.mjs@@ -30,6 +30,7 @@import { writeFileSync, existsSync } from 'node:fs';import { resolve } from 'node:path';+import { pathToFileURL } from 'node:url';import { config as dotenv } from 'dotenv';import JSON5 from 'json5';import {@@ -788,7 +789,13 @@ async function main() {console.log(`\ni18n-translate: ${n} key(s) translated across ${targets.length} locale(s).`);}-main().catch((err) => {- console.error(err.message || err);- process.exit(1);-});+// Run only when invoked as a CLI. Importing this module for its pure helpers+// (the markup tests import `configError` / `isFatalAuthFailure`) must not kick off+// a translation run — it did, and its failure called process.exit(1) from inside+// the test worker, so a fully green suite still reported a red exit code.+if (import.meta.url === pathToFileURL(process.argv[1] || '').href) {+ main().catch((err) => {+ console.error(err.message || err);+ process.exit(1);+ });+}diff --git a/sdk/agent-sdk/README.md b/sdk/agent-sdk/README.mdnew file mode 100644index 000000000..433cb1bb6--- /dev/null+++ b/sdk/agent-sdk/README.md@@ -0,0 +1,95 @@+# @three-ws/agent-sdk++Minimal TypeScript chat + embed SDK for the three.ws agent fabric. One class, zero runtime dependencies. It wraps the three.ws HTTP API so any Node script or web app can stream a conversation with a three.ws agent or drop the agent's hosted UI into a page, without pulling in the full [`@three-ws/sdk`](../README.md) (chat panel, on-chain registration, permissions, Solana helpers).++Use this package when you only need programmatic chat or an iframe embed. Use [`@three-ws/sdk`](../README.md) when you want the floating chat panel, avatar loading, ERC-8004 or Solana registration, or x402 paid agent calls.++## Status++Private workspace package (`"private": true`), consumed inside this repo. It is not published to npm. Built with tsup to dual CJS and ESM with type declarations.++## Build and use++From this directory:++```bash+npm install+npm run build # tsup src/index.ts -> dist/index.js (ESM), dist/index.cjs (CJS), dist/index.d.ts+```++This package is not in the root npm workspaces list, so the bare specifier `@three-ws/agent-sdk` does not resolve on its own. After building, wire it into your consuming project by path or link:++```bash+# from the consuming project+npm install /workspaces/three.ws/sdk/agent-sdk # or a relative path, e.g. ../sdk/agent-sdk+# or: run `npm link` here, then `npm link @three-ws/agent-sdk` in the consumer+```++Then import it (the `exports` map resolves ESM, CJS, and types automatically):++```ts+import { Agent, createAgent } from '@three-ws/agent-sdk';+```++`npm run dev` runs the same tsup build in watch mode.++## Exports++Everything lives in [src/index.ts](src/index.ts):++- `Agent`: the client class. Constructor: `new Agent(apiKey, agentId, options?)`.+- `createAgent(apiKey, agentId, options?)`: factory returning a `new Agent(...)`.+- `AgentOptions`: options interface, currently `{ baseUrl?: string }`.++### `new Agent(apiKey, agentId, options?)`++| Argument | Type | Description |+| --------- | -------------- | ------------------------------------------------------------------------------------------------ |+| `apiKey` | `string` | Sent as `Authorization: Bearer <apiKey>` on chat requests |+| `agentId` | `string` | three.ws agent id, included in the chat body and the embed URL |+| `options` | `AgentOptions` | `baseUrl` overrides the API origin. Otherwise the `THREE_WS_BASE_URL` env var is used in Node when set, else `https://three.ws` |++### `agent.chat(message, history?)`++`POST`s `{ agentId, message, history }` to `<baseUrl>/api/chat` and returns a `Promise<AsyncIterable>` of parsed server-sent-event payloads. `history` is an optional array of `{ role: 'user' | 'assistant', content: string }`. Non-2xx responses throw `Error('Chat API request failed: <status> <body>')`; malformed SSE chunks are logged with `console.warn` and skipped rather than silently dropped.++### `agent.embed(element)`++Browser only. Appends a borderless full-size `<iframe>` pointing at `<baseUrl>/agent/<agentId>/embed` to the given `HTMLElement`. For the richer web-component embed (animations, camera controls, moods), use [`<agent-3d>`](../README.md#embed-a-3d-avatar) from the main SDK instead.++## Example++Stream a chat reply in Node 18+ (global `fetch` required):++```ts+import { createAgent } from '@three-ws/agent-sdk';++const apiKey = process.env.THREE_WS_KEY;+if (!apiKey) throw new Error('Set THREE_WS_KEY');++const agent = createAgent(apiKey, 'agt_abc123', {+ baseUrl: 'https://three.ws',+});++const stream = await agent.chat('What can you do?', [+ { role: 'user', content: 'hi' },+ { role: 'assistant', content: 'Hello! How can I help?' },+]);++for await (const chunk of stream) {+ console.log(chunk);+}+```++## Files++- [src/index.ts](src/index.ts): the whole SDK (`Agent`, `createAgent`, `AgentOptions`)+- [tsup.config.ts](tsup.config.ts): build config (CJS + ESM, dts, sourcemaps)+- [package.json](package.json): scripts and the `exports` map++## Links++- Homepage: https://three.ws+- Changelog: https://three.ws/changelog+- Full-featured sibling: [`@three-ws/sdk`](../README.md)+- Repo: https://github.com/nirholas/three.wsdiff --git a/server/discover-ssr.mjs b/server/discover-ssr.mjsnew file mode 100644index 000000000..c8329de03--- /dev/null+++ b/server/discover-ssr.mjs@@ -0,0 +1,158 @@+// Server-rendered directory content for /discover.+// ---------------------------------------------------------------------------+// The /discover shell is a client-rendered grid: crawlers and no-JS visitors+// used to receive an empty <div data-role="grid"> and nothing else. This+// module injects a real, indexable listing of the newest agents into that+// container at request time, using the exact same data source the client+// fetches (GET /api/explore, self-requested in-process so the endpoint's own+// caching, rate limiting, and query logic stay authoritative).+//+// The client (public/discover/discover.js) starts every load with+// `els.grid.innerHTML = ''` (resetAndLoad), so the injected markup is replaced+// wholesale on hydration: no duplication, no divergence. This mirrors the+// static-fallback-inside-the-container pattern used by docs/index.html.+//+// Behaviour:+// - Success: injected HTML cached in-process for CACHE_TTL_MS (10 min).+// - Any failure (API error, timeout, marker missing): returns null and+// caches the failure for FAIL_TTL_MS (60 s); the caller serves the plain+// static shell, so /discover never breaks because of this feature.++import { readFile } from 'node:fs/promises';++const CACHE_TTL_MS = 10 * 60 * 1000;+const FAIL_TTL_MS = 60 * 1000;+const FETCH_TIMEOUT_MS = 4000;+// Mirrors the client's first page (3D-first showcase) but capped so the+// document stays lean while still giving crawlers a real directory sample.+const ITEM_LIMIT = 24;++const GRID_MARKER = '<div class="explore-grid" data-role="grid"></div>';+const STATS_MARKER = '<p class="explore-stats" data-role="stats" hidden></p>';++let cache = { html: null, expires: 0 };+let inFlight = null;++function escapeHtml(s) {+ return String(s ?? '')+ .replace(/&/g, '&')+ .replace(/</g, '<')+ .replace(/>/g, '>')+ .replace(/"/g, '"');+}+const escapeAttr = (s) => escapeHtml(s).replace(/'/g, ''');++/** Canonical on-site detail URL for an /api/explore item, or null. */+function detailUrl(item) {+ if (item.kind === 'avatar' && item.avatarId != null) {+ return `/avatars/${encodeURIComponent(item.avatarId)}`;+ }+ if (item.kind === 'solana') {+ if (item.asset) return `/discover/a/sol/${encodeURIComponent(item.asset)}`;+ // Own three.ws Solana agents without a Core asset still have a profile page.+ if (item.source === 'three.ws' && item.agentId != null) return `/agent/${encodeURIComponent(item.agentId)}`;+ return null;+ }+ if (item.chainId != null && item.agentId != null) {+ return `/discover/a/${encodeURIComponent(item.chainId)}/${encodeURIComponent(item.agentId)}`;+ }+ return null;+}++function itemBadge(item) {+ if (item.kind === 'avatar') return 'Public avatar';+ if (item.kind === 'solana') return 'Solana';+ return item.chainName || 'On-chain';+}++/** One lean, semantic card. Same class vocabulary as the hydrated grid so the+ * pre-hydration paint reads as the same page; no model-viewer (heavy) and+ * lazy images keep the document small. */+function renderItem(item) {+ const url = detailUrl(item);+ if (!url) return '';+ const name = item.name || 'Agent';+ const nameHtml = url+ ? `<a class="explore-card-name-link" href="${escapeAttr(url)}">${escapeHtml(name)}</a>`+ : escapeHtml(name);+ const desc = (item.description || '').slice(0, 200);+ const thumb = item.image+ ? `<a class="explore-card-thumb" href="${escapeAttr(url)}"><img src="${escapeAttr(item.image)}" alt="${escapeAttr(name)}" loading="lazy" /></a>`+ : '';+ return `<article class="explore-card${item.has3d ? ' explore-card--3d' : ''}">+ ${thumb}+ <div class="explore-card-body">+ <div class="explore-card-head"><h3 class="explore-card-name">${nameHtml}</h3></div>+ <div class="explore-card-badges"><span class="explore-badge">${escapeHtml(itemBadge(item))}</span>${item.has3d ? '<span class="explore-badge explore-badge--3d">3D</span>' : ''}${item.x402Support ? '<span class="explore-badge explore-badge--x402">x402</span>' : ''}</div>+ ${desc ? `<p class="explore-card-desc">${escapeHtml(desc)}</p>` : ''}+ <div class="explore-card-foot"><a class="explore-card-link" href="${escapeAttr(url)}">Details</a></div>+ </div>+</article>`;+}++function renderStatsText(totals) {+ const fmt = (n) => Number(n || 0).toLocaleString('en-US');+ const parts = [`${fmt(totals.all)} agents`];+ if (totals.threeD) parts.push(`${fmt(totals.threeD)} with 3D avatars`);+ if (totals.onchain) parts.push(`${fmt(totals.onchain)} on EVM chains`);+ if (totals.solana) parts.push(`${fmt(totals.solana)} on Solana`);+ return parts.join(' · ');+}++async function build(shellPath, apiBase) {+ const [shell, res] = await Promise.all([+ readFile(shellPath, 'utf8'),+ fetch(`${apiBase}/api/explore?only3d=1&limit=${ITEM_LIMIT}&quality=high`, {+ signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),+ headers: { accept: 'application/json' },+ }),+ ]);+ if (!shell.includes(GRID_MARKER)) return null; // shell changed shape — serve it untouched+ if (!res.ok) throw new Error(`explore API HTTP ${res.status}`);+ const data = await res.json();+ const items = (data.items || []).slice(0, ITEM_LIMIT);+ if (items.length === 0) return null; // nothing real to inject — plain shell++ const cards = items.map(renderItem).filter(Boolean).join('\n');+ if (!cards) return null;++ let html = shell.replace(+ GRID_MARKER,+ `<div class="explore-grid" data-role="grid">${cards}</div>`,+ );+ if (data.totals && html.includes(STATS_MARKER)) {+ html = html.replace(+ STATS_MARKER,+ `<p class="explore-stats" data-role="stats">${escapeHtml(renderStatsText(data.totals))}</p>`,+ );+ }+ return html;+}++/**+ * Injected /discover HTML, or null when the plain static shell should be+ * served instead (data unavailable, marker missing, previous recent failure).+ * Never throws.+ *+ * @param {string} shellPath absolute path to dist/discover/index.html+ * @param {string} apiBase origin the server itself listens on, e.g. http://127.0.0.1:8080+ */+export async function renderDiscoverHtml(shellPath, apiBase) {+ const now = Date.now();+ if (now < cache.expires) return cache.html;+ if (inFlight) return inFlight;+ inFlight = (async () => {+ try {+ const html = await build(shellPath, apiBase);+ cache = { html, expires: Date.now() + (html ? CACHE_TTL_MS : FAIL_TTL_MS) };+ return html;+ } catch (err) {+ console.error('[discover-ssr] falling back to plain shell:', err?.message || err);+ cache = { html: null, expires: Date.now() + FAIL_TTL_MS };+ return null;+ } finally {+ inFlight = null;+ }+ })();+ return inFlight;+}diff --git a/src/glb-canonicalize.js b/src/glb-canonicalize.jsindex 6ba4ac765..fc3c05bad 100644--- a/src/glb-canonicalize.js+++ b/src/glb-canonicalize.js@@ -15,6 +15,8 @@// • MakeHuman: `upperarm.L`, `shin.L`, `clavicle.L` (shared with Unreal/Blender stems)// • Simple rigs: `shoulderL`, `elbowL`, `wristL`, `hipL`, `kneeL`, `ankleL`, `chest`// • SMPL / SMPL-X: `left_hip`, `left_knee`, `left_ankle`, `left_elbow`, `left_wrist` (side-word joints)+// • Roblox R15/R6: `LowerTorso`, `UpperTorso`, `Torso`, `LeftUpperArm`, `Left Arm`+// • Second Life: `mPelvis`, `mTorso`, `mChest`, `mCollarLeft`, `mShoulderLeft`, `mKneeRight`// • snake_case: `left_arm`, `Left_Arm`// • kebab-case: `left-arm`// • lowercase: `leftarm`, `lefthand`@@ -129,6 +131,16 @@ const EXTRA_ALIASES = (() => {['lowerNeck', 'Neck'], ['upperNeck', 'Neck'], ['neckLower', 'Neck'], ['neckUpper', 'Neck'],// Reallusion CC3/CC4 splits the neck into twist joints; either drives the head chain.['neckTwist01', 'Neck'], ['neckTwist02', 'Neck'],+ // Roblox R15 (`LowerTorso`/`UpperTorso`) and R6 (`Torso`), plus the generic+ // single-torso spellings simple rigs use. The pelvis IS the lower torso in+ // R15, and the chest maps to Spine1 like VRM's `chest`.+ ['torso', 'Spine'], ['waist', 'Spine'],+ ['upperTorso', 'Spine1'], ['torsoUpper', 'Spine1'],+ ['lowerTorso', 'Hips'], ['torsoLower', 'Hips'],+ ['ribcage', 'Spine1'], ['ribs', 'Spine1'],+ // Second Life / OpenSim centre chain (`m`-prefixed body bones).+ ['mPelvis', 'Hips'], ['mTorso', 'Spine'], ['mChest', 'Spine1'],+ ['mNeck', 'Neck'], ['mHead', 'Head'],]) put(v, c);// Side-paired limb bones, given as the LEFT spelling + its canonical; the@@ -167,6 +179,14 @@ const EXTRA_ALIASES = (() => {['leftWrist', 'LeftHand'],['leftCollar', 'LeftShoulder'], ['leftClavicle', 'LeftShoulder'],['leftToe', 'LeftToeBase'],+ // Second Life / OpenSim limb chain: `m`-prefixed with a trailing side word+ // (`mCollarLeft`, `mShoulderLeft`, `mKneeLeft`). `mShoulder` is the upper+ // arm (the clavicle is `mCollar`), and the ankle is the articulating foot+ // joint; `mFoot` (the ball, between ankle and toe) drives the toe bone.+ ['mCollarLeft', 'LeftShoulder'], ['mShoulderLeft', 'LeftArm'],+ ['mElbowLeft', 'LeftForeArm'], ['mWristLeft', 'LeftHand'],+ ['mHipLeft', 'LeftUpLeg'], ['mKneeLeft', 'LeftLeg'],+ ['mAnkleLeft', 'LeftFoot'], ['mFootLeft', 'LeftToeBase'], ['mToeLeft', 'LeftToeBase'],];for (const [lv, lc] of SIDED) {put(lv, lc);@@ -174,6 +194,7 @@ const EXTRA_ALIASES = (() => {let rv;if (/^left/.test(lv)) rv = lv.replace(/^left/, 'right');else if (/^l[A-Z]/.test(lv)) rv = 'r' + lv.slice(1);+ else if (/Left$/.test(lv)) rv = lv.replace(/Left$/, 'Right');else if (/L$/.test(lv)) rv = lv.replace(/L$/, 'R');else rv = lv;put(rv, rc);diff --git a/src/home-bento.js b/src/home-bento.jsnew file mode 100644index 000000000..a00e71f9a--- /dev/null+++ b/src/home-bento.js@@ -0,0 +1,764 @@+// ── Interactive Bento Features ─────────────────────────────────────+(function initBentoInteractives() {++ // ── 1. Avatar Studio: capture a real photo, hand it to the real flow ──+ // This is a teaser. It does NOT fabricate a build — it captures the+ // visitor's photo, stashes it for the real selfie pipeline, and sends+ // them to /create-selfie where the actual reconstruction runs. The photo+ // is downscaled before storage so it fits comfortably in sessionStorage.+ (function() {+ var HANDOFF_KEY = 'threews:selfie-handoff';+ var MAX_DIM = 1024;++ var drop = document.getElementById('studio-drop');+ var fileInput = document.getElementById('studio-file');+ var webcamBtn = document.getElementById('studio-webcam-btn');+ var zone = document.getElementById('studio-zone');+ var ready = document.getElementById('studio-ready');+ var previewImg = document.getElementById('studio-preview-img');+ var resetBtn = document.getElementById('studio-reset');+ var errorEl = document.getElementById('studio-error');+ if (!drop) return;++ function showError(msg) {+ if (!errorEl) return;+ errorEl.textContent = msg;+ errorEl.classList.add('show');+ errorEl.hidden = false;+ }+ function clearError() {+ if (!errorEl) return;+ errorEl.classList.remove('show');+ errorEl.hidden = true;+ }++ // Load → downscale → JPEG data URL. Keeps storage small and strips EXIF.+ function toDataUrl(file) {+ return new Promise(function(resolve, reject) {+ if (!file || !/^image\//.test(file.type)) { reject(new Error('not an image')); return; }+ var url = URL.createObjectURL(file);+ var img = new Image();+ img.onload = function() {+ var scale = Math.min(1, MAX_DIM / Math.max(img.naturalWidth, img.naturalHeight));+ var w = Math.max(1, Math.round(img.naturalWidth * scale));+ var h = Math.max(1, Math.round(img.naturalHeight * scale));+ var canvas = document.createElement('canvas');+ canvas.width = w; canvas.height = h;+ canvas.getContext('2d').drawImage(img, 0, 0, w, h);+ URL.revokeObjectURL(url);+ try { resolve(canvas.toDataURL('image/jpeg', 0.9)); }+ catch (e) { reject(e); }+ };+ img.onerror = function() { URL.revokeObjectURL(url); reject(new Error('decode failed')); };+ img.src = url;+ });+ }++ function present(dataUrl, name) {+ try {+ sessionStorage.setItem(HANDOFF_KEY, JSON.stringify({ dataUrl: dataUrl, name: name || 'selfie.jpg' }));+ } catch (e) {+ // Storage blocked or quota exceeded — the visitor can still start+ // fresh in Avatar Studio, so degrade gracefully instead of lying.+ }+ previewImg.src = dataUrl;+ zone.style.display = 'none';+ ready.classList.add('show');+ }++ function accept(file) {+ clearError();+ toDataUrl(file).then(function(dataUrl) {+ present(dataUrl, file.name);+ }).catch(function() {+ showError('Could not read that image. Try a JPG or PNG.');+ });+ }++ drop.addEventListener('click', function() { fileInput.click(); });+ fileInput.addEventListener('change', function() {+ if (fileInput.files && fileInput.files[0]) accept(fileInput.files[0]);+ });+ drop.addEventListener('dragover', function(e) { e.preventDefault(); drop.classList.add('drag-over'); });+ drop.addEventListener('dragleave', function() { drop.classList.remove('drag-over'); });+ drop.addEventListener('drop', function(e) {+ e.preventDefault(); drop.classList.remove('drag-over');+ if (e.dataTransfer.files && e.dataTransfer.files[0]) accept(e.dataTransfer.files[0]);+ });++ resetBtn && resetBtn.addEventListener('click', function() {+ try { sessionStorage.removeItem(HANDOFF_KEY); } catch (e) {}+ ready.classList.remove('show');+ zone.style.display = '';+ fileInput.value = '';+ clearError();+ });++ webcamBtn.addEventListener('click', function() {+ if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {+ showError('Webcam not available in this browser. Upload a photo instead.');+ return;+ }+ clearError();+ webcamBtn.disabled = true;+ navigator.mediaDevices.getUserMedia({ video: { facingMode: 'user', width: 640, height: 640 } })+ .then(function(stream) {+ var video = document.createElement('video');+ video.srcObject = stream;+ video.muted = true;+ video.playsInline = true;+ video.play();+ var done = false;+ function snap() {+ if (done) return;+ done = true;+ var size = Math.min(video.videoWidth || 640, video.videoHeight || 640) || 640;+ var canvas = document.createElement('canvas');+ canvas.width = size; canvas.height = size;+ var sx = ((video.videoWidth || size) - size) / 2;+ var sy = ((video.videoHeight || size) - size) / 2;+ canvas.getContext('2d').drawImage(video, sx, sy, size, size, 0, 0, size, size);+ stream.getTracks().forEach(function(t) { t.stop(); });+ webcamBtn.disabled = false;+ present(canvas.toDataURL('image/jpeg', 0.9), 'webcam.jpg');+ }+ // Snap once the first frame is actually available.+ video.addEventListener('loadeddata', function() { setTimeout(snap, 250); }, { once: true });+ }).catch(function() {+ webcamBtn.disabled = false;+ showError('Camera access was blocked. Upload a photo instead.');+ });+ });+ })();++ // ── 2. Voice + Mocap: microphone waveform ───────────────────────+ (function() {+ var btn = document.getElementById('mocap-mic-btn');+ var canvas = document.getElementById('mocap-waveform');+ var status = document.getElementById('mocap-status');+ if (!btn || !canvas) return;+ var ctx = canvas.getContext('2d');+ var audioCtx = null, analyser = null, stream = null, animId = null;+ var active = false;++ function draw() {+ if (!active) return;+ animId = requestAnimationFrame(draw);+ var w = canvas.width, h = canvas.height;+ var data = new Uint8Array(analyser.frequencyBinCount);+ analyser.getByteTimeDomainData(data);+ ctx.clearRect(0, 0, w, h);+ ctx.strokeStyle = 'rgba(168,168,168,0.6)';+ ctx.lineWidth = 1.5;+ ctx.beginPath();+ var sliceW = w / data.length;+ for (var i = 0; i < data.length; i++) {+ var v = data[i] / 128.0;+ var y = v * h / 2;+ if (i === 0) ctx.moveTo(0, y);+ else ctx.lineTo(i * sliceW, y);+ }+ ctx.stroke();+ }++ function resizeCanvas() {+ canvas.width = canvas.clientWidth * (window.devicePixelRatio || 1);+ canvas.height = canvas.clientHeight * (window.devicePixelRatio || 1);+ }++ btn.addEventListener('click', function() {+ if (active) {+ active = false;+ cancelAnimationFrame(animId);+ if (stream) stream.getTracks().forEach(function(t) { t.stop(); });+ if (audioCtx) audioCtx.close();+ stream = null; audioCtx = null; analyser = null;+ btn.textContent = 'Microphone';+ status.textContent = 'click to capture';+ status.classList.remove('live');+ ctx.clearRect(0, 0, canvas.width, canvas.height);+ return;+ }+ navigator.mediaDevices.getUserMedia({ audio: true }).then(function(s) {+ stream = s;+ audioCtx = new (window.AudioContext || window.webkitAudioContext)();+ analyser = audioCtx.createAnalyser();+ analyser.fftSize = 256;+ audioCtx.createMediaStreamSource(stream).connect(analyser);+ active = true;+ resizeCanvas();+ btn.textContent = 'Stop';+ status.textContent = 'live — speak now';+ status.classList.add('live');+ draw();+ }).catch(function() {+ status.textContent = 'mic access denied';+ });+ });++ new ResizeObserver(function() { if (active) resizeCanvas(); }).observe(canvas);+ })();++ // ── 3. Walk & Multiplayer: mini map ─────────────────────────────+ (function() {+ var canvas = document.getElementById('walk-minimap');+ if (!canvas) return;+ var ctx = canvas.getContext('2d');+ var dpr = window.devicePixelRatio || 1;+ var W, H;++ function resize() {+ W = canvas.clientWidth; H = canvas.clientHeight;+ canvas.width = W * dpr; canvas.height = H * dpr;+ ctx.scale(dpr, dpr);+ }+ resize();+ new ResizeObserver(resize).observe(canvas);++ var player = { x: 0.5, y: 0.5, color: '#fff' };+ var bots = [+ { x: 0.2, y: 0.3, vx: 0.0008, vy: 0.0006, color: '#4ade80' },+ { x: 0.8, y: 0.6, vx: -0.0006, vy: 0.0009, color: '#60a5fa' },+ { x: 0.5, y: 0.8, vx: 0.0007, vy: -0.0005, color: '#fbbf24' },+ ];++ var keys = {};+ canvas.addEventListener('keydown', function(e) { keys[e.key.toLowerCase()] = true; e.preventDefault(); });+ canvas.addEventListener('keyup', function(e) { keys[e.key.toLowerCase()] = false; });+ canvas.addEventListener('click', function(e) {+ var r = canvas.getBoundingClientRect();+ player.x = (e.clientX - r.left) / r.width;+ player.y = (e.clientY - r.top) / r.height;+ canvas.focus();+ });++ function tick() {+ requestAnimationFrame(tick);+ var speed = 0.006;+ if (keys['w'] || keys['arrowup']) player.y -= speed;+ if (keys['s'] || keys['arrowdown']) player.y += speed;+ if (keys['a'] || keys['arrowleft']) player.x -= speed;+ if (keys['d'] || keys['arrowright']) player.x += speed;+ player.x = Math.max(0.02, Math.min(0.98, player.x));+ player.y = Math.max(0.02, Math.min(0.98, player.y));++ bots.forEach(function(b) {+ b.x += b.vx; b.y += b.vy;+ if (b.x < 0.05 || b.x > 0.95) b.vx *= -1;+ if (b.y < 0.05 || b.y > 0.95) b.vy *= -1;+ b.vx += (Math.random() - 0.5) * 0.0002;+ b.vy += (Math.random() - 0.5) * 0.0002;+ });++ ctx.clearRect(0, 0, W, H);+ ctx.fillStyle = '#0d0d0d';+ ctx.fillRect(0, 0, W, H);+ // Grid+ ctx.strokeStyle = 'rgba(255,255,255,0.04)';+ ctx.lineWidth = 0.5;+ for (var gx = 0; gx < W; gx += 30) { ctx.beginPath(); ctx.moveTo(gx, 0); ctx.lineTo(gx, H); ctx.stroke(); }+ for (var gy = 0; gy < H; gy += 30) { ctx.beginPath(); ctx.moveTo(0, gy); ctx.lineTo(W, gy); ctx.stroke(); }++ // Bots+ bots.forEach(function(b) {+ ctx.beginPath();+ ctx.arc(b.x * W, b.y * H, 4, 0, Math.PI * 2);+ ctx.fillStyle = b.color;+ ctx.fill();+ ctx.fillStyle = 'rgba(255,255,255,0.2)';+ ctx.font = '7px monospace';+ ctx.fillText('visitor', b.x * W + 7, b.y * H + 3);+ });++ // Player+ ctx.beginPath();+ ctx.arc(player.x * W, player.y * H, 5, 0, Math.PI * 2);+ ctx.fillStyle = player.color;+ ctx.fill();+ ctx.shadowColor = '#fff'; ctx.shadowBlur = 8;+ ctx.fill();+ ctx.shadowBlur = 0;+ ctx.fillStyle = 'rgba(255,255,255,0.5)';+ ctx.font = '8px monospace';+ ctx.fillText('you', player.x * W + 8, player.y * H + 3);+ }+ tick();+ })();++ // ── 4. x402 Payments: interactive flow ──────────────────────────+ (function() {+ var payBtn = document.getElementById('x402-pay-btn');+ var code = document.getElementById('x402-code');+ var spinner = document.getElementById('x402-spinner');+ var amount = document.getElementById('x402-amount');+ if (!payBtn) return;++ payBtn.addEventListener('click', function() {+ payBtn.style.display = 'none';+ spinner.style.display = 'block';+ code.textContent = 'Processing USDC payment...';+ code.className = 'x402-code';++ setTimeout(function() {+ spinner.style.display = 'none';+ code.textContent = 'HTTP 200 — OK';+ code.className = 'x402-code ok';+ amount.classList.add('show');++ setTimeout(function() {+ code.textContent = 'HTTP 402 — Payment Required';+ code.className = 'x402-code err';+ amount.classList.remove('show');+ payBtn.style.display = '';+ }, 3000);+ }, 1200);+ });+ })();++ // ── 5. On-chain Identity: real Solana deploy lives in the module+ // script near the end of <body> (needs ES-module imports). ─────++ // ── 6. Skills: live tool-call demo ──────────────────────────────+ // Every pill fires a REAL call: Jupiter's public quote API, our Solana+ // RPC proxy, the live pump.fun launch feed (SSE), and an A2A agent ask+ // streamed through /api/chat. No canned responses.+ (function() {+ var tools = document.getElementById('skill-tools');+ var result = document.getElementById('skill-result');+ if (!tools || !result) return;++ var USDC = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';+ var WSOL = 'So11111111111111111111111111111111111111112';+ var seq = 0; // monotonic token — only the latest click renders+ var pending = null; // open EventSource to tear down on tool switch++ function colorJson(obj, indent) {+ indent = indent || 0;+ var pad = ' '.repeat(indent);+ if (obj === null || obj === undefined) return '<span class="json-dim">null</span>';+ if (typeof obj === 'string') return '<span class="json-str">"' + obj + '"</span>';+ if (typeof obj === 'number') return '<span class="json-num">' + obj + '</span>';+ if (typeof obj === 'boolean') return '<span class="json-num">' + obj + '</span>';+ if (Array.isArray(obj)) {+ if (obj.length === 0) return '[]';+ var items = obj.map(function(v) { return pad + ' ' + colorJson(v, indent + 1); });+ return '[\n' + items.join(',\n') + '\n' + pad + ']';+ }+ var keys = Object.keys(obj).filter(function(k) { return obj[k] !== null && obj[k] !== undefined; });+ if (keys.length === 0) return '{}';+ var lines = keys.map(function(k) {+ return pad + ' <span class="json-key">"' + k + '"</span>: ' + colorJson(obj[k], indent + 1);+ });+ return '{\n' + lines.join(',\n') + '\n' + pad + '}';+ }++ function setLoading(label) {+ result.classList.remove('err', 'fresh');+ result.classList.add('loading');+ result.innerHTML = '<span class="skill-loading">▸ calling <span class="json-key">' + label + '</span><span class="skill-dots"></span></span>';+ }+ function setError(label, msg) {+ result.classList.remove('loading', 'fresh');+ result.classList.add('err');+ result.innerHTML = '<span class="skill-err">✕ ' + label + ' — ' + msg + '</span>';+ }+ function render(obj, streamingHtml) {+ result.classList.remove('loading', 'err');+ result.innerHTML = streamingHtml || colorJson(obj, 0);+ if (!streamingHtml) {+ result.classList.add('fresh');+ setTimeout(function() { result.classList.remove('fresh'); }, 600);+ }+ }+ function teardown() {+ if (pending) { try { pending.close(); } catch (_) {} pending = null; }+ }++ var runners = {+ jupiter: function(my) {+ setLoading('jupiter_swap');+ return fetch('https://lite-api.jup.ag/swap/v1/quote?inputMint=' + USDC + '&outputMint=' + WSOL + '&amount=10000000&slippageBps=50')+ .then(function(r) { if (!r.ok) throw new Error('HTTP ' + r.status); return r.json(); })+ .then(function(q) {+ if (my !== seq) return;+ var sol = Number(q.outAmount) / 1e9;+ var route = (q.routePlan || []).map(function(p) { return p.swapInfo && p.swapInfo.label; }).filter(Boolean);+ render({+ tool: 'jupiter_swap',+ input: { from: 'USDC', to: 'SOL', amount: '10.00' },+ output: {+ received: sol.toFixed(4) + ' SOL',+ rate: (sol > 0 ? (10 / sol) : 0).toFixed(2) + ' USDC/SOL',+ price_impact: (Number(q.priceImpactPct || 0) * 100).toFixed(3) + '%',+ slippage: ((q.slippageBps || 50) / 100).toFixed(2) + '%',+ route: route.length ? route.join(' → ') : 'direct'+ }+ });+ })+ .catch(function(e) { if (my === seq) setError('jupiter_swap', e.message); });+ },++ rpc: function(my) {+ setLoading('solana_rpc');+ return fetch('/api/solana-rpc', {+ method: 'POST',+ headers: { 'Content-Type': 'application/json' },+ body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'getEpochInfo' })+ })+ .then(function(r) { if (!r.ok) throw new Error('HTTP ' + r.status); return r.json(); })+ .then(function(j) {+ if (my !== seq) return;+ var v = j.result || {};+ render({+ tool: 'solana_rpc',+ method: 'getEpochInfo',+ network: 'mainnet-beta',+ result: {+ epoch: v.epoch,+ absolute_slot: v.absoluteSlot,+ block_height: v.blockHeight,+ slot_index: v.slotIndex + ' / ' + v.slotsInEpoch,+ tx_count: v.transactionCount+ }+ });+ })+ .catch(function(e) { if (my === seq) setError('solana_rpc', e.message); });+ },++ pump: function(my) {+ setLoading('pump_live_feed');+ return new Promise(function(resolve) {+ var es, settled = false, to;+ function finish(fn) {+ if (settled) return;+ settled = true;+ clearTimeout(to);+ if (es) { try { es.close(); } catch (_) {} }+ if (pending === es) pending = null;+ fn();+ resolve();+ }+ try { es = new EventSource('/api/pump/live-stream?kind=mint'); }+ catch (e) { if (my === seq) setError('pump_live_feed', 'feed unavailable'); return resolve(); }+ pending = es;+ to = setTimeout(function() {+ finish(function() { if (my === seq) setError('pump_live_feed', 'no launches in the last 20s — try again'); });+ }, 20000);+ es.addEventListener('mint', function(ev) {+ var d;+ try { d = JSON.parse(ev.data); } catch (_) { return; }+ finish(function() {+ if (my !== seq) return;+ render({+ tool: 'pump_live_feed',+ event: 'new_mint',+ source: 'pump.fun · mainnet',+ data: {+ name: d.name || '(unnamed)',+ symbol: d.symbol ? ('$' + String(d.symbol).replace(/^\$/, '')) : null,+ mint: d.mint ? (d.mint.slice(0, 4) + '…' + d.mint.slice(-4)) : null,+ market_cap_usd: (d.market_cap_usd != null) ? '$' + Math.round(d.market_cap_usd).toLocaleString() : null,+ initial_buy_sol: (d.initial_buy_sol != null) ? Number(d.initial_buy_sol).toFixed(3) + ' SOL' : null+ }+ });+ });+ });+ es.onerror = function() {+ finish(function() { if (my === seq) setError('pump_live_feed', 'feed disconnected'); });+ };+ });+ },++ a2a: function(my) {+ setLoading('a2a · agent.ask');+ var question = 'In one sentence, what can I build on three.ws?';+ var base = { protocol: 'a2a', target: 'claude.agent', action: 'ask', input: question };+ function paint(text, streaming) {+ if (my !== seq) return;+ result.classList.remove('loading', 'err');+ var json = colorJson(Object.assign({}, base, { response: text || '' }), 0);+ result.innerHTML = streaming ? json.replace(/<\/span>(\n\})$/, '<span class="skill-cursor">▍</span></span>$1') : json;+ }+ return fetch('/api/chat', {+ method: 'POST',+ headers: { 'Content-Type': 'application/json' },+ body: JSON.stringify({+ message: question,+ system_prompt: 'You are the three.ws platform agent. Answer in ONE concise, confident sentence, no preamble.',+ history: [],+ context: {}+ })+ })+ .then(function(r) { if (!r.ok || !r.body) throw new Error('HTTP ' + r.status); return r.body.getReader(); })+ .then(function(reader) {+ var dec = new TextDecoder(), buf = '', text = '';+ function step(res) {+ if (my !== seq) { try { reader.cancel(); } catch (_) {} return; }+ if (res.done) {+ if (my === seq) { paint(text || '(no response)', false); result.classList.add('fresh'); setTimeout(function() { result.classList.remove('fresh'); }, 600); }+ return;+ }+ buf += dec.decode(res.value, { stream: true });+ var lines = buf.split('\n');+ buf = lines.pop();+ lines.forEach(function(line) {+ if (line.indexOf('data: ') !== 0) return;+ var data = line.slice(6).trim();+ if (!data || data === '[DONE]') return;+ try {+ var parsed = JSON.parse(data);+ if (parsed.type === 'chunk' && parsed.text) text += parsed.text;+ } catch (_) {}+ });+ paint(text, true);+ return reader.read().then(step);+ }+ return reader.read().then(step);+ })+ .catch(function(e) { if (my === seq) setError('a2a · agent.ask', e.message); });+ }+ };++ function run(name) {+ teardown();+ var my = ++seq;+ (runners[name] || runners.jupiter)(my);+ }++ tools.addEventListener('click', function(e) {+ var btn = e.target.closest('.bento-pill-btn');+ if (!btn) return;+ tools.querySelectorAll('.bento-pill-btn').forEach(function(b) { b.classList.remove('active'); });+ btn.classList.add('active');+ run(btn.dataset.tool);+ });++ // Fire the first real call only when the card scrolls into view.+ var fired = false;+ if ('IntersectionObserver' in window) {+ var io = new IntersectionObserver(function(entries) {+ entries.forEach(function(en) {+ if (en.isIntersecting && !fired) { fired = true; run('jupiter'); io.disconnect(); }+ });+ }, { threshold: 0.3 });+ io.observe(result);+ } else {+ run('jupiter');+ }+ })();++ // ── 7. Memory: store/recall demo ────────────────────────────────+ (function() {+ var input = document.getElementById('memory-input');+ var storeBtn = document.getElementById('memory-store-btn');+ var recallBtn = document.getElementById('memory-recall-btn');+ var log = document.getElementById('memory-log');+ if (!input || !storeBtn) return;++ var memories = [];++ function addEntry(op, val) {+ var el = document.createElement('div');+ el.className = 'memory-entry';+ el.innerHTML = '<span class="mem-op">' + op + '</span><span class="mem-val">' + val + '</span>';+ log.appendChild(el);+ log.scrollTop = log.scrollHeight;+ }++ storeBtn.addEventListener('click', function() {+ var val = input.value.trim();+ if (!val) return;+ memories.push(val);+ addEntry('STORE →', val);+ input.value = '';+ });++ recallBtn.addEventListener('click', function() {+ if (memories.length === 0) {+ addEntry('RECALL →', '(empty — store something first)');+ return;+ }+ memories.forEach(function(m, i) {+ setTimeout(function() {+ addEntry('MEM[' + i + ']', m);+ }, i * 150);+ });+ });++ input.addEventListener('keydown', function(e) {+ if (e.key === 'Enter') storeBtn.click();+ });+ })();++ // ── 8. AR / WebXR: launcher demo ────────────────────────────────+ (function() {+ var btn = document.getElementById('ar-launch-btn');+ var phone = document.getElementById('ar-phone');+ var status = document.getElementById('ar-status');+ if (!btn) return;+ var active = false;++ btn.addEventListener('click', function() {+ if (active) {+ active = false;+ phone.classList.remove('active');+ status.textContent = 'tap to place agent';+ status.classList.remove('ready');+ btn.textContent = 'Launch AR';+ return;+ }+ active = true;+ phone.classList.add('active');+ status.textContent = 'scanning surface...';+ btn.textContent = 'Stop';++ setTimeout(function() {+ if (!active) return;+ status.textContent = 'agent placed in AR';+ status.classList.add('ready');+ }, 1500);+ });+ })();++ // ── 9. Marketplace: live agent browser ──────────────────────────+ (function() {+ var strip = document.getElementById('mktplace-strip');+ if (!strip) return;++ fetch('/api/marketplace', { headers: { accept: 'application/json' } })+ .then(function(r) {+ if (!r.ok) throw new Error('HTTP ' + r.status);+ return r.json();+ })+ .then(function(body) {+ // /api/marketplace answers { data: { items: [...] } }. Each item is an+ // agent listing: `id` is the agent id (what /agents/:id resolves), and+ // `thumbnail_url` is a ready-to-use absolute URL — null when the listing's+ // avatar has no stored thumbnail. Only ~1 in 6 listings carries one, so+ // the initial-letter placeholder is the common path, not an error path.+ var items = ((body && body.data && body.data.items) || []).filter(function(it) {+ return it && it.id;+ }).slice(0, 10);+ if (!items.length) return renderBrowseFallback();++ items.forEach(function(item) {+ var name = item.name || item.id.slice(0, 6);+ var a = document.createElement('a');+ a.className = 'mktplace-item';+ a.href = '/agents/' + item.id;+ a.title = name;++ var initial = document.createElement('span');+ initial.className = 'mktplace-item-initial';+ initial.textContent = (name || '?').charAt(0);+ a.appendChild(initial);++ if (item.thumbnail_url) {+ var img = document.createElement('img');+ img.src = item.thumbnail_url;+ img.alt = name;+ img.loading = 'lazy';+ // A stored thumbnail can still 404 (object pruned) — fall back to the+ // initial rather than leaving a broken-image tile.+ img.onerror = function() {+ this.remove();+ initial.style.display = 'flex';+ };+ a.appendChild(img);+ } else {+ initial.style.display = 'flex';+ }++ var lbl = document.createElement('span');+ lbl.className = 'mktplace-item-name';+ lbl.textContent = name;+ a.appendChild(lbl);+ strip.appendChild(a);+ });++ var more = document.createElement('a');+ more.className = 'mktplace-more';+ more.href = '/discover';+ more.textContent = '→';+ more.title = 'Browse all agents';+ strip.appendChild(more);+ }).catch(renderBrowseFallback);++ function renderBrowseFallback() {+ strip.innerHTML = '';+ var a = document.createElement('a');+ a.className = 'mktplace-more';+ a.href = '/discover';+ a.style.width = 'auto';+ a.style.padding = '0 16px';+ a.textContent = 'Browse marketplace →';+ strip.appendChild(a);+ }+ })();++ // ── 10. Analytics: sparkline + animated counters ─────────────────+ (function() {+ var demo = document.getElementById('analytics-demo');+ if (!demo) return;+ var convosEl = document.getElementById('an-convos');+ var revenueEl = document.getElementById('an-revenue');+ var retentionEl = document.getElementById('an-retention');+ var sparkSvg = document.getElementById('analytics-spark');++ var dataPoints = [5, 12, 8, 22, 18, 30, 25, 40, 35, 48, 42, 55, 50, 62, 58, 70, 65, 78, 72, 85];+ var maxVal = Math.max.apply(null, dataPoints);+ var svgW = 200, svgH = 40, pad = 2;++ function buildPath() {+ var pts = dataPoints.map(function(v, i) {+ return {+ x: pad + (i / (dataPoints.length - 1)) * (svgW - pad * 2),+ y: svgH - pad - (v / maxVal) * (svgH - pad * 2)+ };+ });+ var d = pts.map(function(p, i) { return (i === 0 ? 'M' : 'L') + p.x.toFixed(1) + ' ' + p.y.toFixed(1); }).join(' ');+ var fillD = d + ' L' + pts[pts.length - 1].x.toFixed(1) + ' ' + svgH + ' L' + pts[0].x.toFixed(1) + ' ' + svgH + ' Z';+ var last = pts[pts.length - 1];++ sparkSvg.innerHTML = sparkSvg.querySelector('defs').outerHTML+ + '<path class="spark-fill" d="' + fillD + '"/>'+ + '<path d="' + d + '"/>'+ + '<circle class="spark-dot" cx="' + last.x.toFixed(1) + '" cy="' + last.y.toFixed(1) + '" r="2.5"/>';+ }++ // Counters reveal a fixed set of example figures (the widget is labeled+ // "example" in the markup). These are illustrative of the analytics+ // dashboard — not live platform data — so no random "live" simulation.+ var animated = false;+ var targets = { convos: 1247, revenue: 847.5, retention: 68 };+ function setCounters(convos, revenue, retention) {+ convosEl.textContent = Math.round(convos).toLocaleString();+ revenueEl.textContent = '$' + revenue.toFixed(0);+ retentionEl.textContent = Math.round(retention) + '%';+ }+ function animateCounters() {+ if (animated) return;+ animated = true;+ if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {+ setCounters(targets.convos, targets.revenue, targets.retention);+ return;+ }+ var start = performance.now();+ var dur = 1200;+ (function tick(now) {+ var p = Math.min((now - start) / dur, 1);+ var e = 1 - Math.pow(1 - p, 3);+ setCounters(targets.convos * e, targets.revenue * e, targets.retention * e);+ if (p < 1) requestAnimationFrame(tick);+ })(start);+ }++ buildPath();++ var io = new IntersectionObserver(function(entries) {+ if (entries[0].isIntersecting) { animateCounters(); io.disconnect(); }+ }, { threshold: 0.3 });+ io.observe(demo);+ })();++})();diff --git a/src/home-live-agents.js b/src/home-live-agents.jsnew file mode 100644index 000000000..0e89b583e--- /dev/null+++ b/src/home-live-agents.js@@ -0,0 +1,1241 @@+ // ── Boot live <agent-3d> instances ─────────────────────────────+ const AVATAR_ID = 'bacff13e-b64b-4ac0-860d-44f0168ad23b';+ const AGENT_ATTRS = {+ mode: 'inline', responsive: '', background: 'transparent',+ 'name-plate': 'off', 'avatar-chat': 'off', kiosk: '', eager: '',+ };+ function devProxyGlb(url) {+ if (!url) return url;+ const isDev = location.hostname === 'localhost' || location.hostname.includes('.github.dev') || location.hostname.includes('.gitpod.io');+ if (isDev && url.includes('r2.dev')) {+ try { return '/r2-proxy' + new URL(url).pathname; } catch (_) {}+ }+ return url;+ }++ // Fetch a pool of unique community avatar GLBs from /api/explore, cached for the page lifetime.+ // pool[0]=WYG, pool[1]=vclose, pool[2..]=LIVE_SPOTS null entries+ var _avatarPoolP = null;+ // Only renderable full-body avatars belong here. The idle_*.glb clips are+ // animation-only (0 meshes) and render as an empty box — never use them as a body.+ var POOL_FALLBACKS = [+ '/avatars/default.glb',+ '/avatars/cz.glb',+ '/animations/robotexpressive.glb',+ '/animations/soldier.glb',+ '/avatars/default.glb',+ '/avatars/cz.glb',+ '/animations/robotexpressive.glb',+ '/animations/soldier.glb',+ ];+ function getAvatarPool() {+ if (!_avatarPoolP) {+ _avatarPoolP = fetch(location.origin + '/api/explore?source=all&limit=16&quality=high')+ .then(function(r) { return r.json(); })+ .then(function(d) {+ var items = (d.items || []);+ var pool = items+ .filter(function(it) { return it.glbUrl && it.avatarId !== AVATAR_ID; })+ .map(function(it) { return devProxyGlb(it.glbUrl); })+ .filter(Boolean);+ var fi = 0;+ while (pool.length < 8) {+ pool.push(location.origin + POOL_FALLBACKS[fi++ % POOL_FALLBACKS.length]);+ }+ return pool;+ })+ .catch(function() {+ return POOL_FALLBACKS.map(function(p) { return location.origin + p; });+ });+ }+ return _avatarPoolP;+ }++ function spawnAgent(glbUrl) {+ const el = document.createElement('agent-3d');+ el.classList.add('live-agent');+ el.setAttribute('body', glbUrl);+ for (const [k, v] of Object.entries(AGENT_ATTRS)) el.setAttribute(k, v);+ return el;+ }+ async function fetchAvatarGlb(id) {+ const r = await fetch(`${location.origin}/api/avatars/${id}`);+ if (!r.ok) throw new Error('HTTP ' + r.status);+ const d = await r.json();+ const glb = devProxyGlb(d.avatar?.model_url || d.avatar?.url);+ if (!glb) throw new Error('no model url');+ return glb;+ }+ // The curated hero avatar can disappear (deleted, or a fresh deploy whose+ // DB row hasn't been seeded yet) — fall back to a real featured avatar so+ // the stage is never just an error card.+ async function resolveFeaturedGlb() {+ // Preferred: a curated featured avatar via the detail endpoint (richest+ // metadata). Wrapped so a flaky/unavailable detail route never strands+ // the hero — we drop to the explore pool below instead.+ try {+ const r = await fetch(`${location.origin}/api/avatars/featured?limit=12`);+ if (r.ok) {+ const d = await r.json();+ const list = Array.isArray(d.avatars) ? d.avatars : [];+ for (const a of list) {+ try { return await fetchAvatarGlb(a.id); } catch (_) { /* try next */ }+ }+ }+ } catch (_) { /* fall through to the explore pool */ }+ // Fallback: the explore feed returns ready-to-render GLB URLs directly+ // (and getAvatarPool degrades to bundled /avatars/*.glb), so the stage+ // renders a real avatar even if the per-avatar detail endpoint is down.+ const pool = await getAvatarPool();+ const glb = pool.find(Boolean);+ if (!glb) throw new Error('no renderable avatar found');+ return glb;+ }+ function showHeroFallback(heroInner) {+ heroInner.innerHTML = '<div class="hero-stage-fallback" role="status">'+ + '<p>The live preview couldn’t load right now.</p>'+ + '<button type="button" class="btn btn--sm" id="hero-retry">Retry</button></div>';+ heroInner.querySelector('#hero-retry')?.addEventListener('click', () => {+ heroInner.innerHTML = '';+ bootHeroAvatar();+ });+ }+ // The <agent-3d> loader is a separate CDN script — if it fails (network+ // blip, missing local dist-lib build in dev), the element never upgrades+ // and the stage would sit silently black. Surface the designed fallback+ // instead of nothing.+ function agentElementDefined(timeoutMs) {+ return Promise.race([+ customElements.whenDefined('agent-3d').then(() => true),+ new Promise((res) => setTimeout(() => res(false), timeoutMs)),+ ]);+ }+ // The stage's first-impression loading state: a breathing agent silhouette+ // instead of a silent void while the GLB + <agent-3d> loader resolve. Shown at+ // the very start of the boot, removed the instant the avatar is ready.+ function heroLoadingMarkup() {+ return '<div class="hero-stage-loading" role="status" aria-label="Loading the live agent preview">'+ + '<svg class="hero-stage-loading-figure" viewBox="0 0 64 72" fill="currentColor" aria-hidden="true">'+ + '<circle cx="32" cy="21" r="14"/><path d="M6 72c0-14.4 11.6-26 26-26s26 11.6 26 26z"/></svg>'+ + '<span class="hero-stage-loading-copy">Summoning your agent<span class="dot">.</span><span class="dot">.</span><span class="dot">.</span></span>'+ + '</div>';+ }+ function hideHeroLoading(heroInner) {+ const el = heroInner?.querySelector('.hero-stage-loading');+ if (!el) return;+ el.classList.add('is-hiding');+ setTimeout(() => el.remove(), 520);+ }+ async function bootHeroAvatar() {+ const heroInner = document.getElementById('hero-stage-inner');+ // Fill the stage immediately, before any await, so the first paint is alive.+ if (heroInner) heroInner.innerHTML = heroLoadingMarkup();+ try {+ let glb;+ try {+ glb = await fetchAvatarGlb(AVATAR_ID);+ } catch (_) {+ glb = await resolveFeaturedGlb();+ }+ if (heroInner) {+ if (!(await agentElementDefined(15000))) {+ throw new Error('agent-3d element never registered — loader script failed');+ }+ const heroEl = spawnAgent(glb);+ let ready = false;+ // Fade the hero in on agent:ready and retire the loading silhouette in+ // the same beat. Attached before the element is appended so the event+ // can never be missed (a stage-level MutationObserver raced anything+ // else that touched the stage first, e.g. seasonal.js injecting its+ // Fireworks chip, and left the avatar stuck at opacity 0).+ heroEl.addEventListener('agent:ready', () => {+ ready = true;+ heroEl.classList.add('loaded');+ hideHeroLoading(heroInner);+ }, { once: true });+ // Append alongside the loading overlay (which sits on top via z-index+ // and fades out on ready), so the stage never blinks back to empty+ // between clearing the placeholder and the model's first frame.+ heroInner.appendChild(heroEl);+ initHeroWalk(heroEl);+ initHeroChips(heroEl);+ // Safety net: if the element upgraded but never signals ready (an+ // internal GLB decode / render failure), don't leave "Summoning…" up+ // forever. Surface the retryable fallback the same as a hard failure.+ setTimeout(() => {+ if (!ready && heroInner.querySelector('.hero-stage-loading')) showHeroFallback(heroInner);+ }, 22000);+ }+ } catch (e) {+ console.warn('[home] avatar boot failed', e);+ if (heroInner) showHeroFallback(heroInner);+ }+ }+ bootHeroAvatar();++ // ── What You Get: avatar viewer + animation gallery ────────────+ (function initWygSection() {+ var viewer = document.getElementById('wyg-viewer');+ var scroll = document.getElementById('wyg-anim-scroll');+ var stopBtn = document.getElementById('wyg-anim-stop');+ var skelEl = document.getElementById('wyg-viewer-skel');+ if (!viewer || !scroll) return;++ var wygAgent = null;+ var activeChip = null;+ var loopAnims = new Set(['idle','walk','av-walk-feminine','av-walk-crouching',+ 'av-idle-breath','av-waiting','av-idle-male','av-idle-female',+ 'av-vtubing','av-chilling','av-leaning-wall','av-listening-music',+ 'av-smoking','sitidle','av-idle-anim']);++ var wygObs = new IntersectionObserver(function(entries) {+ if (!entries[0].isIntersecting) return;+ wygObs.disconnect();+ bootWyg();+ }, { rootMargin: '150px' });+ wygObs.observe(viewer);++ function bootWyg() {+ getAvatarPool()+ .then(function(pool) {+ var glb = pool[0];+ if (!glb) return;+ var el = spawnAgent(glb);+ viewer.insertBefore(el, viewer.firstChild);+ wygAgent = el;+ el.addEventListener('agent:ready', function() {+ el.classList.add('loaded');+ if (skelEl) skelEl.style.display = 'none';+ el.play?.('idle', { loop: true, fade_ms: 400 });+ var firstChip = scroll.querySelector('[data-anim="idle"]');+ if (firstChip) firstChip.dataset.active = 'true';+ activeChip = firstChip;+ }, { once: true });+ })+ .catch(function(e) { console.warn('[wyg] avatar boot failed', e); });+ }++ scroll.addEventListener('click', function(e) {+ var btn = e.target.closest('.wyg-anim-chip');+ if (!btn || !wygAgent) return;+ var clip = btn.dataset.anim;+ if (!clip) return;+ if (activeChip) delete activeChip.dataset.active;+ btn.dataset.active = 'true';+ activeChip = btn;+ wygAgent.play?.(clip, { loop: loopAnims.has(clip), fade_ms: 400 });+ });++ if (stopBtn) {+ stopBtn.addEventListener('click', function() {+ if (!wygAgent) return;+ wygAgent.play?.('idle', { loop: true, fade_ms: 400 });+ if (activeChip) delete activeChip.dataset.active;+ var idleChip = scroll.querySelector('[data-anim="idle"]');+ if (idleChip) idleChip.dataset.active = 'true';+ activeChip = idleChip;+ });+ }+ })();++ // ── Hero walk cycle ─────────────────────────────────────────────+ let _heroChipActive = false;++ function initHeroWalk(heroAgent) {+ const WALK_CLIP = 'av-walk-feminine';+ const IDLE_CLIP = 'idle';+ let active = true;+ let running = false;++ // Ambient idle↔walk loop. Re-entrancy guarded so a second call (visibility+ // flip, or an emote handing the avatar back) never spins up parallel timers.+ async function walkCycle() {+ if (running) return;+ running = true;+ try {+ while (active && !_heroChipActive) {+ await new Promise(r => setTimeout(r, 2000));+ if (!active || _heroChipActive) break;+ heroAgent.play?.(WALK_CLIP, { loop: true, fade_ms: 400 });+ await new Promise(r => setTimeout(r, 5000));+ if (!active || _heroChipActive) break;+ heroAgent.play?.(IDLE_CLIP, { loop: true, fade_ms: 600 });+ await new Promise(r => setTimeout(r, 3000));+ }+ } finally {+ running = false;+ }+ }+ // Expose the cycle so the chip handler can hand the avatar back to its rhythm.+ heroAgent._heroAmbient = walkCycle;++ heroAgent.addEventListener('agent:ready', walkCycle, { once: true });+ if (heroAgent._viewer) walkCycle();++ document.addEventListener('visibilitychange', () => {+ active = !document.hidden;+ if (active && !_heroChipActive) walkCycle();+ });+ }++ // Pray → walk: finish the prayer one-shot, then rise straight into a looping+ // walk via a single crossfade — no snap back to idle at the clip boundary.+ function playPrayToWalk(heroAgent) {+ const am = heroAgent?._viewer?.animationManager;+ if (am && typeof am.playOnce === 'function') {+ am.playOnce('pray', { settleTo: 'av-walk-feminine', fade: 0.45 });+ return;+ }+ // Animation manager not reachable yet: play the one-shot, then walk once it+ // ends (pray clip ≈ 6.87s).+ heroAgent.play?.('pray', { loop: false, fade_ms: 400 });+ clearTimeout(heroAgent._prayWalkTimer);+ heroAgent._prayWalkTimer = setTimeout(() => {+ heroAgent.play?.('av-walk-feminine', { loop: true, fade_ms: 450 });+ }, 6900);+ }++ // ── Hero animation chips ─────────────────────────────────────────+ function initHeroChips(heroAgent) {+ const ANIMS = ['wave','dance','capoeira','jump','thriller','pray','celebrate','rumba','falling','kiss','taunt','idle'];+ const chipsEl = document.getElementById('hero-chips');+ const counter = document.getElementById('hero-chips-counter');+ let lastAnim = null;+ let moveCount = 0;++ if (!chipsEl) return;++ chipsEl.addEventListener('click', (e) => {+ const btn = e.target.closest('.hero-chip');+ if (!btn) return;+ const animKey = btn.dataset.anim;+ if (!animKey) return;++ let clip = animKey;+ if (animKey === '__random') {+ const pool = ANIMS.filter(a => a !== lastAnim);+ clip = pool[Math.floor(Math.random() * pool.length)];+ }+ lastAnim = clip;++ chipsEl.querySelectorAll('.hero-chip').forEach(c => delete c.dataset.active);+ btn.dataset.active = 'true';++ _heroChipActive = true;+ if (clip === 'pray') {+ playPrayToWalk(heroAgent);+ } else {+ heroAgent.play?.(clip, { loop: false, fade_ms: 400 });+ }++ moveCount += 1;+ if (counter) counter.innerHTML = `<strong>${moveCount}</strong> ${moveCount === 1 ? 'move' : 'moves'}`;++ // Pray runs ~6.9s then walks; hold the chip-active window longer so the+ // walk reads before the ambient idle↔walk rhythm takes back over.+ clearTimeout(chipsEl._resumeTimer);+ chipsEl._resumeTimer = setTimeout(() => {+ _heroChipActive = false;+ delete btn.dataset.active;+ heroAgent._heroAmbient?.();+ }, clip === 'pray' ? 11000 : 6000);+ });+ }++ // ── Hero parallax tilt ──────────────────────────────────────────+ const stage = document.getElementById('hero-stage');+ const inner = document.getElementById('hero-stage-inner');+ if (stage && inner && window.matchMedia('(min-width: 980px)').matches) {+ let rx = 0, ry = 0, tx = 0, ty = 0;+ const lerp = (a, b, t) => a + (b - a) * t;+ // Cache the stage rect and refresh only on layout changes, so the hot+ // mousemove path never forces a synchronous reflow per pointer event.+ let r = stage.getBoundingClientRect();+ const refreshRect = () => { r = stage.getBoundingClientRect(); };+ window.addEventListener('resize', refreshRect, { passive: true });+ window.addEventListener('scroll', refreshRect, { passive: true });+ stage.addEventListener('mousemove', (e) => {+ tx = ((e.clientX - r.left) / r.width - 0.5) * 6;+ ty = -((e.clientY - r.top) / r.height - 0.5) * 4;+ }, { passive: true });+ stage.addEventListener('mouseleave', () => { tx = 0; ty = 0; });+ (function tick() {+ rx = lerp(rx, ty, 0.08);+ ry = lerp(ry, tx, 0.08);+ inner.style.transform = `perspective(1400px) rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg)`;+ requestAnimationFrame(tick);+ })();+ }++ // ── Playground ──────────────────────────────────────────────────+ (function initPlayground() {+ const textarea = document.getElementById('pg-textarea');+ const highlight = document.getElementById('pg-highlight');+ const preview = document.getElementById('pg-preview');+ const avatarRow = document.getElementById('pg-avatars');+ const modeChips = document.getElementById('pg-mode-chips');+ const bgChips = document.getElementById('pg-bg-chips');+ const optChips = document.getElementById('pg-option-chips');+ const animsEl = document.getElementById('pg-anims');+ const tabsEl = document.getElementById('pg-tabs');+ const copyBtn = document.getElementById('pg-copy');+ if (!textarea || !preview) return;++ const state = {+ avatarId: AVATAR_ID,+ glbUrl: '',+ mode: 'inline',+ background: 'transparent',+ options: { responsive: true, 'name-plate': 'off', 'avatar-chat': 'off', eager: true },+ flavor: 'html',+ };+ let liveAgent = null;++ function genCode() {+ const attrs = [];+ var isDemo = state.avatarId.indexOf('avatar_demo_') === 0;+ if (isDemo && state.glbUrl) {+ attrs.push('body="' + state.glbUrl + '"');+ } else {+ attrs.push('src="https://three.ws/api/avatars/' + state.avatarId + '"');+ }+ if (state.mode !== 'inline') attrs.push('mode="' + state.mode + '"');+ if (state.background !== 'transparent') attrs.push('background="' + state.background + '"');+ for (const [k, v] of Object.entries(state.options)) {+ // responsive defaults on, so disabling it must be explicit.+ if (k === 'responsive') { attrs.push(v ? 'responsive' : 'responsive="false"'); continue; }+ if (!v || v === 'off') continue;+ attrs.push(typeof v === 'string' ? k + '="' + v + '"' : k);+ }+ const indent = state.flavor === 'html' ? ' ' : ' ';+ const attrBlock = attrs.map(function(a) { return indent + a; }).join('\n');++ if (state.flavor === 'html') {+ return '<script type="module"\n src="https://three.ws/agent-3d/latest/agent-3d.js"\n><\/script>\n\n<agent-3d\n' + attrBlock + '\n></agent-3d>';+ }+ if (state.flavor === 'react') {+ return "import 'https://three.ws/agent-3d/latest/agent-3d.js';\n\nexport default function MyAgent() {\n return (\n <agent-3d\n" + attrBlock + "\n />\n );\n}";+ }+ return '<script setup>\nimport \'https://three.ws/agent-3d/latest/agent-3d.js\';\n<\/script>\n\n<template>\n <agent-3d\n' + attrBlock + '\n />\n</template>';+ }++ function hl(code) {+ var tokens = [];+ var ph = function(cls, txt) { var id = '\x00' + tokens.length + '\x00'; tokens.push('<span class="' + cls + '">' + txt + '</span>'); return id; };+ var s = code.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');+ s = s.replace(/(<\/?[a-z][a-z0-9-]*)/gi, function(m) { return ph('tag', m); });+ s = s.replace(/\b(import|from|export|default|function|return|const|let|var)\b/g, function(m) { return ph('kw', m); });+ s = s.replace(/(\s)([a-z][a-z0-9-]*)(=)/gi, function(_, ws, name, eq) { return ws + ph('attr', name) + eq; });+ s = s.replace(/("(?:[^"\\]|\\.)*?")/g, function(m) { return ph('str', m); });+ s = s.replace(/(\/\/.*?)$/gm, function(m) { return ph('com', m); });+ return s.replace(/\x00(\d+)\x00/g, function(_, i) { return tokens[parseInt(i)]; });+ }++ function syncCode() {+ var code = genCode();+ textarea.value = code;+ highlight.innerHTML = hl(code);+ }++ // The live agent paints its own canvas, but it may not fill the preview+ // frame (responsive width / aspect). Match the surrounding area to the+ // chosen background so the preview reads as one surface. 'transparent'+ // returns '' so the default stage backdrop shows through behind the avatar.+ function resolvePreviewBg(bg) {+ if (bg === 'transparent') return '';+ if (bg === 'dark') return '#0d0d0d';+ if (bg === 'light') return '#f5f5f5';+ return bg;+ }++ function setLiveOption(k, v) {+ // String-valued options (name-plate, avatar-chat) must be reflected+ // explicitly — the component hides the plate only on `name-plate="off"`,+ // not on the attribute's absence, so removing it would leave it visible.+ if (typeof v === 'string') liveAgent.setAttribute(k, v);+ else if (v) liveAgent.setAttribute(k, '');+ else liveAgent.removeAttribute(k);+ }++ function showPreviewMessage() {+ if (preview.querySelector('.pg-preview-msg')) return;+ var msg = document.createElement('div');+ msg.className = 'pg-preview-msg';+ msg.setAttribute('role', 'status');+ msg.innerHTML = 'Couldn\'t load a live avatar right now.<br /><a href="/gallery">Browse the gallery</a> or pick another avatar below.';+ preview.appendChild(msg);+ }+ function clearPreviewMessage() {+ var msg = preview.querySelector('.pg-preview-msg');+ if (msg) msg.remove();+ }+ function updatePreview() {+ if (!state.glbUrl) { showPreviewMessage(); return; }+ clearPreviewMessage();+ // `kiosk` and `eager` are read once at boot (not observed attributes),+ // so a change to either requires recreating the element. kiosk is tied+ // to the chat toggle: with chat on we drop kiosk so the chat chrome+ // renders; with chat off we keep kiosk for a clean avatar-only tile.+ var wantKiosk = state.options['avatar-chat'] !== 'on';+ var wantEager = !!state.options.eager;+ var needsRebuild = !liveAgent+ || liveAgent.hasAttribute('kiosk') !== wantKiosk+ || liveAgent.hasAttribute('eager') !== wantEager;+ if (needsRebuild) {+ if (liveAgent) liveAgent.remove();+ liveAgent = document.createElement('agent-3d');+ if (wantKiosk) liveAgent.setAttribute('kiosk', '');+ if (wantEager) liveAgent.setAttribute('eager', '');+ liveAgent.setAttribute('body', state.glbUrl);+ preview.appendChild(liveAgent);+ } else {+ liveAgent.setAttribute('body', state.glbUrl);+ }+ liveAgent.setAttribute('mode', state.mode);+ liveAgent.setAttribute('background', state.background);+ // Runtime-observed surface attributes — applied live without a reboot.+ // `responsive` is off only when explicitly "false"; an absent attribute+ // defaults to responsive-on, so we must set the literal value.+ liveAgent.setAttribute('responsive', state.options.responsive ? '' : 'false');+ setLiveOption('name-plate', state.options['name-plate']);+ setLiveOption('avatar-chat', state.options['avatar-chat']);+ preview.style.backgroundColor = resolvePreviewBg(state.background);+ }++ function fetchGlb(id) {+ return fetch(location.origin + '/api/avatars/' + id)+ .then(function(r) { return r.json(); })+ .then(function(d) { return devProxyGlb(d.avatar && (d.avatar.model_url || d.avatar.url)) || ''; })+ // The per-avatar detail endpoint can be unavailable; rather than+ // strand the preview on a blank model, borrow a real, renderable+ // GLB from the explore-backed pool so the playground always shows+ // a live agent.+ .catch(function() {+ return getAvatarPool().then(function(pool) { return pool.find(Boolean) || ''; }).catch(function() { return ''; });+ });+ }++ function switchAvatar(id, directGlb) {+ state.avatarId = id;+ avatarRow.querySelectorAll('.pg-avatar-item').forEach(function(el) {+ el.classList.toggle('active', el.dataset.id === id);+ });+ var resolve = directGlb+ ? Promise.resolve(devProxyGlb(directGlb))+ : fetchGlb(id);+ resolve.then(function(glb) {+ state.glbUrl = glb;+ syncCode();+ if (liveAgent) { liveAgent.remove(); liveAgent = null; }+ updatePreview();+ }).catch(function() { showPreviewMessage(); });+ }++ function renderAvatars(list) {+ avatarRow.innerHTML = '';+ list.forEach(function(a) {+ var btn = document.createElement('button');+ btn.className = 'pg-avatar-item' + (a.id === state.avatarId ? ' active' : '');+ btn.dataset.id = a.id;+ if (a.glb) btn.dataset.glb = a.glb;+ btn.title = a.name || a.id.slice(0, 8);+ var initial = document.createElement('span');+ initial.className = 'pg-avatar-initial';+ initial.textContent = (a.name || '?').charAt(0);+ btn.appendChild(initial);+ if (a.thumb) {+ var img = document.createElement('img');+ img.src = a.thumb;+ img.alt = a.name || '';+ img.loading = 'lazy';+ img.onerror = function() { this.style.display = 'none'; initial.style.display = 'flex'; };+ btn.appendChild(img);+ } else {+ initial.style.display = 'flex';+ }+ btn.addEventListener('click', function() { switchAvatar(a.id, a.glb); });+ avatarRow.appendChild(btn);+ });+ }++ function loadAvatars() {+ var O = location.origin;+ var defaults = [+ { id: 'avatar_demo_disk_cz', name: 'CZ', glb: O + '/avatars/cz.glb' },+ { id: 'avatar_demo_disk_ansem', name: 'Ansem', glb: O + '/avatars/default.glb' },+ { id: 'avatar_demo_disk_boss_vernington', name: 'Boss Vernington', glb: O + '/animations/soldier.glb' },+ { id: 'avatar_demo_disk_goblin', name: 'Goblin', glb: O + '/animations/robotexpressive.glb' },+ { id: 'avatar_demo_disk_claude', name: 'Claude', glb: O + '/avatars/default.glb' },+ { id: 'avatar_demo_disk_agent', name: 'Agent', glb: O + '/animations/soldier.glb' },+ { id: 'avatar_demo_disk_ai', name: 'AI', glb: O + '/animations/robotexpressive.glb' },+ ];+ renderAvatars(defaults);+ // Source the picker from the explore feed, which returns a ready-to-render+ // glbUrl per avatar. Carrying the GLB on each chip means selecting one+ // uses the direct-GLB path in switchAvatar and never depends on the+ // per-avatar detail endpoint.+ fetch(O + '/api/explore?source=avatar&only3d=1&limit=24&quality=high', { headers: { accept: 'application/json' } })+ .then(function(r) { return r.json(); })+ .then(function(d) {+ var items = (Array.isArray(d.items) ? d.items : []).filter(function(it) { return it.glbUrl && it.avatarId; });+ // The explore feed is newest-first, and a freshly forged avatar rarely has+ // a thumbnail yet — left alone they monopolise the strip and every chip+ // renders as a bare initial. Stable-partition thumbnailed avatars to the+ // front so the picker shows what you're selecting; the rest still fill any+ // slots left over.+ items = items.filter(function(it) { return it.image; })+ .concat(items.filter(function(it) { return !it.image; }));+ var list = defaults.slice();+ var seen = {};+ defaults.forEach(function(da) { seen[da.id] = true; });+ items.forEach(function(item) {+ var id = item.avatarId;+ if (!id || seen[id]) return;+ seen[id] = true;+ list.push({+ id: id,+ name: item.name || '',+ glb: devProxyGlb(item.glbUrl),+ // `image` is the avatar's stored thumbnail URL, or null when it has+ // none. Pass the null straight through — renderAvatars() then draws+ // the initial-letter chip. Never synthesise a thumb/<id>.png URL as+ // a fallback: that object was never written, so R2 answers 404 with+ // a text/plain body and Chrome blocks it (ERR_BLOCKED_BY_ORB).+ thumb: item.image || null,+ });+ });+ renderAvatars(list.slice(0, 14));+ }).catch(function() {});+ }++ function chipSelect(container, cb) {+ container.addEventListener('click', function(e) {+ var chip = e.target.closest('.pg-chip');+ if (!chip) return;+ container.querySelectorAll('.pg-chip').forEach(function(c) { c.classList.remove('active'); });+ chip.classList.add('active');+ cb(chip);+ });+ }++ chipSelect(modeChips, function(chip) {+ state.mode = chip.dataset.val;+ syncCode(); updatePreview();+ });++ var colorTrigger = document.getElementById('pg-color-trigger');+ var colorPopover = document.getElementById('pg-color-popover');+ var colorSwatches = document.getElementById('pg-color-swatches');+ var colorHexInput = document.getElementById('pg-color-hex');+ var colorPreview = document.getElementById('pg-color-preview');++ var palette = [+ '#1b1b1b','#212121','#0f3460','#533483','#e94560','#ff6b6b',+ '#ffa07a','#ffd93d','#6bcb77','#4d96ff','#845ec2','#d65db1',+ '#333333','#636e72','#b2bec3','#dfe6e9','#fdcb6e','#e17055',+ '#00b894','#00cec9','#0984e3','#6c5ce7','#fd79a8','#e84393',+ ];++ palette.forEach(function(hex) {+ var btn = document.createElement('button');+ btn.className = 'pg-color-swatch';+ btn.style.background = hex;+ btn.dataset.color = hex;+ btn.setAttribute('aria-label', hex);+ colorSwatches.appendChild(btn);+ });++ function applyPickedColor(hex) {+ state.background = hex;+ colorTrigger.classList.add('active', 'has-color');+ colorTrigger.style.setProperty('--pg-picked-color', hex);+ colorPreview.style.background = hex;+ colorHexInput.value = hex;+ bgChips.querySelectorAll('.pg-chip').forEach(function(c) { c.classList.remove('active'); });+ colorSwatches.querySelectorAll('.pg-color-swatch').forEach(function(s) {+ s.classList.toggle('active', s.dataset.color === hex);+ });+ syncCode(); updatePreview();+ }++ chipSelect(bgChips, function(chip) {+ state.background = chip.dataset.val;+ colorTrigger.classList.remove('active', 'has-color');+ colorPopover.classList.remove('open');+ colorSwatches.querySelectorAll('.pg-color-swatch').forEach(function(s) { s.classList.remove('active'); });+ syncCode(); updatePreview();+ });++ var popoverMoved = false;+ function positionPopover() {+ var rect = colorTrigger.getBoundingClientRect();+ var pw = 220;+ var left = rect.left + rect.width / 2 - pw / 2;+ if (left < 8) left = 8;+ if (left + pw > window.innerWidth - 8) left = window.innerWidth - 8 - pw;+ colorPopover.style.position = 'fixed';+ colorPopover.style.transform = 'none';+ colorPopover.style.top = (rect.bottom + 8) + 'px';+ colorPopover.style.left = left + 'px';+ }++ colorTrigger.addEventListener('click', function(e) {+ e.stopPropagation();+ if (!popoverMoved) {+ document.body.appendChild(colorPopover);+ popoverMoved = true;+ }+ positionPopover();+ colorPopover.classList.toggle('open');+ });++ window.addEventListener('scroll', function() {+ if (colorPopover.classList.contains('open')) positionPopover();+ }, { passive: true });+ window.addEventListener('resize', function() {+ if (colorPopover.classList.contains('open')) positionPopover();+ });++ colorSwatches.addEventListener('click', function(e) {+ var swatch = e.target.closest('.pg-color-swatch');+ if (!swatch) return;+ applyPickedColor(swatch.dataset.color);+ });++ colorHexInput.addEventListener('input', function() {+ var v = colorHexInput.value.trim();+ if (!v.startsWith('#')) v = '#' + v;+ if (/^#[0-9a-fA-F]{6}$/.test(v)) applyPickedColor(v);+ });++ colorHexInput.addEventListener('keydown', function(e) {+ if (e.key === 'Enter') {+ var v = colorHexInput.value.trim();+ if (!v.startsWith('#')) v = '#' + v;+ if (/^#[0-9a-fA-F]{6}$/.test(v)) {+ applyPickedColor(v);+ colorPopover.classList.remove('open');+ }+ }+ });++ document.addEventListener('click', function(e) {+ if (!colorPopover.contains(e.target) && e.target !== colorTrigger) {+ colorPopover.classList.remove('open');+ }+ });++ optChips.addEventListener('click', function(e) {+ var chip = e.target.closest('.pg-chip');+ if (!chip) return;+ var attr = chip.dataset.attr;+ var isOn = chip.classList.toggle('active');+ state.options[attr] = isOn ? (chip.dataset.val || true) : (chip.dataset.val ? 'off' : false);+ syncCode(); updatePreview();+ });++ tabsEl.addEventListener('click', function(e) {+ var tab = e.target.closest('.pg-tab');+ if (!tab) return;+ state.flavor = tab.dataset.flavor;+ tabsEl.querySelectorAll('.pg-tab').forEach(function(t) { t.classList.toggle('active', t === tab); });+ syncCode();+ });++ var editDebounce = null;+ textarea.addEventListener('input', function() {+ highlight.innerHTML = hl(textarea.value);+ clearTimeout(editDebounce);+ editDebounce = setTimeout(function() {+ var code = textarea.value;+ var m = code.match(/<agent-3d([^>]*?)(?:\/>|>)/i);+ if (!m) return;+ var as = m[1];+ var ga = function(n) { var x = as.match(new RegExp(n + '="([^"]*)"', 'i')); return x ? x[1] : null; };+ var ha = function(n) { return new RegExp('\\b' + n + '\\b', 'i').test(as); };+ var src = ga('src');+ if (src) {+ var idm = src.match(/avatars\/([a-f0-9-]+)/);+ if (idm && idm[1] !== state.avatarId) { switchAvatar(idm[1]); return; }+ }+ var mode = ga('mode');+ if (mode && mode !== state.mode) state.mode = mode;+ var bg = ga('background');+ if (bg !== null) state.background = bg;+ state.options.responsive = ga('responsive') !== 'false';+ state.options['name-plate'] = ga('name-plate') === 'on' ? 'on' : 'off';+ state.options['avatar-chat'] = ga('avatar-chat') === 'on' ? 'on' : 'off';+ state.options.eager = ha('eager');+ updatePreview();+ }, 350);+ });++ textarea.addEventListener('scroll', function() {+ highlight.scrollTop = textarea.scrollTop;+ highlight.scrollLeft = textarea.scrollLeft;+ });++ textarea.addEventListener('keydown', function(e) {+ if (e.key === 'Tab') {+ e.preventDefault();+ var s = textarea.selectionStart, end = textarea.selectionEnd;+ textarea.value = textarea.value.substring(0, s) + ' ' + textarea.value.substring(end);+ textarea.selectionStart = textarea.selectionEnd = s + 2;+ textarea.dispatchEvent(new Event('input'));+ }+ });++ copyBtn.addEventListener('click', function() {+ navigator.clipboard.writeText(textarea.value).then(function() {+ copyBtn.classList.add('copied');+ copyBtn.textContent = 'Copied';+ setTimeout(function() { copyBtn.classList.remove('copied'); copyBtn.textContent = 'Copy'; }, 1600);+ }).catch(function() {+ copyBtn.textContent = 'Copy blocked';+ setTimeout(function() { copyBtn.textContent = 'Copy'; }, 1600);+ });+ });++ animsEl.addEventListener('click', function(e) {+ var btn = e.target.closest('.pg-anim');+ if (!btn || !liveAgent) return;+ var clip = btn.dataset.anim;+ if (liveAgent.play) liveAgent.play(clip, { loop: clip === 'idle', fade_ms: 400 });+ animsEl.querySelectorAll('.pg-anim').forEach(function(c) { c.classList.remove('active'); });+ btn.classList.add('active');+ if (clip !== 'idle') {+ clearTimeout(animsEl._t);+ animsEl._t = setTimeout(function() { btn.classList.remove('active'); }, 5000);+ }+ });++ fetchGlb(state.avatarId).then(function(glb) {+ state.glbUrl = glb;+ syncCode();+ updatePreview();+ loadAvatars();+ }).catch(function() { showPreviewMessage(); });+ })();++ // ── Showcase 3D — live agent grid ──────────────────────────────+ (function () {+ const SHOWCASE_ANIMS = ['idle', 'dance', 'wave', 'celebrate', 'capoeira', 'thriller'];+ const SHOWCASE_TAGS = ['3D', 'animated', 'rigged', 'ERC-8004', 'pay-per-call', 'community'];+ // Pull real public 3D avatars (each a distinct GLB). source=all is dominated+ // by GLB-less on-chain registrations, which would fall through to duplicated+ // placeholder models — so we ask the avatar source for 3D rows only, then+ // dedupe by model + name and take the first 6 unique ones.+ const EXPLORE_SHOWCASE_URL = '/api/explore?source=avatar&only3d=1&category=avatar,creature&limit=24&quality=high';+ const grid = document.getElementById('showcase-3d-grid');+ if (!grid) return;++ function hashHue(str) {+ var h = 0;+ for (var i = 0; i < str.length; i++) h = (h * 31 + str.charCodeAt(i)) >>> 0;+ return h % 360;+ }++ function makeAgentCard(item, idx) {+ var card = document.createElement('a');+ card.className = 'showcase-agent-card';+ card.href = item.viewerUrl || ('/avatars/' + (item.avatarId || item.agentId));++ var h = hashHue(item.avatarId || item.agentId || item.name || String(idx));+ var h2 = (h + 50) % 360;+ var grad = document.createElement('div');+ grad.className = 'showcase-card-grad';+ grad.style.background = 'radial-gradient(ellipse at 50% 80%, hsl(' + h + ' 60% 18% / 0.6) 0%, hsl(' + h2 + ' 50% 6% / 0.3) 70%, transparent 100%)';+ card.appendChild(grad);++ var skel = document.createElement('div');+ skel.className = 'showcase-card-skel';+ skel.innerHTML = '<div class="showcase-card-skel-ring"></div>';+ card.appendChild(skel);++ var floor = document.createElement('div');+ floor.className = 'showcase-card-floor';+ card.appendChild(floor);++ var glbUrl = item.glbUrl || '';+ if (glbUrl) {+ glbUrl = devProxyGlb(glbUrl);+ } else if (item.avatarId) {+ (async function() {+ try {+ var r = await fetch('/api/avatars/' + item.avatarId);+ var d = await r.json();+ var url = devProxyGlb(d.avatar?.model_url || d.avatar?.url);+ if (url) bootAgent(card, skel, url, idx);+ } catch (_) {}+ })();+ }++ if (item.kind === 'onchain') {+ var tag = document.createElement('span');+ tag.className = 'showcase-card-tag';+ tag.textContent = 'Blockchain';+ card.appendChild(tag);+ } else if (idx === 0) {+ var ftag = document.createElement('span');+ ftag.className = 'showcase-card-tag';+ ftag.textContent = 'Featured';+ card.appendChild(ftag);+ }++ var animLabel = document.createElement('span');+ animLabel.className = 'showcase-card-anim-tag';+ animLabel.textContent = SHOWCASE_TAGS[idx % SHOWCASE_TAGS.length];+ card.appendChild(animLabel);++ var meta = document.createElement('div');+ meta.className = 'showcase-card-meta';+ meta.innerHTML = '<div class="showcase-card-name">' + escHtml(item.name || 'Agent') + '</div>'+ + '<div class="showcase-card-sub">' + escHtml(item.description ? item.description.slice(0, 50) : (item.kind === 'onchain' ? 'ERC-8004' : 'GLB')) + '</div>';+ card.appendChild(meta);++ if (glbUrl) bootAgent(card, skel, glbUrl, idx);++ return card;+ }++ function bootAgent(card, skel, glbUrl, idx) {+ var el = document.createElement('agent-3d');+ el.setAttribute('body', glbUrl);+ el.setAttribute('mode', 'inline');+ el.setAttribute('responsive', '');+ el.setAttribute('background', 'transparent');+ el.setAttribute('name-plate', 'off');+ el.setAttribute('avatar-chat', 'off');+ el.setAttribute('kiosk', '');+ card.insertBefore(el, skel);++ el.addEventListener('agent:ready', function () {+ el.classList.add('loaded');+ if (skel && skel.parentNode) skel.remove();+ var anim = SHOWCASE_ANIMS[idx % SHOWCASE_ANIMS.length];+ if (anim !== 'idle') {+ el.play?.(anim, { loop: true, fade_ms: 600 });+ }+ }, { once: true });+ }++ function makeCta(href, icon, label, sub) {+ var a = document.createElement('a');+ a.className = 'showcase-cta-card';+ a.href = href;+ a.innerHTML = '<span class="showcase-cta-icon">' + icon + '</span>'+ + '<span class="showcase-cta-label">' + label + '</span>'+ + '<span class="showcase-cta-sub">' + sub + '</span>';+ return a;+ }++ function escHtml(s) {+ var d = document.createElement('span');+ d.textContent = s;+ return d.innerHTML;+ }++ // Drop repeats so every showcase card is a distinct character: collapse on+ // both the underlying model (glbUrl/avatarId) and the display name.+ function dedupeAgents(list) {+ var seen = Object.create(null);+ return list.filter(function (it) {+ var modelKey = String(it.glbUrl || it.avatarId || '').toLowerCase();+ var nameKey = String(it.name || '').trim().toLowerCase();+ if (modelKey && seen['m:' + modelKey]) return false;+ if (nameKey && seen['n:' + nameKey]) return false;+ if (modelKey) seen['m:' + modelKey] = true;+ if (nameKey) seen['n:' + nameKey] = true;+ return true;+ });+ }++ function renderShowcase(agentItems) {+ agentItems.forEach(function (item, i) {+ grid.appendChild(makeAgentCard(item, i));+ });+ grid.appendChild(makeCta('/discover', '→', 'Browse all', 'Public agent directory'));+ grid.appendChild(makeCta('/create', '✨', 'Make your own', 'Selfie → agent · 60s'));+ }++ var showcaseBooted = false;+ var showcaseObs = new IntersectionObserver(function (entries) {+ if (!entries[0].isIntersecting || showcaseBooted) return;+ showcaseBooted = true;+ showcaseObs.disconnect();++ fetch(EXPLORE_SHOWCASE_URL, { headers: { accept: 'application/json' } })+ .then(function (r) { return r.json(); })+ .then(function (data) {+ var items = Array.isArray(data.items) ? data.items : [];+ var agentItems = dedupeAgents(items.filter(function (it) { return it.glbUrl || it.avatarId; })).slice(0, 6);+ // Real avatars only. If the feed is thin or empty the grid+ // degrades to its two CTA cards (Browse all / Make your own) —+ // never to fabricated demo agents.+ renderShowcase(agentItems);+ })+ .catch(function () {+ renderShowcase([]);+ });+ }, { rootMargin: '200px' });+ showcaseObs.observe(grid);+ })();++ // ── Vclose section ──────────────────────────────────────────────+ (async () => {+ try {+ const pool = await getAvatarPool();+ const glb = pool[1];+ if (!glb) return;++ const slot = document.getElementById('vclose-agent-slot');+ if (!slot) return;+ const vcloseEl = document.createElement('agent-3d');+ vcloseEl.id = 'vclose-agent';+ vcloseEl.className = 'vclose-agent';+ vcloseEl.setAttribute('body', glb);+ vcloseEl.setAttribute('mode', 'inline');+ vcloseEl.setAttribute('responsive', '');+ vcloseEl.setAttribute('background', 'transparent');+ vcloseEl.setAttribute('name-plate', 'off');+ vcloseEl.setAttribute('avatar-chat', 'off');+ vcloseEl.setAttribute('kiosk', '');+ slot.replaceWith(vcloseEl);++ let vcloseInited = false;+ const ANIMS = ['wave','dance','capoeira','jump','thriller','pray','celebrate','rumba','falling','kiss','taunt'];+ let vcloseLast = null;++ function vcloseReady() {+ if (vcloseInited) return;+ vcloseInited = true;+ vcloseEl.classList.add('loaded');+ vcloseEl.play?.('idle', { loop: true, fade_ms: 400 });+ }+ vcloseEl.addEventListener('agent:ready', vcloseReady, { once: true });++ const vcloseChips = document.getElementById('vclose-chips');+ if (vcloseChips) {+ vcloseChips.addEventListener('click', (e) => {+ const btn = e.target.closest('.hero-chip');+ if (!btn) return;+ let clip = btn.dataset.anim;+ if (clip === '__random') {+ const pool = ANIMS.filter(a => a !== vcloseLast);+ clip = pool[Math.floor(Math.random() * pool.length)];+ }+ vcloseLast = clip;+ vcloseChips.querySelectorAll('.hero-chip').forEach(c => delete c.dataset.active);+ btn.dataset.active = 'true';+ vcloseEl.play?.(clip, { loop: false, fade_ms: 400 });+ clearTimeout(vcloseChips._timer);+ vcloseChips._timer = setTimeout(() => delete btn.dataset.active, 6000);+ });+ }++ const vcloseSection = document.getElementById('vclose');+ if (vcloseSection) {+ const io = new IntersectionObserver((entries) => {+ if (entries[0].isIntersecting && !vcloseInited) {+ vcloseReady();+ }+ }, { threshold: 0, rootMargin: '200px' });+ io.observe(vcloseSection);+ }+ } catch (e) {+ console.warn('[home] vclose avatar boot failed', e);+ }+ })();++ // ── Reveal on scroll (IntersectionObserver) ────────────────────+ {+ const revealEls = document.querySelectorAll('.reveal');+ if (revealEls.length) {+ const revealObs = new IntersectionObserver((entries) => {+ entries.forEach((entry) => {+ if (entry.isIntersecting) {+ entry.target.classList.add('vis');+ revealObs.unobserve(entry.target);+ }+ });+ }, { threshold: 0.08, rootMargin: '0px 0px -40px 0px' });+ revealEls.forEach((el) => revealObs.observe(el));+ }+ }++ // ── Hero text entrance ──────────────────────────────────────────+ requestAnimationFrame(() => {+ const heroText = document.querySelector('.hero-text');+ if (heroText) heroText.classList.add('entered');+ });++ // ── 3D Stack section: mouse-tracked perspective + spotlight ─────+ {+ const scene = document.getElementById('stack-3d-scene');+ const wrap = document.getElementById('stack-3d');+ if (scene && wrap && window.matchMedia('(min-width: 601px)').matches+ && !window.matchMedia('(prefers-reduced-motion: reduce)').matches) {+ let rx = 0, ry = 0, tx = 0, ty = 0;+ const lerp = (a, b, t) => a + (b - a) * t;++ wrap.addEventListener('mousemove', (e) => {+ const r = wrap.getBoundingClientRect();+ const nx = (e.clientX - r.left) / r.width;+ const ny = (e.clientY - r.top) / r.height;+ tx = (nx - 0.5) * 8;+ ty = -(ny - 0.5) * 5;+ });+ wrap.addEventListener('mouseleave', () => { tx = 0; ty = 0; });++ (function tick() {+ rx = lerp(rx, ty, 0.06);+ ry = lerp(ry, tx, 0.06);+ scene.style.transform =+ `rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg)`;+ requestAnimationFrame(tick);+ })();++ // Cache the card list + rects once and batch CSS-var writes into a+ // single rAF per frame, so the glow no longer forces a layout read per+ // card on every mousemove (the landing page's worst thrash hot path).+ const glowCards = Array.from(scene.querySelectorAll('.stack-card'));+ let glowRects = glowCards.map((c) => c.getBoundingClientRect());+ const refreshGlowRects = () => { glowRects = glowCards.map((c) => c.getBoundingClientRect()); };+ window.addEventListener('resize', refreshGlowRects, { passive: true });+ window.addEventListener('scroll', refreshGlowRects, { passive: true });+ let glowX = 0, glowY = 0, glowPending = false;+ scene.addEventListener('mousemove', (e) => {+ glowX = e.clientX; glowY = e.clientY;+ if (glowPending) return;+ glowPending = true;+ requestAnimationFrame(() => {+ glowPending = false;+ for (let i = 0; i < glowCards.length; i++) {+ const cr = glowRects[i];+ glowCards[i].style.setProperty('--mx', (glowX - cr.left) + 'px');+ glowCards[i].style.setProperty('--my', (glowY - cr.top) + 'px');+ }+ });+ }, { passive: true });+ }++ if (wrap) {+ setTimeout(() => wrap.classList.add('settled'), 800);+ }+ }+++ // ── Live feature agents ─────────────────────────────────────────+ (function initLiveFeatures() {+ var O = location.origin;+ // `clip` is declarative: the <agent-3d> component honors each clip's+ // manifest loop flag automatically — one-shots (wave) play once and settle+ // into idle, loops (rumba/idle) loop seamlessly. No forced loop, so the old+ // celebrate hard-snap is gone. `framing="portrait"` crops head-to-mid-thigh+ // so the avatar fills the card instead of standing tiny-and-low.+ //+ // Portrait framing sizes the camera to the avatar's *load-time* bounding box+ // (before any retargeted clip applies), so the body MUST ship arms-down at+ // rest. T-pose-authored rigs (michelle, xbot — arms stretched horizontally)+ // blow up the box width, push the camera far back, and leave a tiny figure+ // stranded at the bottom of the card. Use rest-arms-down bodies here:+ // default.glb and cz.glb (both in the curated portrait-safe POOL_FALLBACKS).+ var LIVE_SPOTS = [+ { id: 'door-create', clip: 'wave', framing: 'portrait', glb: O + '/avatars/default.glb' },+ { id: 'door-embed', clip: 'rumba', framing: 'portrait', glb: O + '/avatars/cz.glb' },+ { id: 'bento-studio', clip: 'idle', framing: 'portrait', glb: null },+ { id: 'bento-anim', clip: 'idle', framing: 'full', glb: null }+ ];++ function spawnMini(container, glb, opts) {+ var el = document.createElement('agent-3d');+ el.setAttribute('body', glb);+ el.setAttribute('mode', 'inline');+ el.setAttribute('responsive', '');+ el.setAttribute('background', 'transparent');+ el.setAttribute('name-plate', 'off');+ el.setAttribute('avatar-chat', 'off');+ el.setAttribute('kiosk', '');+ if (opts.clip) el.setAttribute('clip', opts.clip);+ if (opts.framing) el.setAttribute('framing', opts.framing);+ el.setAttribute('eager', '');+ container.appendChild(el);+ // The component autoplays the declared clip with the polished embed+ // defaults (skeleton load state, loop-honoring + one-shot→idle settle,+ // reduced-motion static pose, offscreen render pause). No ready hook.+ return el;+ }++ // Assign unique pool avatars to spots that don't have a hardcoded local GLB.+ // pool[0] and pool[1] are reserved for WYG and vclose; null spots start at pool[2].+ getAvatarPool()+ .then(function(pool) {+ var nullIdx = 2;+ LIVE_SPOTS.forEach(function(spot) {+ if (!spot.glb) {+ spot.glb = pool[nullIdx++ % pool.length];+ }+ });+ var io = new IntersectionObserver(function(entries) {+ entries.forEach(function(entry) {+ if (!entry.isIntersecting) return;+ var spot = LIVE_SPOTS.find(function(s) { return s.id === entry.target.id; });+ if (!spot || entry.target.querySelector('agent-3d')) return;+ io.unobserve(entry.target);+ spawnMini(entry.target, spot.glb, spot);+ });+ }, { rootMargin: '150px' });+ LIVE_SPOTS.forEach(function(spot) {+ var el = document.getElementById(spot.id);+ if (el) io.observe(el);+ });+ }).catch(function() {});++ // Bento animation pills+ var animPills = document.getElementById('bento-anim-pills');+ if (animPills) {+ animPills.addEventListener('click', function(e) {+ var btn = e.target.closest('.bento-pill-btn');+ if (!btn) return;+ e.preventDefault(); e.stopPropagation();+ var clip = btn.dataset.anim;+ var agent = document.querySelector('#bento-anim agent-3d');+ // Explicit user gesture → playClip honors the clip's loop flag,+ // settles one-shots into idle, and is allowed to animate even under+ // reduced motion. Fall back to play() on older bundles.+ if (agent && agent.playClip) agent.playClip(clip, { userInitiated: true });+ else if (agent && agent.play) agent.play(clip, { loop: clip === 'idle', fade_ms: 400 });+ animPills.querySelectorAll('.bento-pill-btn').forEach(function(p) { p.classList.remove('active'); });+ btn.classList.add('active');+ });+ }++ // Earn door — one-time count-up reveal of an illustrative example figure.+ // The number is labeled "example earnings" in the markup; it is not live+ // platform data (real earnings live behind auth on /dashboard/monetize).+ var earnVal = document.getElementById('door-earn-val');+ var earnViz = document.getElementById('door-earn-viz');+ if (earnVal) {+ var started = false;+ var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;+ var EARN_EXAMPLE = 128.40;+ var earnObs = new IntersectionObserver(function(entries) {+ if (!entries[0].isIntersecting || started) return;+ started = true; earnObs.disconnect();+ if (earnViz) earnViz.classList.add('is-live');++ if (reduceMotion) {+ earnVal.textContent = '$' + EARN_EXAMPLE.toFixed(2);+ return;+ }+ var val = 0;+ (function tick() {+ val += (EARN_EXAMPLE - val) * 0.025;+ if (val >= EARN_EXAMPLE - 0.01) val = EARN_EXAMPLE;+ earnVal.textContent = '$' + val.toFixed(2);+ if (val < EARN_EXAMPLE) requestAnimationFrame(tick);+ })();+ }, { threshold: 0.35 });+ earnObs.observe(earnVal);+ }+ })();diff --git a/src/oracle.js b/src/oracle.jsindex 2a5a464be..d86c2ff2b 100644--- a/src/oracle.js+++ b/src/oracle.js@@ -594,7 +594,8 @@ function renderFeedEmpty(kind) {$('#ctFeed').textContent = '';if (kind === 'warming') {- grid.innerHTML = `<div class="state" style="grid-column:1/-1"><b>Oracle is warming up</b>The conviction engine ships with its backend — once the ingestion augmentor is live it scores every new pump.fun launch in real time. Check back shortly.</div>`;+ grid.innerHTML = `<div class="state" style="grid-column:1/-1"><b>Oracle is warming up</b>The conviction engine ships with its backend — once the ingestion augmentor is live it scores every new pump.fun launch in real time. Check back shortly.<div style="margin-top:14px"><button class="btn" type="button" id="feedRetry">Retry now</button></div></div>`;+ $('#feedRetry')?.addEventListener('click', () => loadFeed());return;}diff --git a/src/shared/coin-format.js b/src/shared/coin-format.jsindex ab4397f58..2c2aaba3f 100644--- a/src/shared/coin-format.js+++ b/src/shared/coin-format.js@@ -64,10 +64,29 @@ export function formatChartTick(ts, days) {return `${d.toLocaleDateString('en-US', { month: 'short' })} '${String(d.getFullYear() % 100).padStart(2, '0')}`;}-/** Relative age: "3m ago", "2h ago", "5d ago". Falls back to a short date past 14 days. */+/**+ * Normalize a timestamp to epoch ms. Accepts ISO strings, Date objects,+ * epoch milliseconds, and epoch seconds (values below 1e12 are treated as+ * seconds — that boundary is Sep 2001 in ms and year 33658 in seconds, so+ * real timestamps are unambiguous). Returns NaN for unparseable input.+ */+export function toEpochMs(input) {+ if (input == null || input === '') return NaN;+ if (input instanceof Date) return input.getTime();+ if (typeof input === 'number' && Number.isFinite(input)) {+ return input < 1e12 ? input * 1000 : input;+ }+ if (typeof input === 'string' && /^\d+$/.test(input)) return toEpochMs(Number(input));+ return new Date(input).getTime();+}++/**+ * Relative age: "3m ago", "2h ago", "5d ago". Falls back to a short date past+ * 14 days. Accepts any timestamp shape `toEpochMs` understands, so callers+ * with unix-seconds or ms inputs share one contract.+ */export function timeAgo(iso, now = Date.now()) {- if (!iso) return '';- const t = new Date(iso).getTime();+ const t = toEpochMs(iso);if (Number.isNaN(t)) return '';const s = Math.max(0, Math.floor((now - t) / 1000));if (s < 60) return 'just now';diff --git a/src/shared/markdown.js b/src/shared/markdown.jsnew file mode 100644index 000000000..8eed4aa5f--- /dev/null+++ b/src/shared/markdown.js@@ -0,0 +1,95 @@+// Shared sanitized Markdown renderer for every surface that shows model or+// user authored text (brain chat, bounty briefs, manifest previews, memory+// seeds, NPC analysis). Full CommonMark + GFM via `marked`, then a strict+// DOMPurify pass so the result is safe to assign via innerHTML even if a+// renderer bug or a hostile payload slips through upstream.+//+// This replaces eight hand-rolled per-file renderers that each carried their+// own escape logic and subset of Markdown. Do not add another one; extend+// this module instead.++import { Marked } from 'marked';+import createDOMPurify from 'dompurify';++const marked = new Marked({ gfm: true, breaks: true, async: false });++const purify = createDOMPurify(window);++// Markdown output only: no media, no forms, no style. Links are hardened in+// the hook below.+const SANITIZE_CFG = {+ ALLOWED_TAGS: [+ 'p', 'br', 'hr', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',+ 'ul', 'ol', 'li', 'blockquote', 'pre', 'code',+ 'strong', 'em', 'del', 'a', 'span',+ 'table', 'thead', 'tbody', 'tr', 'th', 'td',+ ],+ ALLOWED_ATTR: ['href', 'class', 'start', 'align', 'target', 'rel'],+};++const SAFE_HREF = /^(?:https?:|mailto:)/i;++purify.addHook('afterSanitizeAttributes', (node) => {+ if (node.tagName !== 'A') return;+ const href = node.getAttribute('href') || '';+ const ok = SAFE_HREF.test(href) || href.startsWith('/') || href.startsWith('#');+ if (!ok) node.removeAttribute('href');+ node.setAttribute('target', '_blank');+ node.setAttribute('rel', 'noopener noreferrer nofollow');+});++/**+ * Render Markdown to sanitized HTML.+ *+ * @param {string} src Markdown source (model output, user content).+ * @param {object} [opts]+ * @param {Record<string, string>} [opts.classes] CSS classes to add per+ * selector, e.g. `{ pre: 'md-code', 'code:not(pre code)': 'md-ic' }`, so+ * existing per-page stylesheets keep working.+ * @param {number} [opts.demoteHeadings] Shift headings down N levels+ * (`# -> h3` for pages where the content sits under a section h2).+ * @returns {string} HTML string safe for innerHTML.+ */+export function renderMarkdown(src, { classes, demoteHeadings = 0 } = {}) {+ if (src == null || src === '') return '';+ const raw = marked.parse(String(src));+ const clean = purify.sanitize(raw, SANITIZE_CFG);+ if (!classes && !demoteHeadings) return clean;++ const tpl = document.createElement('template');+ tpl.innerHTML = clean;+ if (demoteHeadings > 0) {+ for (let lvl = 6; lvl >= 1; lvl--) {+ for (const el of [...tpl.content.querySelectorAll(`h${lvl}`)]) {+ const next = document.createElement(`h${Math.min(6, lvl + demoteHeadings)}`);+ next.innerHTML = el.innerHTML;+ for (const attr of el.attributes) next.setAttribute(attr.name, attr.value);+ el.replaceWith(next);+ }+ }+ }+ if (classes) {+ for (const [sel, cls] of Object.entries(classes)) {+ for (const el of tpl.content.querySelectorAll(sel)) el.classList.add(cls);+ }+ }+ return tpl.innerHTML;+}++/**+ * Strip Markdown syntax for plain-text contexts (voice narration, tooltips,+ * meta descriptions).+ */+export function stripMarkdown(src) {+ return String(src ?? '')+ .replace(/```[\s\S]*?```/g, ' ')+ .replace(/`([^`]+)`/g, '$1')+ .replace(/!?\[([^\]]*)\]\([^)\s]*\)/g, '$1')+ .replace(/^#{1,6}\s+/gm, '')+ .replace(/^\s*>\s?/gm, '')+ .replace(/^\s*[-*+]\s+/gm, '')+ .replace(/^\s*\d+[.)]\s+/gm, '')+ .replace(/(\*\*|__|[*_~])/g, '')+ .replace(/\s+/g, ' ')+ .trim();+}diff --git a/src/shared/toast.js b/src/shared/toast.jsnew file mode 100644index 000000000..447222efa--- /dev/null+++ b/src/shared/toast.js@@ -0,0 +1,78 @@+// Shared toast notifications. One aria-live region, a real queue (a second+// toast stacks instead of clobbering the first), variants, and a dismiss+// action. Replaces the ~28-line singleton-div toast() that was copy-pasted+// into 40+ pages; import this instead of redefining it.++let region = null;+const MAX_VISIBLE = 3;++function ensureRegion() {+ if (region && document.body.contains(region)) return region;+ region = document.createElement('div');+ region.id = 'tw-toast-region';+ region.setAttribute('role', 'status');+ region.setAttribute('aria-live', 'polite');+ region.style.cssText = [+ 'position:fixed', 'left:50%', 'bottom:32px', 'transform:translateX(-50%)',+ 'display:flex', 'flex-direction:column-reverse', 'align-items:center', 'gap:8px',+ 'z-index:9999', 'pointer-events:none', 'max-width:min(92vw,480px)',+ ].join(';');+ document.body.appendChild(region);+ return region;+}++const VARIANT_BORDER = {+ info: 'var(--nxt-stroke-strong, rgba(255,255,255,0.18))',+ success: 'rgba(67,214,160,0.55)',+ error: 'rgba(255,122,138,0.6)',+};++/**+ * Show a toast.+ * @param {string} msg Plain text (assigned via textContent, never innerHTML).+ * @param {object} [opts]+ * @param {'info'|'success'|'error'} [opts.variant]+ * @param {number} [opts.duration] ms before auto-hide (errors default longer).+ * @returns {() => void} dismiss function.+ */+export function toast(msg, { variant = 'info', duration } = {}) {+ const host = ensureRegion();+ const ms = duration ?? (variant === 'error' ? 4200 : 1800);++ const el = document.createElement('div');+ el.textContent = String(msg ?? '');+ el.style.cssText = [+ 'background:rgba(20,21,28,0.95)',+ `border:1px solid ${VARIANT_BORDER[variant] || VARIANT_BORDER.info}`,+ 'color:var(--nxt-ink, #f2f3f7)', 'padding:9px 16px', 'border-radius:999px',+ 'font-size:13px', 'line-height:1.4', 'opacity:0', 'transform:translateY(20px)',+ 'transition:opacity .18s,transform .18s', 'backdrop-filter:blur(20px)',+ '-webkit-backdrop-filter:blur(20px)', 'box-shadow:0 8px 24px rgba(0,0,0,0.4)',+ 'pointer-events:auto', 'cursor:pointer', 'overflow-wrap:anywhere',+ ].join(';');+ el.title = 'Dismiss';++ // Cap the stack: retire the oldest visible toast to make room.+ while (host.children.length >= MAX_VISIBLE) host.firstChild.remove();+ host.appendChild(el);+ requestAnimationFrame(() => {+ el.style.opacity = '1';+ el.style.transform = 'translateY(0)';+ });++ let gone = false;+ const dismiss = () => {+ if (gone) return;+ gone = true;+ clearTimeout(timer);+ el.style.opacity = '0';+ el.style.transform = 'translateY(20px)';+ setTimeout(() => el.remove(), 200);+ };+ const timer = setTimeout(dismiss, ms);+ el.addEventListener('click', dismiss);+ return dismiss;+}++export const toastSuccess = (msg, opts) => toast(msg, { ...opts, variant: 'success' });+export const toastError = (msg, opts) => toast(msg, { ...opts, variant: 'error' });diff --git a/src/symphony.css b/src/symphony.cssindex 481c8544c..325e54d3d 100644--- a/src/symphony.css+++ b/src/symphony.css@@ -1,4 +1,4 @@-/* /symphony — the agent economy as generative music.+/* /symphony: the agent economy as generative music.Like /pulse, this page is a deliberate dark stage in both themes: thevisualization is light-on-black and a concert hall does not have a lightdiff --git a/tests/economy-sweepback.test.js b/tests/economy-sweepback.test.jsindex 712d7a22b..d1b75e777 100644--- a/tests/economy-sweepback.test.js+++ b/tests/economy-sweepback.test.js@@ -15,6 +15,7 @@ import {isPlatformOwnedAgent,PLATFORM_AGENT_OWNER_EMAIL,} from '../api/_lib/economy-sweepback.js';+import { MIN_OPERATIONAL_WALLET_SOL } from '../api/_lib/agent-trade-guards.js';// reclaimableSol: the emergency consolidation's sizing. The load-bearing property// is anti-oscillation: it must NEVER leave an engine below minSol, or the topup@@ -232,6 +233,33 @@ test('agentReclaimFloorSol leaves a working trader its trade capital', () => {assert.ok(agentReclaimFloorSol({}) > 0);});+test('agentReclaimFloorSol keeps a small-size arm able to actually trade', () => {+ // The state this closes: an enabled arm sized at 0.002 SOL/trade kept a floor of+ // 0.004 SOL, which cannot pay the token ATA's rent, the fee/tip headroom AND the+ // firewall's simulated round-trip — so every entry aborted at a safety check the+ // wallet could no longer afford to run. Funded on every dashboard, dead in fact.+ const tiny = agentReclaimFloorSol({ enabled: true, perTradeSol: 0.002 });+ assert.ok(tiny >= MIN_OPERATIONAL_WALLET_SOL, `floor ${tiny} must cover one complete trade`);+ // The working-capital multiple still applies on top for a larger arm.+ assert.ok(agentReclaimFloorSol({ enabled: true, perTradeSol: 0.05 }) >= 0.1 + MIN_OPERATIONAL_WALLET_SOL);+ // A disabled arm is still swept to the bare idle floor — this changes nothing there.+ assert.ok(agentReclaimFloorSol({ enabled: false, perTradeSol: 0.002 }) < MIN_OPERATIONAL_WALLET_SOL);+});++test('planAgentReclaim leaves an enabled arm enough to place its next trade', () => {+ const { plan } = planAgentReclaim([+ {+ agentId: 'arm', name: 'rules-classic', address: 'Arm111',+ owner: '[email protected]', sol: 0.05,+ strategy: { enabled: true, perTradeSol: 0.002 },+ },+ ]);+ if (plan.length) {+ const retained = 0.05 - plan[0].sol;+ assert.ok(retained >= MIN_OPERATIONAL_WALLET_SOL, `retained ${retained} SOL must still fund a trade`);+ }+});+test('planAgentReclaim never plans a customer wallet, whatever the balance', () => {const { plan, skipped } = planAgentReclaim([{ agentId: 'a', name: 'Customer Sniper', address: 'Cust111', owner: '[email protected]', sol: 2.13 },diff --git a/tests/economy-usdc-topup.test.js b/tests/economy-usdc-topup.test.jsnew file mode 100644index 000000000..ef3367585--- /dev/null+++ b/tests/economy-usdc-topup.test.js@@ -0,0 +1,97 @@+import { describe, it, expect } from 'vitest';+import { planUsdcTopups } from '../api/_lib/economy-usdc-topup.js';++// Fixed caps so the tests do not depend on env: keep $10 on the master, move at+// most $15 per transfer and $40 per day, refill to 1.5x floor, skip under $1.+const caps = { masterKeep: 10, perTransferUsd: 15, dailyUsd: 40, refillMultiple: 1.5, minTransferUsd: 1 };++describe('planUsdcTopups', () => {+ it('refills a below-floor wallet toward floor x multiple from master surplus', () => {+ // The 2026-07-28 shape: payer at 5 USDC against a $10 floor while the+ // master idles at 48. Target 15, so it sends 10.+ const { plan } = planUsdcTopups({+ masterUsdc: 48,+ spentTodayUsd: 0,+ caps,+ wallets: [{ name: 'x402-ring-payer', pubkey: 'P', usdc: 5, floorUsd: 10 }],+ });+ expect(plan).toHaveLength(1);+ expect(plan[0].sendUsd).toBe(10);+ });++ it('arms only below the floor: a wallet between floor and target is stable', () => {+ // 12 USDC sits above the $10 floor but below the $15 target. Topping it up+ // anyway would re-trigger a trickle every run; it must hold steady.+ const { plan, skipped } = planUsdcTopups({+ masterUsdc: 48,+ spentTodayUsd: 0,+ caps,+ wallets: [{ name: 'x402-ring-payer', pubkey: 'P', usdc: 12, floorUsd: 10 }],+ });+ expect(plan).toHaveLength(0);+ expect(skipped[0].reason).toBe('above_floor');+ });++ it('never spends the master below its keep floor', () => {+ // Master holds 11 against a $10 keep: only $1 is spendable.+ const { plan } = planUsdcTopups({+ masterUsdc: 11,+ spentTodayUsd: 0,+ caps,+ wallets: [{ name: 'x402-ring-payer', pubkey: 'P', usdc: 2, floorUsd: 10 }],+ });+ expect(plan).toHaveLength(1);+ expect(plan[0].sendUsd).toBe(1);+ });++ it('reports master_at_keep_floor when there is nothing spendable', () => {+ const { plan, skipped } = planUsdcTopups({+ masterUsdc: 10,+ spentTodayUsd: 0,+ caps,+ wallets: [{ name: 'x402-ring-payer', pubkey: 'P', usdc: 2, floorUsd: 10 }],+ });+ expect(plan).toHaveLength(0);+ expect(skipped[0].reason).toBe('master_at_keep_floor');+ });++ it('honors the daily cap across runs', () => {+ const { plan, skipped } = planUsdcTopups({+ masterUsdc: 100,+ spentTodayUsd: 39.5,+ caps,+ wallets: [{ name: 'x402-ring-payer', pubkey: 'P', usdc: 2, floorUsd: 10 }],+ });+ expect(plan).toHaveLength(0);+ expect(skipped[0].reason).toBe('daily_cap_reached');+ });++ it('serves the neediest wallet first and shares the budgets', () => {+ // Master surplus is $12 ($22 - $10 keep). Ring (shortfall $8) beats a2a+ // (shortfall $3); ring wants $13 to reach target but the surplus leaves+ // only $12, then a2a gets nothing.+ const { plan, skipped } = planUsdcTopups({+ masterUsdc: 22,+ spentTodayUsd: 0,+ caps,+ wallets: [+ { name: 'a2a-payer', pubkey: 'A', usdc: 2, floorUsd: 5 },+ { name: 'x402-ring-payer', pubkey: 'P', usdc: 2, floorUsd: 10 },+ ],+ });+ expect(plan[0].name).toBe('x402-ring-payer');+ expect(plan[0].sendUsd).toBe(12);+ expect(skipped.find((s) => s.name === 'a2a-payer').reason).toBe('master_at_keep_floor');+ });++ it('caps a single transfer at the per-transfer bound', () => {+ const bigFloor = { ...caps, perTransferUsd: 5 };+ const { plan } = planUsdcTopups({+ masterUsdc: 100,+ spentTodayUsd: 0,+ caps: bigFloor,+ wallets: [{ name: 'x402-ring-payer', pubkey: 'P', usdc: 0, floorUsd: 10 }],+ });+ expect(plan[0].sendUsd).toBe(5);+ });+});diff --git a/tests/gcp-triage.test.js b/tests/gcp-triage.test.jsnew file mode 100644index 000000000..ec7fd39f7--- /dev/null+++ b/tests/gcp-triage.test.js@@ -0,0 +1,39 @@+// Classification contract for the production triage monitor. Every signature+// added to KNOWN_SIGNATURES should get a case here: the monitor learning a+// benign pattern must never silently swallow a genuine fault that shares text.+import { describe, expect, it } from 'vitest';+import { classify } from '../scripts/gcp-triage.mjs';++describe('gcp-triage classify', () => {+ it('classifies the Colyseus stale-seat refusal as self-healing', () => {+ const sig = classify(+ 'Error: seat reservation expired.\n at WebSocketServer.onConnection (file:///app/node_modules/@colyseus/ws-transport/build/WebSocketTransport.mjs:79:15)',+ ['three-ws-multiplayer'],+ );+ expect(sig?.id).toBe('colyseus-seat-expired');+ expect(sig?.class).toBe('self-healing');+ });++ it('classifies the SRH abort only on three-ws-redis-proxy', () => {+ const line = 'Uncaught signal: 10, pid=54, tid=54, fault_addr=0.';+ const onProxy = classify(line, ['three-ws-redis-proxy']);+ expect(onProxy?.id).toBe('redis-proxy-srh-crash');+ expect(onProxy?.class).toBe('self-healing');+ });++ it('leaves the same signal line from any other service unclassified', () => {+ const line = 'Uncaught signal: 10, pid=54, tid=54, fault_addr=0.';+ expect(classify(line, ['three-ws-api'])).toBeNull();+ expect(classify(line, [])).toBeNull();+ expect(classify(line)).toBeNull();+ });++ it('still matches service-unscoped signatures without a services argument', () => {+ const sig = classify('db at storage cap (3072MB >= 3072MB)');+ expect(sig?.id).toBe('db-storage-cap');+ });++ it('returns null for an unknown message', () => {+ expect(classify('some brand new failure nobody has seen', ['three-ws-api'])).toBeNull();+ });+});diff --git a/tests/glb-canonicalize.test.js b/tests/glb-canonicalize.test.jsindex f954eef79..df5bcc174 100644--- a/tests/glb-canonicalize.test.js+++ b/tests/glb-canonicalize.test.js@@ -439,6 +439,49 @@ describe('canonicalizeBoneName', () => {expect(canonicalizeBoneName(input)).toBe(expected);});+ // Roblox R15 (`LowerTorso`/`UpperTorso`, camelCase limbs) and R6 (`Torso`,+ // space-separated limbs), plus the generic single-torso spellings.+ it.each([+ ['LowerTorso', 'Hips'],+ ['UpperTorso', 'Spine1'],+ ['Torso', 'Spine'],+ ['Waist', 'Spine'],+ ['Ribcage', 'Spine1'],+ ['LeftUpperArm', 'LeftArm'],+ ['RightLowerArm', 'RightForeArm'],+ ['LeftUpperLeg', 'LeftUpLeg'],+ ['RightLowerLeg', 'RightLeg'],+ ['Left Arm', 'LeftArm'],+ ['Right Leg', 'RightLeg'],+ ])('maps Roblox R15/R6 and generic torso bones: %s → %s', (input, expected) => {+ expect(canonicalizeBoneName(input)).toBe(expected);+ });++ // Second Life / OpenSim skeletons: `m`-prefixed bones with a trailing side+ // word. `mShoulder` is the upper arm (the clavicle is `mCollar`); the ankle+ // is the articulating foot joint and `mFoot` (the ball) drives the toe.+ it.each([+ ['mPelvis', 'Hips'],+ ['mTorso', 'Spine'],+ ['mChest', 'Spine1'],+ ['mNeck', 'Neck'],+ ['mHead', 'Head'],+ ['mCollarLeft', 'LeftShoulder'],+ ['mCollarRight', 'RightShoulder'],+ ['mShoulderLeft', 'LeftArm'],+ ['mShoulderRight', 'RightArm'],+ ['mElbowLeft', 'LeftForeArm'],+ ['mWristRight', 'RightHand'],+ ['mHipLeft', 'LeftUpLeg'],+ ['mHipRight', 'RightUpLeg'],+ ['mKneeLeft', 'LeftLeg'],+ ['mAnkleRight', 'RightFoot'],+ ['mFootLeft', 'LeftToeBase'],+ ['mToeRight', 'RightToeBase'],+ ])('maps Second Life / OpenSim bones: %s → %s', (input, expected) => {+ expect(canonicalizeBoneName(input)).toBe(expected);+ });+// Rigify / Blender anatomical arm chain: side is a `.L`/`.R` suffix and the// forearm is spelled `forearm` (not `lowerarm`/`elbow`). The suffix normalises// to `forearml`, which the side-prefix spellings never reach — so before thediff --git a/tests/sniper-stall.test.js b/tests/sniper-stall.test.jsindex eb46fb605..1e2928984 100644--- a/tests/sniper-stall.test.js+++ b/tests/sniper-stall.test.js@@ -32,7 +32,7 @@ describe('diagnoseStall', () => {it('reports a wallet too thin to fund the safety simulation', () => {const d = diagnoseStall({ strategy: healthy, balanceSol: MIN_WALLET_SOL - 0.001 });expect(d).toMatchObject({ code: 'wallet_dry', blocking: true });- expect(d.message).toMatch(/0\.007/);+ expect(d.message).toContain((MIN_WALLET_SOL - 0.001).toFixed(4));});it('leaves a funded wallet alone', () => {diff --git a/workers/agent-sniper/executor.js b/workers/agent-sniper/executor.jsindex a1cb39fbf..f461473fe 100644--- a/workers/agent-sniper/executor.js+++ b/workers/agent-sniper/executor.js@@ -19,7 +19,7 @@ import {getSpendLimits, enforceSpendLimit, SpendLimitError, recordSpend, lamportsToUsd,checkConcurrency, checkDailyBudgetLamports, checkSolHeadroom, checkPriceImpact,checkDailyLoss, recordCustodyEvent,- SOL_FEE_HEADROOM_LAMPORTS,+ ENTRY_HEADROOM_LAMPORTS,} from '../../api/_lib/agent-trade-guards.js';import { shouldGiveUpReconcile } from './exit-logic.js';import { buildAmmSellInstructions, quoteAmmBuy, buildAmmBuyInstructions } from './amm-exit.js';@@ -28,17 +28,6 @@ import { assessTradeSafety, recordFirewallDecision, criticalFirewallReason } froimport { recordDecision } from '../../api/_lib/reasoning-ledger.js';import { screenPush } from './screen-push.js';-// SOL an entry must leave behind, on top of the buy itself, for the transaction to-// survive: the shared fee headroom PLUS the rent-exempt minimum of the token ATA the-// buy opens (2_039_280 lamports for an SPL token account) PLUS room for the priority-// fee and an MEV tip. The shared 0.003 SOL floor alone is thinner than the ATA rent,-// so a trade clamped to `balance - 0.003` could clear the guard and then die in the-// pre-broadcast simulation (SIM_FAILED) or never land (EXEC_EXHAUSTED) — the residual-// failure mix on the thin arms. Sniper-local on purpose: the discretionary trade path-// spends from wallets that are not sized to the lamport.-const ATA_RENT_LAMPORTS = 2_039_280n;-const ENTRY_HEADROOM_LAMPORTS = SOL_FEE_HEADROOM_LAMPORTS + ATA_RENT_LAMPORTS + 1_000_000n;-// Self-rated conviction for a snipe entry, 0..1. Lower price impact and a clean// firewall verdict raise it; a warned verdict and heavy impact lower it. This is// the prediction the Reasoning Ledger later scores for calibration — does an