Skip to content

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.

feat: shared ibm.css + hub markup test; IBM galaxy/index/oracle polish

nirholase57fa1897d5b
diff --git a/pages/ibm/galaxy.html b/pages/ibm/galaxy.html
index eb87951e2..5472b5b74 100644
--- a/pages/ibm/galaxy.html
+++ b/pages/ibm/galaxy.html
@@ -16,18 +16,9 @@
<meta name="twitter:description" content="A 3D constellation of AI agents positioned by IBM Granite embeddings on watsonx.ai." />
<meta name="twitter:image" content="https://three.ws/ibm-og.png" />
<link rel="icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/ibm.css" />
<style>
- :root {
- color-scheme: dark;
- --bg:#05070d; --panel:rgba(14,18,28,0.84); --panel-solid:#0d1118;
- --panel-hover:rgba(20,26,40,0.92);
- --border:rgba(255,255,255,0.09); --border-hi:rgba(255,255,255,0.18);
- --text:#e9edf6; --muted:#7a8499; --muted2:#5a6478;
- --ibm:#0f62fe; --ibm-light:#78a9ff; --ibm-glow:rgba(15,98,254,0.22);
- --green:#42be65; --amber:#f1c21b;
- --shadow:0 20px 60px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.3);
- --radius-sm:8px; --radius:12px; --radius-lg:16px;
- }
+ /* Design tokens come from the shared system: /ibm.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
diff --git a/pages/ibm/index.html b/pages/ibm/index.html
index 15d96cafd..7203ac247 100644
--- a/pages/ibm/index.html
+++ b/pages/ibm/index.html
@@ -19,8 +19,9 @@
<meta name="twitter:image" content="https://three.ws/ibm-og.png" />
<link rel="icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/ibm.css" />
<style>
- :root { color-scheme: dark; --accent:#ffffff; --accent2:#cccccc; --border:#222222; --bg:#000000; --panel:#141414; --panel2:#1a1a1a; --text:#e8e8f0; --muted:#888888; --green:#22c55e; --ibm:#0f62fe; --ibm-light:#78a9ff; }
+ /* Design tokens come from the shared system: /ibm.css */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 16px/1.6 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; }
@@ -37,7 +38,7 @@
.partner-badge strong { color: var(--text); font-weight: 500; }
h1 { font-size: clamp(36px, 6vw, 56px); letter-spacing: -0.03em; line-height: 1.05; font-weight: 600; margin-bottom: 20px; }
- h1 .gradient { background: linear-gradient(110deg, var(--ibm-light) 25%, var(--ibm) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
+ .gradient { background: linear-gradient(110deg, var(--ibm-light) 25%, var(--ibm) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--muted); line-height: 1.55; max-width: 640px; margin-bottom: 40px; }
.lede strong { color: var(--text); font-weight: 500; }
@@ -88,6 +89,18 @@
.disclaimer { font-size: 12px; color: var(--muted); margin-top: 60px; line-height: 1.55; max-width: 700px; }
+ /* Demo feature cards — unique background gradient is the only per-card inline style */
+ .demo-card { display: block; text-decoration: none; color: inherit; margin-bottom: 80px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--card-bg, var(--panel)); position: relative; transition: border-color .2s, transform .2s; outline: none; }
+ .demo-card:hover, .demo-card:focus-visible { border-color: rgba(120,169,255,0.45); transform: translateY(-2px); }
+ .demo-card:focus-visible { outline: 2px solid var(--ibm-light); outline-offset: 3px; }
+ .card-body { padding: 30px 30px 32px; }
+ .card-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ibm-light); background: rgba(15,98,254,0.12); border: 1px solid rgba(120,169,255,0.25); border-radius: 99px; padding: 5px 12px; margin-bottom: 16px; }
+ .card-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot-color, var(--ibm)); box-shadow: 0 0 10px var(--dot-color, var(--ibm)); flex-shrink: 0; }
+ .card-h { font-size: clamp(24px,3.5vw,32px); letter-spacing: -0.02em; line-height: 1.15; font-weight: 600; margin-bottom: 12px; }
+ .card-p { color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 620px; margin-bottom: 22px; }
+ .card-p strong { color: var(--text); font-weight: 500; }
+ .card-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--ibm); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 20px; border-radius: 11px; }
+
@media (max-width: 720px) {
.platform-grid { grid-template-columns: 1fr; }
main { padding: 56px 20px 96px; }
@@ -146,108 +159,87 @@
</a>
</div>
- <a href="/ibm/galaxy" style="display:block;text-decoration:none;color:inherit;margin-bottom:80px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:radial-gradient(900px 360px at 80% -20%, rgba(15,98,254,0.18), transparent 60%), linear-gradient(180deg,#0a0e18,#0c1020);position:relative;transition:border-color .2s, transform .2s;" onmouseover="this.style.borderColor='rgba(120,169,255,0.45)';this.style.transform='translateY(-2px)'" onmouseout="this.style.borderColor='var(--border)';this.style.transform='none'">
- <div style="padding:30px 30px 32px;">
- <div style="display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#78a9ff;background:rgba(15,98,254,0.12);border:1px solid rgba(120,169,255,0.25);border-radius:99px;padding:5px 12px;margin-bottom:16px;">
- <span style="width:7px;height:7px;border-radius:50%;background:#0f62fe;box-shadow:0 0 10px #0f62fe;"></span>
+ <a href="/ibm/galaxy" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 80% -20%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <div class="card-body">
+ <div class="card-tag">
+ <span class="card-dot" style="--dot-color:#0f62fe"></span>
Live demo · Granite embeddings
</div>
- <h2 style="font-size:clamp(24px,3.5vw,32px);letter-spacing:-0.02em;line-height:1.15;font-weight:600;margin-bottom:12px;">Explore the Agent Galaxy</h2>
- <p style="color:var(--muted);font-size:16px;line-height:1.55;max-width:620px;margin-bottom:22px;">Every public three.ws agent embedded with IBM&nbsp;Granite on watsonx.ai and projected into an explorable 3D constellation. Agents that mean similar things cluster together — and Granite <em>names</em> every theme. Search in plain language, like &ldquo;a witty Solana trading assistant,&rdquo; and the camera flies to what you actually mean.</p>
- <span style="display:inline-flex;align-items:center;gap:8px;background:#0f62fe;color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:11px;">
- Enter the galaxy
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
- </span>
+ <h2 class="card-h">Explore the Agent Galaxy</h2>
+ <p class="card-p">Every public three.ws agent embedded with IBM&nbsp;Granite on watsonx.ai and projected into an explorable 3D constellation. Agents that mean similar things cluster together — and Granite <em>names</em> every theme. Search in plain language, like &ldquo;a witty Solana trading assistant,&rdquo; and the camera flies to what you actually mean.</p>
+ <span class="card-cta">Enter the galaxy <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg></span>
</div>
</a>
- <a href="/ibm/oracle" style="display:block;text-decoration:none;color:inherit;margin-bottom:80px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:radial-gradient(900px 360px at 20% -20%, rgba(66,190,101,0.16), transparent 60%), radial-gradient(700px 320px at 90% 120%, rgba(15,98,254,0.18), transparent 60%), linear-gradient(180deg,#0a0e18,#0c1020);position:relative;transition:border-color .2s, transform .2s;" onmouseover="this.style.borderColor='rgba(120,169,255,0.45)';this.style.transform='translateY(-2px)'" onmouseout="this.style.borderColor='var(--border)';this.style.transform='none'">
- <div style="padding:30px 30px 32px;">
- <div style="display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#78a9ff;background:rgba(15,98,254,0.12);border:1px solid rgba(120,169,255,0.25);border-radius:99px;padding:5px 12px;margin-bottom:16px;">
- <span style="width:7px;height:7px;border-radius:50%;background:#42be65;box-shadow:0 0 10px #42be65;"></span>
+ <a href="/ibm/oracle" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 20% -20%,rgba(66,190,101,0.16),transparent 60%),radial-gradient(700px 320px at 90% 120%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <div class="card-body">
+ <div class="card-tag">
+ <span class="card-dot" style="--dot-color:#42be65"></span>
Live demo · Granite TimeSeries
</div>
- <h2 style="font-size:clamp(24px,3.5vw,32px);letter-spacing:-0.02em;line-height:1.15;font-weight:600;margin-bottom:12px;">Consult the Granite Oracle</h2>
- <p style="color:var(--muted);font-size:16px;line-height:1.55;max-width:620px;margin-bottom:22px;">Point IBM&nbsp;Granite TimeSeries at a live Solana token and watch it forecast the next four days of price as a glowing 3D cone. An embodied agent narrates the call in a Granite voice, and IBM&nbsp;Granite Guardian governs every word it speaks. Real watsonx.ai, real on-chain candles, zero mock data.</p>
- <span style="display:inline-flex;align-items:center;gap:8px;background:#0f62fe;color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:11px;">
- Run a forecast
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
- </span>
+ <h2 class="card-h">Consult the Granite Oracle</h2>
+ <p class="card-p">Point IBM&nbsp;Granite TimeSeries at a live Solana token and watch it forecast the next four days of price as a glowing 3D cone. An embodied agent narrates the call in a Granite voice, and IBM&nbsp;Granite Guardian governs every word it speaks. Real watsonx.ai, real on-chain candles, zero mock data.</p>
+ <span class="card-cta">Run a forecast <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg></span>
</div>
</a>
- <a href="/ibm/twin" style="display:block;text-decoration:none;color:inherit;margin-bottom:80px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:radial-gradient(900px 360px at 22% -20%, rgba(120,169,255,0.20), transparent 60%), radial-gradient(720px 320px at 88% 120%, rgba(66,190,101,0.14), transparent 60%), linear-gradient(180deg,#0a0e18,#0c1020);position:relative;transition:border-color .2s, transform .2s;" onmouseover="this.style.borderColor='rgba(120,169,255,0.45)';this.style.transform='translateY(-2px)'" onmouseout="this.style.borderColor='var(--border)';this.style.transform='none'">
- <div style="padding:30px 30px 32px;">
- <div style="display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#78a9ff;background:rgba(15,98,254,0.12);border:1px solid rgba(120,169,255,0.25);border-radius:99px;padding:5px 12px;margin-bottom:16px;">
- <span style="width:7px;height:7px;border-radius:50%;background:#78a9ff;box-shadow:0 0 10px #78a9ff;"></span>
+ <a href="/ibm/twin" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 22% -20%,rgba(120,169,255,0.20),transparent 60%),radial-gradient(720px 320px at 88% 120%,rgba(66,190,101,0.14),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <div class="card-body">
+ <div class="card-tag">
+ <span class="card-dot" style="--dot-color:#78a9ff"></span>
Live demo · Granite TimeSeries + Guardian
</div>
- <h2 style="font-size:clamp(24px,3.5vw,32px);letter-spacing:-0.02em;line-height:1.15;font-weight:600;margin-bottom:12px;">Spawn a Digital Twin</h2>
- <p style="color:var(--muted);font-size:16px;line-height:1.55;max-width:620px;margin-bottom:22px;">A living virtual replica of a real Solana market. It mirrors its on-chain vitals in real time — a core that breathes with its heartbeat and churns with its volatility — while IBM&nbsp;Granite TimeSeries projects its future. The twin <em>back-tests itself against reality</em> so you can trust the model, then lets you run real what-if simulations: shock demand, change the volatility regime, reverse momentum, and watch Granite re-forecast the trajectory. Every word it speaks is governed by Granite&nbsp;Guardian.</p>
- <span style="display:inline-flex;align-items:center;gap:8px;background:#0f62fe;color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:11px;">
- Spawn the twin
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
- </span>
+ <h2 class="card-h">Spawn a Digital Twin</h2>
+ <p class="card-p">A living virtual replica of a real Solana market. It mirrors its on-chain vitals in real time — a core that breathes with its heartbeat and churns with its volatility — while IBM&nbsp;Granite TimeSeries projects its future. The twin <em>back-tests itself against reality</em> so you can trust the model, then lets you run real what-if simulations: shock demand, change the volatility regime, reverse momentum, and watch Granite re-forecast the trajectory. Every word it speaks is governed by Granite&nbsp;Guardian.</p>
+ <span class="card-cta">Spawn the twin <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg></span>
</div>
</a>
- <a href="/ibm/trust-layer" style="display:block;text-decoration:none;color:inherit;margin-bottom:80px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:radial-gradient(820px 360px at 18% -20%, rgba(250,77,86,0.16), transparent 60%), radial-gradient(760px 320px at 92% 120%, rgba(15,98,254,0.20), transparent 60%), linear-gradient(180deg,#0a0e18,#0c1020);position:relative;transition:border-color .2s, transform .2s;" onmouseover="this.style.borderColor='rgba(120,169,255,0.45)';this.style.transform='translateY(-2px)'" onmouseout="this.style.borderColor='var(--border)';this.style.transform='none'">
- <div style="padding:30px 30px 32px;">
- <div style="display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#78a9ff;background:rgba(15,98,254,0.12);border:1px solid rgba(120,169,255,0.25);border-radius:99px;padding:5px 12px;margin-bottom:16px;">
- <span style="width:7px;height:7px;border-radius:50%;background:#fa4d56;box-shadow:0 0 10px #fa4d56;"></span>
+ <a href="/ibm/trust-layer" class="demo-card" style="--card-bg:radial-gradient(820px 360px at 18% -20%,rgba(250,77,86,0.16),transparent 60%),radial-gradient(760px 320px at 92% 120%,rgba(15,98,254,0.20),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <div class="card-body">
+ <div class="card-tag">
+ <span class="card-dot" style="--dot-color:#fa4d56"></span>
Live demo · Granite Guardian
</div>
- <h2 style="font-size:clamp(24px,3.5vw,32px);letter-spacing:-0.02em;line-height:1.15;font-weight:600;margin-bottom:12px;">Watch the Trust Layer govern</h2>
- <p style="color:var(--muted);font-size:16px;line-height:1.55;max-width:620px;margin-bottom:22px;">This agent thinks on IBM&nbsp;Granite and holds its own Solana wallet — so before it acts, <strong style="color:var(--text);font-weight:500;">IBM&nbsp;Granite&nbsp;Guardian</strong> on watsonx.ai classifies every request across jailbreak, harm, bias and more, and gates autonomous SOL sends in real time. Each verdict lands in a hash-chained audit ledger you can re-verify in your own browser. Try to jailbreak it or drain the wallet — and watch it get held.</p>
- <span style="display:inline-flex;align-items:center;gap:8px;background:#0f62fe;color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:11px;">
- Open the Trust Layer
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
- </span>
+ <h2 class="card-h">Watch the Trust Layer govern</h2>
+ <p class="card-p">This agent thinks on IBM&nbsp;Granite and holds its own Solana wallet — so before it acts, <strong>IBM&nbsp;Granite&nbsp;Guardian</strong> on watsonx.ai classifies every request across jailbreak, harm, bias and more, and gates autonomous SOL sends in real time. Each verdict lands in a hash-chained audit ledger you can re-verify in your own browser. Try to jailbreak it or drain the wallet — and watch it get held.</p>
+ <span class="card-cta">Open the Trust Layer <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg></span>
</div>
</a>
- <a href="/ibm/identity" style="display:block;text-decoration:none;color:inherit;margin-bottom:80px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:radial-gradient(840px 360px at 80% -20%, rgba(66,190,101,0.16), transparent 60%), radial-gradient(760px 320px at 10% 120%, rgba(15,98,254,0.20), transparent 60%), linear-gradient(180deg,#0a0e18,#0c1020);position:relative;transition:border-color .2s, transform .2s;" onmouseover="this.style.borderColor='rgba(120,169,255,0.45)';this.style.transform='translateY(-2px)'" onmouseout="this.style.borderColor='var(--border)';this.style.transform='none'">
- <div style="padding:30px 30px 32px;">
- <div style="display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#78a9ff;background:rgba(15,98,254,0.12);border:1px solid rgba(120,169,255,0.25);border-radius:99px;padding:5px 12px;margin-bottom:16px;">
- <span style="width:7px;height:7px;border-radius:50%;background:#42be65;box-shadow:0 0 10px #42be65;"></span>
+ <a href="/ibm/identity" class="demo-card" style="--card-bg:radial-gradient(840px 360px at 80% -20%,rgba(66,190,101,0.16),transparent 60%),radial-gradient(760px 320px at 10% 120%,rgba(15,98,254,0.20),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <div class="card-body">
+ <div class="card-tag">
+ <span class="card-dot" style="--dot-color:#42be65"></span>
Live demo · Granite embeddings + Guardian
</div>
- <h2 style="font-size:clamp(24px,3.5vw,32px);letter-spacing:-0.02em;line-height:1.15;font-weight:600;margin-bottom:12px;">Stop agent impersonation — the Granite&nbsp;Identity&nbsp;Firewall</h2>
- <p style="color:var(--muted);font-size:16px;line-height:1.55;max-width:620px;margin-bottom:22px;">Every three.ws agent holds a wallet and earns on-chain reputation, so cloning a trusted one is a real attack. Before an identity is born, <strong style="color:var(--text);font-weight:500;">IBM&nbsp;Granite embeddings</strong> cosine-compare it against every public agent to catch look-alikes a name match would miss, and <strong style="color:var(--text);font-weight:500;">IBM&nbsp;Granite&nbsp;Guardian</strong> screens the name, bio and persona for harmful content. Try to clone an agent — and watch it get blocked.</p>
- <span style="display:inline-flex;align-items:center;gap:8px;background:#0f62fe;color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:11px;">
- Open the Identity Firewall
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
- </span>
+ <h2 class="card-h">Stop agent impersonation — the Granite&nbsp;Identity&nbsp;Firewall</h2>
+ <p class="card-p">Every three.ws agent holds a wallet and earns on-chain reputation, so cloning a trusted one is a real attack. Before an identity is born, <strong>IBM&nbsp;Granite embeddings</strong> cosine-compare it against every public agent to catch look-alikes a name match would miss, and <strong>IBM&nbsp;Granite&nbsp;Guardian</strong> screens the name, bio and persona for harmful content. Try to clone an agent — and watch it get blocked.</p>
+ <span class="card-cta">Open the Identity Firewall <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg></span>
</div>
</a>
- <a href="/ibm/proof" style="display:block;text-decoration:none;color:inherit;margin-bottom:80px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:radial-gradient(880px 360px at 82% -20%, rgba(120,169,255,0.18), transparent 60%), radial-gradient(700px 320px at 8% 120%, rgba(66,190,101,0.14), transparent 60%), linear-gradient(180deg,#0a0e18,#0b1222);position:relative;transition:border-color .2s, transform .2s;" onmouseover="this.style.borderColor='rgba(120,169,255,0.45)';this.style.transform='translateY(-2px)'" onmouseout="this.style.borderColor='var(--border)';this.style.transform='none'">
- <div style="padding:30px 30px 32px;">
- <div style="display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#78a9ff;background:rgba(15,98,254,0.12);border:1px solid rgba(120,169,255,0.25);border-radius:99px;padding:5px 12px;margin-bottom:16px;">
- <span style="width:7px;height:7px;border-radius:50%;background:#0f62fe;box-shadow:0 0 10px #0f62fe;"></span>
+ <a href="/ibm/proof" class="demo-card" style="--card-bg:radial-gradient(880px 360px at 82% -20%,rgba(120,169,255,0.18),transparent 60%),radial-gradient(700px 320px at 8% 120%,rgba(66,190,101,0.14),transparent 60%),linear-gradient(180deg,#0a0e18,#0b1222)">
+ <div class="card-body">
+ <div class="card-tag">
+ <span class="card-dot" style="--dot-color:#0f62fe"></span>
Live demo · Granite TimeSeries + Guardian + Solana
</div>
- <h2 style="font-size:clamp(24px,3.5vw,32px);letter-spacing:-0.02em;line-height:1.15;font-weight:600;margin-bottom:12px;">Auditable AI on a public ledger — Granite&nbsp;Proof</h2>
- <p style="color:var(--muted);font-size:16px;line-height:1.55;max-width:620px;margin-bottom:22px;">A 3D agent forecasts a live market with <strong style="color:var(--text);font-weight:500;">IBM&nbsp;Granite TimeSeries</strong>, <strong style="color:var(--text);font-weight:500;">IBM&nbsp;Granite&nbsp;Guardian</strong> governs every word it says, and each governed forecast is <em>notarized on Solana</em> — a SHA-256 proof signed by the agent's own wallet, timestamped forever. If Guardian flags the statement, the agent refuses to sign. Trust you can verify on-chain.</p>
- <span style="display:inline-flex;align-items:center;gap:8px;background:#0f62fe;color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:11px;">
- Open Granite Proof
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
- </span>
+ <h2 class="card-h">Auditable AI on a public ledger — Granite&nbsp;Proof</h2>
+ <p class="card-p">A 3D agent forecasts a live market with <strong>IBM&nbsp;Granite TimeSeries</strong>, <strong>IBM&nbsp;Granite&nbsp;Guardian</strong> governs every word it says, and each governed forecast is <em>notarized on Solana</em> — a SHA-256 proof signed by the agent's own wallet, timestamped forever. If Guardian flags the statement, the agent refuses to sign. Trust you can verify on-chain.</p>
+ <span class="card-cta">Open Granite Proof <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg></span>
</div>
</a>
- <a href="/ibm/vision" style="display:block;text-decoration:none;color:inherit;margin-bottom:80px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:radial-gradient(900px 360px at 78% -20%, rgba(165,110,255,0.18), transparent 60%), radial-gradient(720px 320px at 10% 120%, rgba(15,98,254,0.18), transparent 60%), linear-gradient(180deg,#0a0e18,#0c1020);position:relative;transition:border-color .2s, transform .2s;" onmouseover="this.style.borderColor='rgba(120,169,255,0.45)';this.style.transform='translateY(-2px)'" onmouseout="this.style.borderColor='var(--border)';this.style.transform='none'">
- <div style="padding:30px 30px 32px;">
- <div style="display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#78a9ff;background:rgba(15,98,254,0.12);border:1px solid rgba(120,169,255,0.25);border-radius:99px;padding:5px 12px;margin-bottom:16px;">
- <span style="width:7px;height:7px;border-radius:50%;background:#a56eff;box-shadow:0 0 10px #a56eff;"></span>
+ <a href="/ibm/vision" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 78% -20%,rgba(165,110,255,0.18),transparent 60%),radial-gradient(720px 320px at 10% 120%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <div class="card-body">
+ <div class="card-tag">
+ <span class="card-dot" style="--dot-color:#a56eff"></span>
Live demo · Granite Vision (multimodal)
</div>
- <h2 style="font-size:clamp(24px,3.5vw,32px);letter-spacing:-0.02em;line-height:1.15;font-weight:600;margin-bottom:12px;">AI that sees your AI — <span class="gradient">Granite Vision</span></h2>
- <p style="color:var(--muted);font-size:16px;line-height:1.55;max-width:620px;margin-bottom:22px;">Show <strong style="color:var(--text);font-weight:500;">IBM&nbsp;Granite&nbsp;Vision</strong> on watsonx.ai a three.ws 3D avatar and watch it <em>read the look</em> — appearance, vibe, personality, a name, a bio, even a fitting voice — turning a rendered face into a complete agent identity in one multimodal call. Capture any pose, or upload your own image. Real vision inference, zero mock data.</p>
- <span style="display:inline-flex;align-items:center;gap:8px;background:#0f62fe;color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:11px;">
- Let Granite look
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
- </span>
+ <h2 class="card-h">AI that sees your AI — <span class="gradient">Granite Vision</span></h2>
+ <p class="card-p">Show <strong>IBM&nbsp;Granite&nbsp;Vision</strong> on watsonx.ai a three.ws 3D avatar and watch it <em>read the look</em> — appearance, vibe, personality, a name, a bio, even a fitting voice — turning a rendered face into a complete agent identity in one multimodal call. Capture any pose, or upload your own image. Real vision inference, zero mock data.</p>
+ <span class="card-cta">Let Granite look <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg></span>
</div>
</a>
diff --git a/pages/ibm/oracle.html b/pages/ibm/oracle.html
index 64649ebca..6cc4a25b0 100644
--- a/pages/ibm/oracle.html
+++ b/pages/ibm/oracle.html
@@ -23,18 +23,9 @@
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/ibm.css" />
<style>
- :root {
- --ibm-blue: #0f62fe;
- --ibm-blue-2: #4589ff;
- --up: #42be65;
- --down: #fa4d56;
- --ink: #f4f4f4;
- --muted: #a6b0c3;
- --panel: rgba(13, 17, 28, 0.62);
- --stroke: rgba(120, 169, 255, 0.22);
- --font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
- }
+ /* Design tokens come from the shared system: /ibm.css */
* {
box-sizing: border-box;
}
diff --git a/pages/ibm/twin.html b/pages/ibm/twin.html
index 8c2b41ca7..1802e8ca1 100644
--- a/pages/ibm/twin.html
+++ b/pages/ibm/twin.html
@@ -23,21 +23,9 @@
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/ibm.css" />
<style>
- :root {
- --ibm-blue: #0f62fe;
- --ibm-blue-2: #4589ff;
- --ibm-blue-3: #78a9ff;
- --up: #42be65;
- --down: #fa4d56;
- --warn: #f1c21b;
- --ink: #f4f4f4;
- --muted: #a6b0c3;
- --panel: rgba(13, 17, 28, 0.62);
- --panel-2: rgba(13, 17, 28, 0.82);
- --stroke: rgba(120, 169, 255, 0.22);
- --font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
- }
+ /* Design tokens come from the shared system: /ibm.css */
* {
box-sizing: border-box;
}
diff --git a/public/ibm.css b/public/ibm.css
new file mode 100644
index 000000000..602882a8a
--- /dev/null
+++ b/public/ibm.css
@@ -0,0 +1,332 @@
+/* =============================================================================
+ ibm.css — the three.ws × IBM design system
+ Single source of truth for the /ibm showcase surface.
+
+ Why this file exists: every /ibm page had its own :root with the same IBM
+ Carbon colors spelled eight different ways (--ibm / --ibm-blue, --up / --allow
+ / --green, etc.). That drift is why the pages looked like eight sites. This
+ file defines the canonical tokens ONCE and aliases every legacy name to them,
+ so a page only has to link this file and delete its local :root — no var()
+ rewrites. Tune the look here and it changes everywhere.
+
+ Usage in a page <head>:
+ <link rel="stylesheet" href="/ibm.css" />
+ then remove that page's local `:root { ... }` token block.
+
+ Palette is IBM Carbon: Blue 60 #0f62fe, Blue 50 #4589ff, Blue 40 #78a9ff,
+ Green 50 #42be65, Red 50 #fa4d56, Yellow 30 #f1c21b.
+ ============================================================================= */
+
+:root {
+ color-scheme: dark;
+
+ /* ---- Canonical tokens ------------------------------------------------- */
+
+ /* Surfaces */
+ --ibm-bg: #05070d; /* page background */
+ --ibm-panel: rgba(16, 20, 30, 0.80); /* translucent card/panel */
+ --ibm-panel-solid: #0d111c; /* opaque panel */
+ --ibm-panel-2: #11161f; /* nested / raised panel */
+ --ibm-panel-hover: rgba(28, 34, 50, 0.92); /* panel hover */
+
+ /* Lines */
+ --ibm-border: rgba(255, 255, 255, 0.10);
+ --ibm-border-hi: rgba(255, 255, 255, 0.18);
+
+ /* Type colors */
+ --ibm-text: #e9edf6;
+ --ibm-muted: #8b93a7;
+ --ibm-muted-2: #5a6478;
+ --ibm-faint: #5a6376;
+
+ /* IBM Carbon blues */
+ --ibm-blue: #0f62fe;
+ --ibm-blue-2: #4589ff;
+ --ibm-blue-light: #78a9ff;
+ --ibm-blue-dim: rgba(15, 98, 254, 0.12);
+ --ibm-blue-glow: rgba(15, 98, 254, 0.22);
+ --ibm-stroke: rgba(120, 169, 255, 0.22);
+
+ /* Semantic (status / market direction / governance) */
+ --ibm-green: #42be65; /* up · allow · ok */
+ --ibm-red: #fa4d56; /* down · block · error */
+ --ibm-amber: #f1c21b; /* warn · review */
+
+ /* Radii */
+ --ibm-radius-sm: 9px;
+ --ibm-radius-md: 12px;
+ --ibm-radius-lg: 16px;
+ --ibm-radius-pill: 999px;
+
+ /* Elevation */
+ --ibm-shadow: 0 20px 56px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
+
+ /* Spacing scale */
+ --ibm-space-1: 4px;
+ --ibm-space-2: 8px;
+ --ibm-space-3: 12px;
+ --ibm-space-4: 16px;
+ --ibm-space-5: 24px;
+ --ibm-space-6: 32px;
+ --ibm-space-7: 48px;
+
+ /* Motion */
+ --ibm-ease: cubic-bezier(0.4, 0.14, 0.3, 1);
+ --ibm-dur-fast: 0.15s;
+ --ibm-dur: 0.24s;
+
+ /* Type families */
+ --ibm-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
+ --ibm-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
+
+ /* ---- Back-compat aliases --------------------------------------------- *
+ * Every legacy spelling found across the /ibm pages maps to a canonical
+ * token above. This is what lets a page drop its local :root with zero
+ * var() rewrites. Add a new alias here rather than re-defining a token. */
+
+ --bg: var(--ibm-bg);
+ --panel: var(--ibm-panel);
+ --panel-solid: var(--ibm-panel-solid);
+ --panel-2: var(--ibm-panel-2);
+ --panel2: var(--ibm-panel-2);
+ --panel-hover: var(--ibm-panel-hover);
+
+ --border: var(--ibm-border);
+ --border2: var(--ibm-border-hi);
+ --border-hi: var(--ibm-border-hi);
+ --border-strong: var(--ibm-border-hi);
+ --line: var(--ibm-border);
+ --stroke: var(--ibm-stroke);
+
+ --text: var(--ibm-text);
+ --ink: var(--ibm-text);
+ --accent: #ffffff;
+ --accent2: #cccccc;
+ --muted: var(--ibm-muted);
+ --muted2: var(--ibm-muted-2);
+ --faint: var(--ibm-faint);
+
+ --ibm: var(--ibm-blue);
+ --ibm-blue-1: var(--ibm-blue);
+ --ibm-blue-3: var(--ibm-blue-light);
+ --ibm-light: var(--ibm-blue-light);
+ --ibm-lt: var(--ibm-blue-light);
+ --ibm-dim: var(--ibm-blue-dim);
+ --ibm-glow: var(--ibm-blue-glow);
+
+ --green: var(--ibm-green);
+ --up: var(--ibm-green);
+ --allow: var(--ibm-green);
+ --down: var(--ibm-red);
+ --block: var(--ibm-red);
+ --warn: var(--ibm-amber);
+ --review: var(--ibm-amber);
+ --amber: var(--ibm-amber);
+
+ --radius: var(--ibm-radius-md);
+ --radius-sm: var(--ibm-radius-sm);
+ --radius-md: var(--ibm-radius-md);
+ --radius-lg: var(--ibm-radius-lg);
+ --shadow: var(--ibm-shadow);
+
+ --font: var(--ibm-font);
+ --mono: var(--ibm-mono);
+}
+
+/* =============================================================================
+ Base — safe defaults. Page-level inline <style> loads after this <link> and
+ wins at equal specificity, so these never fight a page's own rules.
+ ============================================================================= */
+
+.ibm-scope, body.ibm {
+ background: var(--ibm-bg);
+ color: var(--ibm-text);
+ font-family: var(--ibm-font);
+ -webkit-font-smoothing: antialiased;
+}
+
+/* =============================================================================
+ Components — prefixed `.ibm-` so they never collide with a page's existing
+ .btn / .chip / .panel classes. Use these for new UI (states, skeletons,
+ badges) and going forward as the standard primitives.
+ ============================================================================= */
+
+/* Buttons ------------------------------------------------------------------ */
+.ibm-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--ibm-space-2);
+ padding: 11px 18px;
+ border-radius: var(--ibm-radius-md);
+ border: 1px solid var(--ibm-border);
+ background: var(--ibm-panel-2);
+ color: var(--ibm-text);
+ font: 600 14px/1 var(--ibm-font);
+ text-decoration: none;
+ cursor: pointer;
+ transition: background var(--ibm-dur-fast) var(--ibm-ease),
+ border-color var(--ibm-dur-fast) var(--ibm-ease),
+ filter var(--ibm-dur-fast) var(--ibm-ease),
+ transform var(--ibm-dur-fast) var(--ibm-ease);
+}
+.ibm-btn:hover { background: var(--ibm-panel-hover); border-color: var(--ibm-border-hi); }
+.ibm-btn:active { transform: translateY(1px); }
+.ibm-btn[disabled], .ibm-btn[aria-disabled="true"] {
+ opacity: 0.5; cursor: not-allowed; pointer-events: none;
+}
+.ibm-btn--primary {
+ background: var(--ibm-blue);
+ border-color: transparent;
+ color: #fff;
+}
+.ibm-btn--primary:hover { background: var(--ibm-blue); filter: brightness(1.12); border-color: transparent; }
+.ibm-btn--ghost { background: transparent; }
+.ibm-btn--sm { padding: 7px 12px; font-size: 13px; }
+
+/* Chip --------------------------------------------------------------------- */
+.ibm-chip {
+ display: inline-flex; align-items: center; gap: 6px;
+ padding: 6px 12px;
+ border-radius: var(--ibm-radius-pill);
+ border: 1px solid var(--ibm-border);
+ background: var(--ibm-panel-2);
+ color: var(--ibm-muted);
+ font: 500 12px/1 var(--ibm-font);
+ cursor: pointer;
+ transition: color var(--ibm-dur-fast) var(--ibm-ease),
+ border-color var(--ibm-dur-fast) var(--ibm-ease),
+ background var(--ibm-dur-fast) var(--ibm-ease);
+}
+.ibm-chip:hover, .ibm-chip[aria-selected="true"] {
+ color: var(--ibm-text); border-color: var(--ibm-border-hi);
+}
+
+/* Card / panel ------------------------------------------------------------- */
+.ibm-card {
+ background: var(--ibm-panel);
+ border: 1px solid var(--ibm-border);
+ border-radius: var(--ibm-radius-lg);
+ box-shadow: var(--ibm-shadow);
+}
+
+/* Status badge (live / allow / review / block) ----------------------------- */
+.ibm-badge {
+ display: inline-flex; align-items: center; gap: 7px;
+ padding: 4px 11px;
+ border-radius: var(--ibm-radius-pill);
+ border: 1px solid var(--ibm-border);
+ font: 600 11px/1 var(--ibm-font);
+ letter-spacing: 0.04em; text-transform: uppercase;
+ color: var(--ibm-muted);
+}
+.ibm-badge .ibm-badge__dot {
+ width: 7px; height: 7px; border-radius: 50%;
+ background: var(--ibm-blue); box-shadow: 0 0 10px var(--ibm-blue);
+}
+.ibm-badge--live { color: var(--ibm-blue-light); border-color: var(--ibm-stroke); }
+.ibm-badge--allow { color: var(--ibm-green); border-color: rgba(66,190,101,0.4); }
+.ibm-badge--allow .ibm-badge__dot { background: var(--ibm-green); box-shadow: 0 0 10px var(--ibm-green); }
+.ibm-badge--review { color: var(--ibm-amber); border-color: rgba(241,194,27,0.4); }
+.ibm-badge--review .ibm-badge__dot { background: var(--ibm-amber); box-shadow: 0 0 10px var(--ibm-amber); }
+.ibm-badge--block { color: var(--ibm-red); border-color: rgba(250,77,86,0.4); }
+.ibm-badge--block .ibm-badge__dot { background: var(--ibm-red); box-shadow: 0 0 10px var(--ibm-red); }
+
+/* Spinner ------------------------------------------------------------------ */
+.ibm-spinner {
+ display: inline-block;
+ width: 16px; height: 16px;
+ border: 2px solid var(--ibm-border-hi);
+ border-top-color: var(--ibm-blue-light);
+ border-radius: 50%;
+ animation: ibm-spin 0.7s linear infinite;
+ vertical-align: middle;
+}
+.ibm-spinner--lg { width: 28px; height: 28px; border-width: 3px; }
+@keyframes ibm-spin { to { transform: rotate(360deg); } }
+
+/* Skeleton (shimmer placeholder) ------------------------------------------- */
+.ibm-skeleton {
+ position: relative;
+ overflow: hidden;
+ border-radius: var(--ibm-radius-sm);
+ background: var(--ibm-panel-2);
+}
+.ibm-skeleton::after {
+ content: "";
+ position: absolute; inset: 0;
+ transform: translateX(-100%);
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
+ animation: ibm-shimmer 1.4s infinite;
+}
+@keyframes ibm-shimmer { 100% { transform: translateX(100%); } }
+.ibm-skeleton--text { height: 0.85em; margin: 0.35em 0; }
+.ibm-skeleton--line { height: 12px; }
+.ibm-skeleton--block { height: 120px; border-radius: var(--ibm-radius-md); }
+
+/* State blocks — loading / empty / error.
+ The fix for "blank panel / spinner-forever on 503". One designed, accessible
+ shell for every non-happy state, used identically across the surface. ------ */
+.ibm-state {
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
+ gap: var(--ibm-space-3);
+ text-align: center;
+ padding: var(--ibm-space-6) var(--ibm-space-5);
+ min-height: 160px;
+ color: var(--ibm-muted);
+}
+.ibm-state__icon {
+ width: 40px; height: 40px;
+ display: flex; align-items: center; justify-content: center;
+ border-radius: var(--ibm-radius-md);
+ background: var(--ibm-blue-dim);
+ border: 1px solid var(--ibm-stroke);
+ color: var(--ibm-blue-light);
+}
+.ibm-state__title { color: var(--ibm-text); font-size: 15px; font-weight: 600; }
+.ibm-state__body { font-size: 14px; line-height: 1.55; max-width: 42ch; }
+.ibm-state--error .ibm-state__icon {
+ background: rgba(250, 77, 86, 0.12);
+ border-color: rgba(250, 77, 86, 0.4);
+ color: var(--ibm-red);
+}
+.ibm-state__action { margin-top: var(--ibm-space-2); }
+
+/* Visually-hidden (screen-reader only) ------------------------------------- */
+.ibm-sr-only {
+ position: absolute !important;
+ width: 1px; height: 1px;
+ padding: 0; margin: -1px;
+ overflow: hidden; clip: rect(0, 0, 0, 0);
+ white-space: nowrap; border: 0;
+}
+
+/* =============================================================================
+ Accessibility — applies to every page that links this file.
+ ============================================================================= */
+
+/* A consistent, visible focus ring for keyboard users across the surface.
+ Pages that style their own :focus-visible win (loaded later); this is the
+ default so nothing is ever left without a focus indicator. */
+a:focus-visible,
+button:focus-visible,
+input:focus-visible,
+select:focus-visible,
+textarea:focus-visible,
+[tabindex]:focus-visible,
+.ibm-btn:focus-visible,
+.ibm-chip:focus-visible {
+ outline: 2px solid var(--ibm-blue-light);
+ outline-offset: 2px;
+ border-radius: 4px;
+}
+
+/* Honor reduced-motion globally — fixes every "animation ignores
+ prefers-reduced-motion" finding on the surface in one place. */
+@media (prefers-reduced-motion: reduce) {
+ *, *::before, *::after {
+ animation-duration: 0.001ms !important;
+ animation-iteration-count: 1 !important;
+ transition-duration: 0.001ms !important;
+ scroll-behavior: auto !important;
+ }
+}
diff --git a/tests/ibm-hub-markup.test.js b/tests/ibm-hub-markup.test.js
new file mode 100644
index 000000000..ec15f1738
--- /dev/null
+++ b/tests/ibm-hub-markup.test.js
@@ -0,0 +1,109 @@
+// tests/ibm-hub-markup.test.js
+// Guards the IBM hub page (pages/ibm/index.html) for two properties that are
+// impossible to eyeball reliably but trivial to check statically:
+//
+// 1. No inline JS event handlers on cards — hover must be CSS-only so
+// keyboard navigation (Tab → Enter) works and CSP can stay strict.
+// 2. No inline style= that duplicates what .demo-card / .card-* already
+// supplies — i.e. no `display:block`, `border-radius:18px`, etc. on the
+// anchor elements (the only allowed inline style is --card-bg / --dot-color).
+// 3. Every .demo-card links to an /ibm/* sub-page that exists on disk.
+// 4. Every card has the interior structure the CSS expects: .card-body,
+// .card-tag, .card-dot, .card-h, .card-p, .card-cta.
+// 5. Every .card-p > strong has no inline style (styled by .card-p strong rule).
+// 6. The .gradient class is used on h1 AND is usable on h2 (no h1-specific
+// selector like `h1 .gradient` that would break the Vision card title).
+
+import { readFileSync, existsSync } from 'node:fs';
+import { resolve, dirname } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { describe, it, expect } from 'vitest';
+
+const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
+const html = readFileSync(resolve(ROOT, 'pages/ibm/index.html'), 'utf8');
+
+// Minimal HTML tokeniser — finds every opening tag with its attributes.
+function findTags(src, tagName) {
+ const re = new RegExp(`<${tagName}(\\s[^>]*)?>`, 'gi');
+ const out = [];
+ for (const m of src.matchAll(re)) out.push(m[0]);
+ return out;
+}
+function attr(tag, name) {
+ const m = tag.match(new RegExp(`${name}=["']([^"']*)["']`, 'i'));
+ return m ? m[1] : null;
+}
+function hasAttr(tag, name) {
+ return new RegExp(`\\b${name}\\b`, 'i').test(tag);
+}
+
+const cards = findTags(html, 'a').filter((t) => /class=["'][^"']*demo-card/.test(t));
+
+describe('IBM hub page markup', () => {
+ it('has at least 7 demo cards', () => {
+ expect(cards.length).toBeGreaterThanOrEqual(7);
+ });
+
+ it('no card has an onmouseover or onmouseout handler', () => {
+ const offenders = cards.filter((t) => hasAttr(t, 'onmouseover') || hasAttr(t, 'onmouseout'));
+ expect(offenders, `cards with inline JS handlers: ${offenders.join('\n')}`).toHaveLength(0);
+ });
+
+ it('every card href links to an existing /ibm/* page', () => {
+ const missing = [];
+ for (const tag of cards) {
+ const href = attr(tag, 'href') || '';
+ if (!href.startsWith('/ibm/')) { missing.push(href); continue; }
+ const slug = href.replace('/ibm/', '');
+ const path = resolve(ROOT, `pages/ibm/${slug}.html`);
+ if (!existsSync(path)) missing.push(href);
+ }
+ expect(missing, `cards linking to non-existent pages: ${missing.join(', ')}`).toHaveLength(0);
+ });
+
+ it('card inline styles only set CSS custom properties (--card-bg / --dot-color)', () => {
+ const BAD = /(?:display|border-radius|overflow|position|transition|padding|margin-bottom)\s*:/;
+ const offenders = cards.filter((t) => {
+ const s = attr(t, 'style') || '';
+ return BAD.test(s);
+ });
+ expect(
+ offenders,
+ `cards with disallowed inline layout styles (should be in .demo-card CSS):\n${offenders.join('\n')}`,
+ ).toHaveLength(0);
+ });
+
+ it('card inner structure has required class elements', () => {
+ // Extract content between each card opening tag and the next </a>
+ const cardBlocks = [];
+ let pos = 0;
+ for (const tag of cards) {
+ const start = html.indexOf(tag, pos);
+ const end = html.indexOf('</a>', start);
+ cardBlocks.push(html.slice(start, end + 4));
+ pos = end;
+ }
+ const REQUIRED = ['card-body', 'card-tag', 'card-dot', 'card-h', 'card-p', 'card-cta'];
+ for (const block of cardBlocks) {
+ const href = (block.match(/href="([^"]*)"/) || [])[1] || '?';
+ for (const cls of REQUIRED) {
+ expect(block, `card ${href} is missing .${cls}`).toContain(`class="${cls}"`);
+ }
+ }
+ });
+
+ it('no strong inside .card-p has inline style (handled by CSS rule)', () => {
+ // Grab all <strong style=...> occurrences inside card-p paragraphs
+ const cardPBlocks = [...html.matchAll(/class="card-p"[^>]*>([\s\S]*?)<\/p>/g)].map((m) => m[1]);
+ for (const block of cardPBlocks) {
+ const strongs = [...block.matchAll(/<strong\s[^>]*style=/gi)];
+ expect(strongs, `<strong> inside .card-p should not have inline style`).toHaveLength(0);
+ }
+ });
+
+ it('stylesheet uses .gradient not h1 .gradient so Vision card h2 renders correctly', () => {
+ const styleBlock = (html.match(/<style>([\s\S]*?)<\/style>/) || [])[1] || '';
+ expect(styleBlock).not.toMatch(/\bh1\s+\.gradient\b/);
+ expect(styleBlock).toMatch(/(?:^|[^a-z])\.gradient\s*\{/m);
+ });
+});