Founder Council: seven AI advisors debate your decision in Claude Code

- /founder-council skill: three-round protocol, scoring, and verdict
- Seven seat agents with brains built from each expert's public work
- The room: a zero-dependency local app that plays councils live from sessions/
- Three example councils to watch before running your own

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nate HerkandClaude Opus 5.5 committed 2026-10-10 15:38:54 -05:00
commit 8a6b473934
143 files changed
+12244

No files matched your search

+675
View File
@@ -0,0 +1,675 @@
const $ = (s, r = document) => r.querySelector(s);
const $$ = (s, r = document) => [...r.querySelectorAll(s)];
const esc = (s) => String(s ?? "").replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }[c]));
const SAMPLES = [
["Raise my prices?", "I run a coaching business doing $30k a month with 15 active clients at $2,000 each. I want to raise the price to $3,500. Options: raise for everyone now, raise for new clients only, or keep $2,000. Close rate is about 50% on sales calls. I'm leaning toward raising for everyone because I'm underpaid."],
["First salesperson?", "I'm a solo founder of a B2B SaaS at $25k MRR growing 5% a month. I do every sales call myself (about 20 hours a week) and I'm burning out. Should I hire a full-time account executive at $120k base, hire a part-time commission-only closer, or keep selling myself for six more months? I have $150k in the bank."],
["Second product?", "My agency makes $80k a month building AI automations for dentists. A few clients asked for an AI receptionist product. Should I build the receptionist as a separate SaaS, offer it as an add-on to existing clients only, or stay focused on the agency? Team of 6, about $200k cash."],
["Quit my job?", "I make $180k a year at a tech company. My side business (a paid newsletter) makes $6k a month and grew 8% a month this year. I have 9 months of expenses saved. Should I quit now, quit in 6 months, or keep both and hire a writer?"],
];
const SHAPES = ["base", "open", "mid", "blink"];
const portrait = (key, shape = "base") => `/portraits/${key}-${shape}.webp`;
const ROUND_NAME = ["", "Opening", "Debate", "Vote"];
const state = {
seats: [], byKey: {}, session: null, options: [], weights: {}, active: [], round: 0,
cards: { 1: {}, 2: {}, 3: {} }, replaying: false, verdict: null, links: [], geo: {},
};
// ------------------------------------------------------------- boot
async function boot() {
const r = await fetch("/api/seats").then((x) => x.json());
state.seats = r.seats;
state.byKey = Object.fromEntries(r.seats.map((s) => [s.key, s]));
state.runner = r.runner;
if (r.runner === "api" && !r.hasKey) toast("No ANTHROPIC_API_KEY found in .env. Add it and restart the server.");
renderSeats();
renderSamples();
bindUI();
new ResizeObserver(() => { layoutStage(); drawLinks(); }).observe($("#stage"));
startBlinking();
reset();
typeIn($("#composer h2"));
typeIn($("#waiting h2"));
const ss = await fetch("/api/sessions").then((x) => x.json());
if (ss.running) attach(ss.running);
else if (ss.live) attach(ss.live);
refreshUsage();
setInterval(watchForLive, 2500);
}
// a council started in Claude Code shows up here on its own
const seenLive = new Set();
async function watchForLive() {
const ss = await fetch("/api/sessions").then((x) => x.json()).catch(() => null);
const id = ss?.live || ss?.running;
if (!id || seenLive.has(id) || id === state.session) return;
seenLive.add(id);
attach(id);
}
// AIS arrival: a heading types in a character at a time, blur to sharp
function typeIn(el) {
if (!el) return;
const text = el.textContent;
el.classList.add("typein");
el.innerHTML = [...text].map((c, i) => `<span class="ch" style="animation-delay:${i * 22}ms">${c === " " ? " " : esc(c)}</span>`).join("");
el.setAttribute("aria-label", text);
}
function renderSamples() {
$("#samples").innerHTML = SAMPLES.map(([t], i) => `<button type="button" data-i="${i}">${esc(t)}</button>`).join("");
$("#samples").addEventListener("click", (e) => {
const b = e.target.closest("button"); if (!b) return;
$("#prompt").value = SAMPLES[b.dataset.i][1];
$("#prompt").focus();
});
}
function renderSeats() {
$("#seats").innerHTML = state.seats.map((s) => `
<div class="seat" id="seat-${s.key}" data-seat="${s.key}" tabindex="0" role="button" aria-label="${esc(s.name)}, ${esc(s.pillar)}. Open card.">
<div class="think" aria-hidden="true"><i></i><i></i><i></i></div>
<div class="bust" data-shape="base">${SHAPES.map((sh) => `<img class="${sh}" src="${portrait(s.key, sh)}" alt="" draggable="false">`).join("")}</div>
</div>`).join("");
$("#plates").innerHTML = state.seats.map((s) => `
<div class="nameplate" id="plate-${s.key}" data-seat="${s.key}">
<b>${esc(s.short === "Gary V" ? "Gary V" : s.name)}</b>
<small>${esc(s.pillar)}</small>
<div class="meta"><span class="pips" title="Weight on this decision"></span><span class="chip" hidden></span><span class="score" hidden></span></div>
</div>`).join("");
layoutStage();
}
// The table is an ellipse seen from the front. Seats sit along its far edge: the
// middle seat is farthest (higher, smaller), the end seats nearest (lower, bigger).
function layoutStage() {
const stage = $("#stage");
const W = stage.clientWidth;
const narrow = matchMedia("(max-width: 820px)").matches;
const H = narrow ? Math.round(W * 0.62) : stage.clientHeight;
const cx = W / 2, cy = H * (narrow ? 0.98 : 0.9), rx = W * 0.48, ry = H * (narrow ? 0.46 : 0.42);
const t = $("#table");
Object.assign(t.style, { left: `${cx - rx}px`, top: `${cy - ry}px`, width: `${rx * 2}px`, height: `${ry * 2}px` });
const edge = (x) => cy - ry * Math.sqrt(Math.max(0, 1 - ((x - cx) / rx) ** 2));
const xs = [0.085, 0.222, 0.361, 0.5, 0.639, 0.778, 0.915];
state.seats.forEach((s, i) => {
const x = W * xs[i];
const d = ((x - cx) / rx) ** 2;
const size = H * (narrow ? 0.5 + 0.08 * d : 0.37 + 0.07 * d);
const bottom = edge(x) + size * 0.2;
const el = $(`#seat-${s.key}`);
Object.assign(el.style, { left: `${x - size / 2}px`, top: `${bottom - size}px`, width: `${size}px`, height: `${size}px`, zIndex: 10 + Math.round(d * 10) });
const pl = $(`#plate-${s.key}`);
pl.style.left = `${x}px`;
pl.style.top = `${edge(x) + H * 0.01}px`; // straddles the table edge, over the chest
state.geo[s.key] = { x, head: bottom - size * 0.72, top: bottom - size * 0.9, size };
});
const c = $("#center");
if (narrow) {
stage.style.paddingTop = `${H}px`; // the scene sits on top; captions flow below it
} else {
stage.style.paddingTop = "";
// the captions start below the lowest nameplate they could collide with
const inner = [1, 2, 3, 4, 5].map((i) => $(`#plate-${state.seats[i].key}`));
const top = Math.max(...inner.map((p) => p.offsetTop + p.offsetHeight / 2)) + H * 0.035;
Object.assign(c.style, { left: `${W * 0.2}px`, width: `${W * 0.6}px`, top: `${top}px`, height: `${H - top - H * 0.09}px` });
}
const sp = state.speaking ? state.geo[state.speaking] : null;
if (sp) moveSpot(state.speaking);
}
function moveSpot(key) {
const g = state.geo[key]; const spot = $("#spot");
if (!g) { spot.classList.remove("on"); return; }
spot.style.left = `${g.x}px`;
spot.style.top = `${g.head}px`;
spot.style.width = spot.style.height = `${g.size * 1.9}px`;
spot.classList.add("on");
}
function bindUI() {
$("#composer").addEventListener("submit", async (e) => {
e.preventDefault();
const prompt = $("#prompt").value.trim();
if (prompt.length < 10) return toast("Give the council a real decision, at least a sentence.");
const mode = $('input[name="mode"]:checked').value;
$("#convene").disabled = true;
const r = await fetch("/api/council", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ prompt, mode }) });
const j = await r.json();
$("#convene").disabled = false;
if (!r.ok) return toast(j.error || "Could not start the council.");
attach(j.id);
});
const openFrom = (e) => { const b = e.target.closest("[data-seat]"); if (b) openCard(b.dataset.seat); };
$("#seats").addEventListener("click", openFrom);
$("#plates").addEventListener("click", openFrom);
$("#seats").addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); openFrom(e); } });
$("#feed").addEventListener("click", (e) => { const c = e.target.closest(".feed-card"); if (c) openCard(c.dataset.seat, Number(c.dataset.round)); });
$("#waitHistory").addEventListener("click", openHistory);
$("#historyBtn").addEventListener("click", openHistory);
$("#newBtn").addEventListener("click", reset);
$("#verdictSheet").addEventListener("click", (e) => { if (e.target.id === "verdictSheet" || e.target.closest("[data-close]")) $("#verdictSheet").hidden = true; });
document.addEventListener("keydown", (e) => { if (e.key === "Escape") $("#verdictSheet").hidden = true; });
$$(".speed button").forEach((b) => b.addEventListener("click", () => {
player.speed = Number(b.dataset.speed);
$$(".speed button").forEach((x) => x.setAttribute("aria-pressed", String(x === b)));
}));
$("#skipBtn").addEventListener("click", () => player.skip());
}
// ------------------------------------------------------------- the player
// Every event goes through one ordered queue. Seats speak one at a time, at a
// readable pace, even though the API answers them in parallel. Skip ahead drains
// whatever is queued instantly; new events after that animate again.
const player = {
q: [], busy: false, epoch: 0, speed: 1, fast: false, timers: new Set(),
push(ev) { this.q.push(ev); this.info(); this.pump(); },
async pump() {
if (this.busy) return;
this.busy = true;
const my = this.epoch;
while (this.q.length && my === this.epoch) {
const ev = this.q.shift();
this.info();
try { await handle(ev); } catch (e) { console.error(e); }
}
if (my === this.epoch) { this.busy = false; this.fast = false; this.info(); }
},
sleep(ms) {
if (this.fast || ms <= 0) return Promise.resolve();
return new Promise((res) => { const t = setTimeout(() => { this.timers.delete(o); res(); }, ms / this.speed); const o = { t, res }; this.timers.add(o); });
},
flushTimers() { for (const o of this.timers) { clearTimeout(o.t); o.res(); } this.timers.clear(); },
skip() { this.fast = true; this.flushTimers(); },
reset() { this.epoch++; this.q.length = 0; this.fast = true; this.flushTimers(); this.busy = false; this.fast = false; this.info(); },
info() {
const waiting = this.q.filter((e) => e.type === "seat_done").length;
$("#queueInfo").textContent = waiting ? `${waiting} lines up next` : "";
},
};
// ------------------------------------------------------------- session wiring
function reset() {
state.es?.close();
player.reset();
Object.assign(state, { session: null, options: [], weights: {}, active: [], round: 0, cards: { 1: {}, 2: {}, 3: {} }, replaying: false, verdict: null, links: [], speaking: null });
$("#stage").classList.remove("live");
$("#topic").hidden = true;
$("#composer").hidden = state.runner !== "api";
$("#waiting").hidden = state.runner === "api";
$("#caption").hidden = true;
$("#cruxes").hidden = true;
$("#plate").hidden = true;
$("#playbar").hidden = true;
$("#newBtn").hidden = true;
$("#verdictSheet").hidden = true;
$("#feed").innerHTML = '<div class="empty">One line per seat as the council talks. Click a seat to read its full card.</div>';
$$(".vote").forEach((b) => b.remove());
$$(".seat").forEach((el) => { el.classList.remove("absent", "speaking", "thinking", "addressed"); $(".bust", el).dataset.shape = "base"; });
$$(".nameplate").forEach((el) => { el.classList.remove("absent", "speaking"); $(".chip", el).hidden = true; $(".score", el).hidden = true; $(".pips", el).innerHTML = ""; });
$("#spot").classList.remove("on");
$$(".stepper li").forEach((li) => li.classList.remove("active", "done"));
drawLinks();
}
function begin(id) {
reset();
state.session = id;
$("#composer").hidden = true;
$("#waiting").hidden = true;
$("#newBtn").hidden = false;
$("#playbar").hidden = false;
$("#stage").classList.add("live");
chairSays("The council is taking their seats", { dots: true });
}
function attach(id) {
begin(id);
const es = new EventSource(`/api/stream/${id}`);
state.es = es;
es.onmessage = (m) => {
const ev = JSON.parse(m.data);
if (ev.type === "end") { es.close(); refreshUsage(); return; }
if (ev.type === "delta") return; // seats speak from their finished cards
if (ev.type === "usage") return refreshUsage();
if (ev.type === "seat_error") return toast(`${state.byKey[ev.seat].short} hit an error: ${ev.error}`);
player.push(ev);
};
es.onerror = () => { /* the browser retries; the server replays from the start */ };
}
// ------------------------------------------------------------- event handling
const STEP_OF = { setup: "setup", round1: "round1", cruxes: "cruxes", round2: "round2", draft: "round3", round3: "round3", skip3: "round3", verdict: "verdict" };
const ORDER = ["setup", "round1", "cruxes", "round2", "round3", "verdict"];
function setStep(step) {
const idx = ORDER.indexOf(step);
$$(".stepper li").forEach((li) => {
const i = ORDER.indexOf(li.dataset.step);
li.classList.toggle("done", i < idx);
li.classList.toggle("active", i === idx);
});
}
async function handle(ev) {
switch (ev.type) {
case "phase": {
setStep(STEP_OF[ev.phase] || "setup");
feedPhase(ev.label);
const thinking = ["setup", "cruxes", "draft", "verdict"].includes(ev.phase);
if (thinking || ev.phase === "skip3") {
chairSays(ev.label.replace(/^The Chair is /, "").replace(/^./, (c) => c.toUpperCase()), { dots: thinking });
await player.sleep(1400);
}
break;
}
case "setup": onSetup(ev); await player.sleep(1800); break;
case "round_start": onRoundStart(ev.round); break;
case "seat_start": $(`#seat-${ev.seat}`)?.classList.add("thinking"); break;
case "seat_done": await onSeatDone(ev); break;
case "round_done": updateOptions(ev.scores); break;
case "cruxes": await onCruxes(ev); break;
case "draft": await onDraft(ev.draft); break;
case "verdict": onVerdict(ev); break;
case "error": toast(`The council stopped: ${ev.error}`); chairSays(`The council stopped: ${ev.error}`); break;
}
}
function onSetup(ev) {
state.options = ev.options;
state.weights = ev.weights;
state.active = ev.seats;
$("#topic").hidden = false;
$("#topicTitle").textContent = ev.title;
typeIn($("#topicTitle"));
$("#options").innerHTML = ev.options.map((o) => `
<div class="opt" data-opt="${o.id}"><span class="id">${o.id}</span><span class="label">${esc(o.label)}</span><span class="val">-</span><span class="bar"><i></i></span></div>`).join("");
for (const s of state.seats) {
const absent = !ev.seats.includes(s.key);
$(`#seat-${s.key}`).classList.toggle("absent", absent);
const pl = $(`#plate-${s.key}`);
pl.classList.toggle("absent", absent);
const w = ev.weights[s.key]?.weight || 1;
pl.title = `Weight ${w} of 3: ${ev.weights[s.key]?.reason || ""}`;
}
chairSays(ev.title, { tag: ev.mode === "quick" ? "Quick council" : "Full council" });
}
function updateOptions(scores) {
const best = Object.entries(scores).sort((a, b) => (b[1].score ?? 0) - (a[1].score ?? 0))[0]?.[0];
for (const [id, v] of Object.entries(scores)) {
const el = $(`.opt[data-opt="${id}"]`); if (!el) continue;
$(".val", el).textContent = v.score ?? "-";
$(".bar i", el).style.width = `${(v.score || 0) * 10}%`;
el.classList.toggle("lead", id === best);
el.title = v.math;
}
}
function onRoundStart(round) {
state.round = round;
state.links = [];
drawLinks();
$("#cruxes").hidden = true;
chairSays(`${["", "Round 1: opening positions", "Round 2: the debate", "Round 3: the vote"][round]}`, { dots: true, tag: "The floor is open" });
}
// ------------------------------------------------------------- talking
const clean = (t) => String(t || "").replace(/\s*\((?:S\d+|source[^)]*)[^)]*\)/gi, "").replace(/\*\*/g, "").replace(/\s+/g, " ").trim();
function firstSentences(t, max) {
const parts = t.match(/[^.!?]+[.!?]+["”)]?\s*|[^.!?]+$/g) || [t];
let out = "";
for (const p of parts) { if (out && (out + p).length > max) break; out += p; }
return shorten(out.trim(), max + 40);
}
/** The line a seat says out loud: the headline of its card, not the whole card. */
function lineFor(round, p, max = 170) {
if (round === 1) return firstSentences(clean(p.call || p.stance), max);
if (round === 2) {
let t = clean(p.disagreeLine || p.stance);
// "Graham. His argument..." reads as talking to him: "Graham, his argument..."
t = t.replace(/^([A-Za-z][\w.' ]{0,24})[.:,]\s+(\S+)/, (m, name, next) => !seatKey(name) ? m : `${state.byKey[seatKey(name)].short}, ${/^I('|$)/.test(next) ? next : next[0].toLowerCase() + next.slice(1)}`);
return firstSentences(t, max);
}
return firstSentences(clean(p.oneLine || p.amendment), max);
}
function shapesFor(word) {
const out = [];
for (const ch of word.toLowerCase()) {
const s = "aei".includes(ch) ? "open" : "ouwy".includes(ch) ? "mid" : "mbpf".includes(ch) ? "base" : null;
if (s && s !== out[out.length - 1]) out.push(s);
}
return out.length ? out : ["mid"];
}
function setShape(key, shape) { const b = $(`#seat-${key} .bust`); if (b) b.dataset.shape = shape; }
function setSpeaker(key, target) {
state.speaking = key;
$$(".seat").forEach((el) => { el.classList.toggle("speaking", el.dataset.seat === key); el.classList.toggle("addressed", el.dataset.seat === target); });
$$(".nameplate").forEach((el) => el.classList.toggle("speaking", el.dataset.seat === key));
const el = key && $(`#seat-${key}`);
if (el) {
el.classList.remove("thinking");
// lean toward whoever they're answering
const g = state.geo[key], tg = target && state.geo[target];
el.style.transform = tg ? `translateX(${Math.sign(tg.x - g.x) * g.size * 0.04}px) rotate(${Math.sign(tg.x - g.x) * 2.5}deg) scale(1.05)` : "scale(1.05)";
moveSpot(key);
} else $("#spot").classList.remove("on");
$$(".seat").forEach((s) => { if (s.dataset.seat !== key) s.style.transform = ""; });
}
function captionFor(who) {
$("#cruxes").hidden = true;
$("#plate").hidden = true;
const c = $("#caption");
c.hidden = false;
c.style.animation = "none"; void c.offsetWidth; c.style.animation = "";
const s = state.byKey[who];
$("#capAv").className = `cap-av${s ? "" : " chair"}`;
$("#capAv").innerHTML = `<img src="${s ? portrait(who) : "/brand/ais-symbol.png"}" alt="">`;
$("#capWho").textContent = s ? s.name : "The Chair";
}
function chairSays(text, { dots = false, tag = "" } = {}) {
setSpeaker(null);
captionFor(null);
$("#capTag").textContent = tag;
const p = $("#capText");
p.className = "cap-text chair";
p.innerHTML = esc(text) + (dots ? '<span class="dots"><i></i><i></i><i></i></span>' : "");
$("#capSub").textContent = "";
}
async function speak(key, text, { tag = "", target = null, sub = "" } = {}) {
setSpeaker(key, target);
captionFor(key);
$("#capTag").textContent = tag;
$("#capSub").textContent = "";
const p = $("#capText");
p.className = "cap-text";
const words = text.split(" ").filter(Boolean);
p.innerHTML = words.map((w) => `<span class="w">${esc(w)}</span> `).join("");
const spans = $$(".w", p);
for (let i = 0; i < words.length; i++) {
if (player.fast) break;
const w = words[i];
spans[i].classList.add("on");
const shapes = shapesFor(w.replace(/[^a-z]/gi, ""));
const dur = Math.max(170, w.length * 52);
const per = dur / (shapes.length + 1);
for (const sh of shapes) { setShape(key, sh); await player.sleep(per); }
setShape(key, "base");
await player.sleep(per + (/[.!?]["”)]?$/.test(w) ? 340 : /[,;:]$/.test(w) ? 170 : 25));
}
spans.forEach((s) => s.classList.add("on"));
setShape(key, "base");
$("#capSub").innerHTML = sub;
await player.sleep(1300);
}
// idle blinking for everyone, so the room feels alive between lines
function startBlinking() {
const blink = (key) => {
const b = $(`#seat-${key} .bust`);
if (b && b.dataset.shape === "base") {
b.dataset.shape = "blink";
setTimeout(() => { if (b.dataset.shape === "blink") b.dataset.shape = "base"; }, 130);
}
setTimeout(() => blink(key), 2400 + Math.random() * 4200);
};
state.seats.forEach((s, i) => setTimeout(() => blink(s.key), 600 + i * 530));
}
async function onSeatDone(ev) {
const { round, seat, text, parsed, quotes } = ev;
state.cards[round][seat] = { text, parsed, quotes };
const s = state.byKey[seat];
const top = topOption(parsed.optionScores);
const line = lineFor(round, parsed);
let tag = ROUND_NAME[round], sub = "", target = null;
if (round === 1) {
tag = `${stanceWord(parsed.stance)}${top ? ` · backs ${top.id} (${top.v}/10)` : ""}`;
} else if (round === 2) {
const tgt = parsed.disagreeWith ? state.byKey[parsed.disagreeWith] : null;
if (tgt) {
target = tgt.key;
tag = `Pushes back on ${tgt.short}`;
state.links = state.links.filter((l) => l.from !== seat);
state.links.push({ from: seat, to: tgt.key });
drawLinks();
}
sub = /^yes/i.test(parsed.moved) ? "Changed position" : "";
} else {
const v = parsed.vote || "endorse";
tag = `Votes ${v}`;
}
feedCard(round, seat, parsed);
await speak(seat, line || "I'll put it in my card.", { tag, target, sub });
const pl = $(`#plate-${seat}`);
const chip = $(".chip", pl);
chip.hidden = round === 3; // the vote stamp says it
chip.className = "chip";
if (round === 3) {
const v = parsed.vote || "endorse";
chip.textContent = v;
chip.classList.add(v);
$(`#seat-${seat} .vote`)?.remove();
const stamp = document.createElement("div");
stamp.className = `vote ${v}`;
stamp.textContent = v.toUpperCase();
$(`#seat-${seat}`).appendChild(stamp);
} else chip.textContent = stanceWord(parsed.stance);
if (top) { const sc = $(".score", pl); sc.hidden = false; sc.textContent = `${top.id} ${top.v}`; sc.title = `Highest score: option ${top.id}`; }
setSpeaker(null);
void s;
}
function stanceWord(t = "") {
const m = t.match(/strong yes|conditional yes|strong no|yes|no/i);
if (!m) return "Spoke";
const w = m[0].toLowerCase();
return w === "conditional yes" ? "Yes, if" : w[0].toUpperCase() + w.slice(1);
}
function topOption(scores = {}) {
const e = Object.entries(scores).sort((a, b) => b[1] - a[1])[0];
return e ? { id: e[0], v: e[1] } : null;
}
const shorten = (t, n) => (t.length > n ? t.slice(0, n - 1).replace(/\s+\S*$/, "") + "…" : t);
const face = (k) => `<img src="${portrait(k)}" alt="${esc(state.byKey[k]?.short || k)}" title="${esc(state.byKey[k]?.short || k)}">`;
async function onCruxes(ev) {
setSpeaker(null);
$("#caption").hidden = true;
const c = $("#cruxes");
c.hidden = false;
c.innerHTML = `<div class="head">${ev.unanimous ? "Too much agreement. The Chair pushes back." : "What they're fighting about"}</div>` +
ev.cruxes.map((x, i) => `<div class="crux" style="animation-delay:${i * 0.18}s"><b>${esc(x.question)}</b><div class="sides">${x.sides.map((sd) => `<span class="side"><span class="faces">${sd.seats.filter((k) => state.byKey[k]).map(face).join("")}</span>${esc(shorten(sd.position, 48))}</span>`).join("")}</div></div>`).join("");
const f = document.createElement("div");
f.className = "feed-note";
f.innerHTML = `<b>The fight:</b> ${ev.cruxes.map((x) => esc(x.question)).join(" ")}`;
feedAppend(f);
await player.sleep(3500 + 1800 * ev.cruxes.length);
}
async function onDraft(d) {
chairSays(`Proposal: ${d.label} on option ${d.option}. ${firstSentences(clean(d.recommendation), 140)}`, { tag: "Up for a vote" });
const f = document.createElement("div");
f.className = "feed-note";
f.innerHTML = `<b>Up for a vote:</b> ${esc(d.label)} on option ${esc(d.option)}.`;
feedAppend(f);
await player.sleep(4200);
}
// ------------------------------------------------------------- rebuttal arcs
function drawLinks() {
const svg = $("#links");
const stage = $("#stage");
const w = stage.clientWidth, h = stage.clientHeight;
svg.setAttribute("viewBox", `0 0 ${w} ${h}`);
const links = state.links || [];
const col = "#38bdf8";
svg.innerHTML = `<defs><marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="${col}"/></marker></defs>` +
links.map(({ from, to }, i) => {
const a = state.geo[from], b = state.geo[to];
if (!a || !b) return "";
const y1 = a.top - 6, y2 = b.top - 6;
const mx = (a.x + b.x) / 2, my = Math.min(y1, y2) - Math.min(90, Math.abs(a.x - b.x) * 0.22) - 10;
return `<path class="${i < links.length - 1 ? "old" : ""}" d="M${a.x},${y1} Q${mx},${my} ${b.x},${y2}" stroke="${col}" marker-end="url(#arrow)"/>`;
}).join("");
}
// ------------------------------------------------------------- feed + cards
function feedAppend(node) {
const feed = $("#feed");
$(".empty", feed)?.remove();
feed.appendChild(node);
feed.scrollTop = feed.scrollHeight;
}
function feedPhase(label) {
const d = document.createElement("div");
d.className = "feed-phase";
d.textContent = label.replace(/^The Chair is /, "Chair: ");
feedAppend(d);
}
function feedCard(round, seat, parsed) {
const s = state.byKey[seat];
const d = document.createElement("div");
d.className = "feed-card";
d.dataset.seat = seat;
d.dataset.round = round;
const top = topOption(parsed.optionScores);
const tgt = parsed.disagreeWith ? state.byKey[parsed.disagreeWith]?.short : "";
const what = round === 1 ? `${stanceWord(parsed.stance)}${top ? `, backs ${top.id}` : ""}` : round === 2 ? (tgt ? `vs ${tgt}` : "Debate") : `Votes ${parsed.vote || "endorse"}`;
d.innerHTML = `<img class="av" src="${portrait(seat)}" alt=""><div><div class="h">${esc(s.short)}<span class="r">${esc(what)}</span></div><p>${esc(lineFor(round, parsed, 105))}</p></div>`;
feedAppend(d);
}
function openCard(seat, round) {
const s = state.byKey[seat];
const rounds = [3, 2, 1].filter((r) => state.cards[r][seat]);
const r = round || rounds[0];
const c = state.cards[r]?.[seat];
$("#cardBody").innerHTML = `
<div class="card-head"><img src="${portrait(seat)}" alt=""><div><div class="label">${esc(s.pillar)}</div><h3>${esc(s.name)}</h3><p class="muted" style="margin:0">Owns the question: ${esc(s.question)}</p></div></div>
${rounds.length > 1 ? `<p style="margin:0 0 6px">${rounds.slice().reverse().map((x) => `<button class="ghost" data-r="${x}" style="margin-right:6px">${ROUND_NAME[x]}</button>`).join("")}</p>` : ""}
${c ? `<pre>${esc(c.text)}</pre>${c.quotes.length ? `<ul class="qcheck">${c.quotes.map((q) => `<li class="${q.verified ? "" : "bad"}">"${esc(shorten(q.quote, 110))}" (${q.source}) ${q.verified ? "verified in the brain" : "not found in the brain"}</li>`).join("")}</ul>` : ""}` : `<p class="muted">This seat has not spoken yet.</p>`}
<p class="muted" style="font-size:12px">A simulated advisor built from ${esc(s.name)}'s public work. Not the person.</p>`;
$$("#cardBody [data-r]").forEach((b) => b.addEventListener("click", () => openCard(seat, Number(b.dataset.r))));
const dlg = $("#cardDialog");
if (!dlg.open) dlg.showModal();
}
// ------------------------------------------------------------- verdict
// the Chair should write display names; map any raw seat key just in case
const seatKey = (x) => { const k = String(x).toLowerCase().replace(/\s+/g, ""); return state.byKey[k] ? k : state.seats.find((s) => s.short.toLowerCase() === String(x).toLowerCase() || s.name.toLowerCase() === String(x).toLowerCase())?.key; };
const seatName = (x) => state.byKey[seatKey(x)]?.short || x;
function labelClass(l) { return /DON'T/.test(l) ? "dont" : /RESHAPE/.test(l) ? "reshape" : /WAIT/.test(l) ? "wait" : "go"; }
function onVerdict(ev) {
const v = ev.verdict;
state.verdict = ev;
setStep("verdict");
setSpeaker(null);
$("#caption").hidden = true;
$("#cruxes").hidden = true;
state.links = [];
drawLinks();
$("#stage").classList.remove("live");
updateOptions(v.scores);
const opt = (id) => state.options.find((o) => o.id === id)?.label || id;
const seats = ev.seats;
const mk = seatKey(v.minority.seat);
const short = (t, n) => esc(shorten(clean(t || ""), n));
const html = `
<div class="v-top">
<div><div class="label">The council's verdict</div><span class="v-label ${labelClass(v.label)}">${esc(v.label)}</span></div>
<button class="ghost" data-close>Back to the table</button>
</div>
<p class="v-call">${esc(v.call)}</p>
<div class="v-grid">
<div class="v-sec"><h3>Scores</h3><div class="v-opts">${state.options.map((o) => `
<div class="opt ${o.id === v.recommended ? "lead" : ""}"><span class="id">${o.id}</span><span class="label">${esc(o.label)}</span><span class="val">${v.scores[o.id]?.score ?? "-"}</span><span class="bar"><i style="width:${(v.scores[o.id]?.score || 0) * 10}%"></i></span></div>`).join("")}</div>
<p class="v-meta">Confidence ${v.confidence ?? "-"}/10${v.votes ? ` · ${v.votes.endorse || 0} endorse, ${v.votes.amend || 0} amend, ${v.votes.dissent || 0} dissent` : ""}</p>
</div>
<div class="v-sec"><h3>Why</h3><ul class="v-why">${v.why.slice(0, 3).map((w) => { const k = seatKey(w.seat); return `<li>${k ? `<img class="av" src="${portrait(k)}" alt="">` : ""}<span>${short(w.point, 150)}</span></li>`; }).join("")}</ul></div>
<div class="v-sec"><h3>Watch out</h3><div class="minority"><div class="who">${mk ? `<img class="av" src="${portrait(mk)}" alt="">` : ""}${esc(seatName(v.minority.seat))}</div><q>${short(v.minority.quote, 170)}</q></div></div>
<div class="v-sec"><h3>Next steps</h3><ul class="v-steps">${v.next_steps.slice(0, 3).map((n) => `<li><b>${esc(n.when)}</b> ${short(n.action, 120)}</li>`).join("")}</ul>
<p class="v-meta"><b>Kill it if:</b> ${short(v.kill_criteria, 140)}</p></div>
</div>
<details class="v-more"><summary>Full detail</summary>
<div class="v-grid">
<div class="v-sec"><h3>Where they fought</h3><ul>${v.fights.map((f) => `<li><b>${esc(f.crux)}</b> ${esc(f.story)}</li>`).join("")}</ul></div>
<div class="v-sec"><h3>Conditions</h3><ol>${v.conditions.map((c) => `<li>${esc(c)}</li>`).join("")}</ol></div>
<div class="v-sec v-wide"><h3>Scorecard</h3>
<table class="scorecard"><thead><tr><th>Seat</th><th>Weight</th>${state.options.map((o) => `<th>${o.id}</th>`).join("")}<th>Their line</th></tr></thead><tbody>
${seats.map((x) => { const s = state.byKey[x.key]; return `<tr><td><span class="who"><img class="av" src="${portrait(x.key)}" alt="">${esc(s.short)}</span></td><td class="n">${x.weight}</td>${state.options.map((o) => `<td class="n">${x.optionScores?.[o.id] ?? "-"}</td>`).join("")}<td class="line">${short(x.oneLine, 150)}</td></tr>`; }).join("")}
</tbody></table>
<p class="muted" style="font-size:11.5px;margin-top:8px">Weighted by how much each pillar matters here. ${state.options.map((o) => `${o.id}: ${esc(v.scores[o.id]?.math || "")}`).join(" · ")}</p></div>
<div class="v-sec"><h3>Cheapest test</h3><p>${esc(v.cheapest_test)}</p><h3>Revisit</h3><p>${esc(v.revisit)}</p></div>
<div class="v-sec"><h3>The strongest objection in full</h3><p>${esc(v.minority.quote)}</p><p class="muted">For this to be right: ${esc(v.minority.would_have_to_be_true)}</p></div>
${v.amendments?.length ? `<div class="v-sec v-wide"><h3>Amendments</h3><ul>${v.amendments.map((a) => `<li><b>${esc(seatName(a.seat))}:</b> ${esc(a.amendment)} <span class="tag">${a.adopted ? "Adopted" : "Not adopted"}: ${esc(a.reason)}</span></li>`).join("")}</ul></div>` : ""}
</div>
</details>
<div class="v-foot"><span class="muted">${esc(v.disclaimer)}</span><button class="ghost" data-close>Back to the table</button></div>`;
$("#verdictBody").innerHTML = html;
const plate = $("#plate");
plate.hidden = false;
plate.innerHTML = `<div class="label">The council's verdict</div><span class="v-label ${labelClass(v.label)}">${esc(v.label)}</span><p>${esc(firstSentences(clean(v.call), 150))}</p><div class="row"><button type="button" id="plateOpen">Read the verdict</button><button type="button" class="alt" id="plateReplay">Replay this council</button></div>`;
$("#plateOpen").addEventListener("click", () => ($("#verdictSheet").hidden = false));
$("#plateReplay").addEventListener("click", () => replay(state.session));
$("#playbar").hidden = true;
const f = document.createElement("div");
f.className = "feed-note";
f.innerHTML = `<b>Verdict: ${esc(v.label)}.</b> ${esc(firstSentences(clean(v.call), 160))}`;
feedAppend(f);
setTimeout(() => { if (state.verdict === ev) $("#verdictSheet").hidden = false; }, 1600);
}
// ------------------------------------------------------------- history + replay
async function openHistory() {
const { sessions } = await fetch("/api/sessions").then((x) => x.json());
$("#historyList").innerHTML = sessions.length
? sessions.map((s) => `<li><button data-id="${esc(s.id)}"><b>${esc(s.title)}</b><small>${esc(s.id.slice(0, 10))} · ${esc(s.mode)} · ${esc(s.status)}</small></button></li>`).join("")
: '<li class="muted">No sessions yet. Convene the council once and it shows up here.</li>';
$$("#historyList button").forEach((b) => b.addEventListener("click", () => { $("#historyDialog").close(); replay(b.dataset.id); }));
$("#historyDialog").showModal();
}
async function replay(id) {
const j = await fetch(`/api/sessions/${encodeURIComponent(id)}`).then((x) => x.json());
begin(id);
state.replaying = true;
for (const ev of j.events) {
if (["delta", "usage", "seat_error", "end"].includes(ev.type)) continue;
player.push(ev);
}
}
// ------------------------------------------------------------- misc
let toastTimer;
function toast(msg) {
const t = $("#toast");
t.textContent = msg;
t.hidden = false;
clearTimeout(toastTimer);
toastTimer = setTimeout(() => (t.hidden = true), 6000);
}
async function refreshUsage() {
const u = await fetch("/api/usage").then((x) => x.json()).catch(() => null);
if (!u || !u.calls) { $("#usage").textContent = ""; return; }
const k = (n) => (n >= 1e6 ? `${(n / 1e6).toFixed(1)}M` : `${Math.round(n / 1000)}k`);
$("#usage").textContent = `${u.calls} calls · ${k(u.input + u.cacheRead + u.cacheWrite)} in · ${k(u.output)} out`;
}
boot();
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="118.81170372807807 115.12365191710259 1217.938296271922 510.94555167421254"><path d="M765.25,162.25 764.75,163.75 761.25,168.50 759.75,171.75 758.25,173.25 757.75,174.75 754.25,179.50 752.75,182.75 751.25,184.25 750.75,185.75 749.50,187.00 748.75,188.75 746.00,192.50 745.75,193.75 744.25,195.25 743.75,196.75 742.50,198.00 741.75,199.75 739.00,203.50 738.75,204.75 735.25,209.25 734.75,210.75 731.50,215.25 729.75,218.75 728.25,220.25 727.75,221.75 724.50,226.25 722.75,229.75 721.25,231.25 720.75,232.75 717.75,236.75 715.75,240.75 714.25,242.25 713.75,243.75 710.75,247.75 708.75,251.75 707.25,253.25 706.75,254.75 703.25,259.50 701.75,262.75 700.25,264.25 699.75,265.75 696.25,270.50 694.75,273.75 693.25,275.25 692.75,276.75 689.25,281.50 687.75,284.75 686.25,286.25 685.75,287.75 682.25,292.50 680.75,295.75 679.25,297.25 678.75,298.75 675.25,303.50 673.75,306.75 672.25,308.25 671.75,309.75 668.25,314.50 666.75,317.75 665.25,319.25 664.75,320.75 661.25,325.50 657.75,331.75 656.25,333.25 655.75,334.75 652.50,339.50 651.25,340.75 650.00,341.25 647.53,344.75 647.60,345.48 647.71,346.68 647.81,347.87 647.90,349.06 648.00,350.26 648.08,351.45 648.16,352.65 648.24,353.84 648.31,355.04 648.37,356.23 648.43,357.43 648.49,358.62 648.54,359.82 648.58,361.02 648.62,362.21 648.66,363.41 648.68,364.61 648.71,365.81 648.73,367.00 648.74,368.20 648.75,369.40 648.75,370.60 648.75,371.79 648.74,372.99 648.73,374.19 648.71,375.39 648.68,376.58 648.66,377.78 648.62,378.98 648.58,380.18 648.54,381.37 648.49,382.57 648.43,383.76 648.37,384.96 648.31,386.16 648.24,387.35 648.16,388.55 648.08,389.74 648.00,390.94 647.90,392.13 647.81,393.32 647.71,394.52 647.60,395.71 647.49,396.90 647.37,398.09 647.25,399.29 647.12,400.48 646.99,401.67 646.85,402.86 646.70,404.05 646.56,405.23 646.40,406.42 646.24,407.61 646.08,408.79 645.91,409.98 645.74,411.17 645.56,412.35 645.37,413.53 645.18,414.71 644.99,415.90 644.79,417.08 644.58,418.26 644.37,419.44 644.15,420.61 643.93,421.79 643.71,422.97 643.48,424.14 643.24,425.32 643.00,426.49 642.75,427.66 642.50,428.83 642.24,430.00 641.98,431.17 641.72,432.34 641.44,433.50 641.17,434.67 640.88,435.83 640.60,437.00 640.31,438.16 640.01,439.32 639.71,440.48 639.40,441.63 639.09,442.79 638.77,443.94 638.45,445.10 638.12,446.25 637.79,447.40 637.45,448.55 637.11,449.70 636.76,450.84 636.40,451.99 636.05,453.13 635.68,454.27 635.32,455.41 634.94,456.55 634.57,457.69 634.18,458.82 633.80,459.95 633.40,461.09 633.01,462.21 632.61,463.34 632.20,464.47 631.79,465.59 631.37,466.72 630.95,467.84 630.52,468.96 630.09,470.07 629.65,471.19 629.21,472.30 628.76,473.41 628.31,474.52 627.86,475.63 627.40,476.74 626.93,477.84 626.46,478.94 625.99,480.04 625.51,481.14 625.02,482.23 624.53,483.32 624.04,484.42 623.54,485.50 623.03,486.59 622.53,487.67 622.01,488.76 621.50,489.84 620.97,490.91 620.45,491.99 619.91,493.06 619.38,494.13 618.84,495.20 618.29,496.27 617.74,497.33 617.18,498.39 616.62,499.45 616.06,500.51 615.49,501.56 614.92,502.61 614.34,503.66 613.75,504.71 613.17,505.75 612.58,506.79 611.98,507.83 611.38,508.87 610.77,509.90 610.16,510.93 609.55,511.96 608.93,512.98 608.30,514.00 607.68,515.02 607.04,516.04 606.41,517.06 605.77,518.07 605.12,519.08 604.47,520.08 603.82,521.08 603.16,522.08 602.49,523.08 601.83,524.08 601.16,525.07 600.48,526.06 599.80,527.04 599.11,528.02 598.42,529.00 597.73,529.98 597.03,530.95 596.33,531.92 595.63,532.89 594.92,533.85 594.20,534.82 593.48,535.77 592.76,536.73 592.03,537.68 591.30,538.63 590.57,539.57 589.83,540.52 589.08,541.46 588.34,542.39 587.58,543.32 586.83,544.25 586.07,545.18 585.31,546.10 584.54,547.02 583.77,547.94 582.99,548.85 582.21,549.76 581.43,550.66 580.64,551.56 579.85,552.46 579.05,553.36 578.25,554.25 577.45,555.14 576.64,556.02 575.83,556.90 575.02,557.78 574.20,558.66 573.37,559.53 572.55,560.39 571.72,561.26 570.88,562.12 570.05,562.97 569.21,563.82 568.36,564.67 567.51,565.52 566.66,566.36 565.80,567.20 564.94,568.03 564.08,568.86 563.21,569.69 562.34,570.51 561.47,571.33 560.59,572.14 559.71,572.95 558.83,573.76 557.94,574.56 557.05,575.36 556.15,576.16 555.25,576.95 554.35,577.74 553.44,578.52 552.54,579.30 551.62,580.08 550.71,580.85 549.79,581.62 549.05,582.23 554.50,582.25 555.50,581.75 647.25,581.75 651.75,574.25 651.75,573.50 654.50,569.50 655.75,566.50 658.50,562.50 659.75,559.50 662.50,555.50 663.75,552.50 665.25,550.75 667.75,546.25 667.75,545.50 669.25,543.75 675.00,533.00 676.00,532.00 678.75,526.50 681.50,522.50 682.75,519.50 685.50,515.50 686.75,512.50 689.50,508.75 823.25,508.75 823.75,508.25 823.75,506.25 824.75,505.00 824.75,501.25 825.75,500.00 825.75,496.25 826.75,495.00 826.75,491.25 827.75,490.00 827.75,486.25 828.75,485.00 828.75,481.25 829.75,480.00 829.75,476.25 830.75,475.00 830.75,471.25 831.75,470.00 831.75,466.25 832.75,465.00 832.75,461.25 833.75,460.00 833.75,456.25 834.75,455.00 834.75,451.25 835.75,450.00 835.75,446.25 836.75,445.00 836.75,441.25 837.75,440.00 837.75Line truncated

After

Width:  |  Height:  |  Size: 149 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="6 6 188 188"><path transform="translate(0 0) scale(1)" d="M189.999,99.607 189.997,99.215 189.992,98.822 189.986,98.429 189.979,98.037 189.969,97.644 189.958,97.252 189.945,96.859 189.931,96.467 189.914,96.074 189.896,95.682 189.877,95.290 189.855,94.898 189.832,94.506 189.807,94.114 189.781,93.722 189.753,93.330 189.723,92.939 189.691,92.547 189.658,92.156 189.622,91.765 189.586,91.374 189.547,90.983 189.507,90.592 189.465,90.202 189.421,89.812 189.376,89.422 189.329,89.032 189.280,88.642 189.230,88.253 189.178,87.863 189.124,87.474 189.069,87.086 189.011,86.697 188.953,86.309 188.892,85.921 188.830,85.533 188.766,85.146 188.700,84.759 188.633,84.372 188.564,83.985 188.493,83.599 188.421,83.213 188.346,82.827 188.271,82.442 188.193,82.057 188.114,81.672 188.033,81.288 187.951,80.904 187.867,80.520 187.818,80.305 187.822,80.322 187.832,80.368 187.841,80.415 187.850,80.462 187.859,80.509 187.867,80.556 187.875,80.603 187.883,80.650 187.891,80.698 187.898,80.745 187.904,80.792 187.911,80.840 187.917,80.888 187.923,80.935 187.928,80.983 187.933,81.031 187.938,81.079 187.942,81.127 187.946,81.175 187.950,81.223 187.953,81.271 187.956,81.320 187.959,81.368 187.961,81.417 187.963,81.465 187.965,81.514 187.966,81.563 187.967,81.611 187.968,81.660 187.968,81.709 187.968,81.758 187.968,81.807 187.967,81.857 187.966,81.906 187.965,81.955 187.963,82.005 187.961,82.054 187.959,82.104 187.956,82.154 187.953,82.203 187.950,82.253 187.946,82.303 187.942,82.353 187.937,82.403 187.933,82.453 187.928,82.503 187.922,82.554 187.916,82.604 187.910,82.655 187.904,82.705 187.897,82.756 187.890,82.806 187.883,82.857 187.875,82.908 187.867,82.959 187.858,83.010 187.850,83.061 187.840,83.112 187.831,83.163 187.821,83.214 187.811,83.266 187.801,83.317 187.790,83.369 187.779,83.420 187.767,83.472 187.755,83.523 187.743,83.575 187.731,83.627 187.718,83.679 187.705,83.731 187.691,83.783 187.678,83.835 187.663,83.887 187.649,83.940 187.634,83.992 187.619,84.044 187.603,84.097 187.588,84.149 187.571,84.202 187.555,84.255 187.538,84.307 187.521,84.360 187.503,84.413 187.485,84.466 187.467,84.519 187.449,84.572 187.430,84.625 187.411,84.679 187.391,84.732 187.371,84.785 187.351,84.839 187.331,84.892 187.310,84.946 187.288,84.999 187.267,85.053 187.245,85.107 187.223,85.161 187.200,85.214 187.177,85.268 187.154,85.322 187.131,85.377 187.107,85.431 187.083,85.485 187.058,85.539 187.033,85.594 187.008,85.648 186.982,85.702 186.956,85.757 186.930,85.812 186.904,85.866 186.877,85.921 186.850,85.976 186.822,86.031 186.794,86.086 186.766,86.141 186.737,86.196 186.709,86.251 186.679,86.306 186.650,86.361 186.620,86.416 186.590,86.472 186.559,86.527 186.528,86.583 186.497,86.638 186.466,86.694 186.434,86.749 186.402,86.805 186.369,86.861 186.336,86.917 186.303,86.972 186.269,87.028 186.236,87.084 186.201,87.140 186.167,87.197 186.132,87.253 186.097,87.309 186.061,87.365 186.026,87.422 185.989,87.478 185.953,87.534 185.916,87.591 185.879,87.648 185.841,87.704 185.804,87.761 185.765,87.818 185.727,87.874 185.688,87.931 185.649,87.988 185.610,88.045 185.570,88.102 185.530,88.159 185.489,88.216 185.449,88.273 185.407,88.331 185.366,88.388 185.324,88.445 185.282,88.503 185.240,88.560 185.197,88.618 185.154,88.675 185.111,88.733 185.067,88.790 185.023,88.848 184.979,88.906 184.934,88.964 184.889,89.022 184.844,89.079 184.798,89.137 184.752,89.195 184.706,89.253 184.659,89.312 184.612,89.370 184.565,89.428 184.517,89.486 184.469,89.544 184.421,89.603 184.372,89.661 184.323,89.720 184.274,89.778 184.225,89.837 184.175,89.895 184.125,89.954 184.074,90.013 184.023,90.071 183.972,90.130 183.921,90.189 183.869,90.248 183.817,90.307 183.764,90.366 183.711,90.425 183.658,90.484 183.605,90.543 183.551,90.602 183.497,90.661 183.443,90.720 183.388,90.780 183.333,90.839 183.278,90.898 183.222,90.958 183.166,91.017 183.110,91.077 183.053,91.136 182.996,91.196 182.939,91.255 182.882,91.315 182.824,91.375 182.766,91.435 182.707,91.494 182.648,91.554 182.589,91.614 182.530,91.674 182.470,91.734 182.410,91.794 182.349,91.854 182.289,91.914 182.228,91.974 182.166,92.034 182.105,92.094 182.043,92.155 181.980,92.215 181.918,92.275 181.855,92.336 181.791,92.396 181.728,92.456 181.664,92.517 181.600,92.577 181.535,92.638 181.471,92.698 181.405,92.759 181.340,92.820 181.274,92.880 181.208,92.941 181.142,93.002 181.075,93.063 181.008,93.123 180.941,93.184 180.873,93.245 180.805,93.306 180.737,93.367 180.669,93.428 180.600,93.489 180.531,93.550 180.461,93.611 180.391,93.672 180.321,93.733 180.251,93.795 180.180,93.856 180.109,93.917 180.038,93.978 179.966,94.040 179.894,94.101 179.822,94.162 179.750,94.224 179.677,94.285 179.604,94.347 179.530,94.408 179.457,94.470 179.382,94.531 179.308,94.593 179.233,94.655 179.158,94.716 179.083,94.778 179.008,94.840 178.932,94.901 178.856,94.963 178.779,95.025 178.702,95.087 178.625,95.149 178.548,95.210 178.470,95.272 178.392,95.334 178.314,95.396 178.235,95.458 178.156,95.520 178.077,95.582 1Line truncated

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+130
View File
@@ -0,0 +1,130 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Founder Council · AI Automation Society</title>
<link rel="icon" href="/brand/favicon-ais.png" type="image/png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/styles.css">
</head>
<body>
<header class="topbar">
<div class="brand">
<img class="brand-logo" src="/brand/ais-horizontal.svg" alt="AI Automation Society">
<span class="brand-rule" aria-hidden="true"></span>
<span class="brand-name">Founder Council</span>
</div>
<ol class="stepper" id="stepper" aria-label="Council progress">
<li data-step="setup">Brief</li>
<li data-step="round1">Openings</li>
<li data-step="cruxes">Fault lines</li>
<li data-step="round2">Debate</li>
<li data-step="round3">Vote</li>
<li data-step="verdict">Verdict</li>
</ol>
<div class="top-actions">
<span class="usage" id="usage" title="Tokens used by this app since it started"></span>
<button class="ghost" id="historyBtn" type="button">Past sessions</button>
<button class="ghost" id="newBtn" type="button" hidden>New question</button>
</div>
</header>
<div class="topic" id="topic" hidden>
<div class="topic-main">
<div class="label">On the table</div>
<h1 id="topicTitle"></h1>
</div>
<div class="options" id="options"></div>
</div>
<main class="layout">
<section class="stage-wrap" aria-label="The council table">
<div class="stage" id="stage">
<div class="wall" aria-hidden="true"></div>
<div class="spot" id="spot" aria-hidden="true"></div>
<div id="seats"></div>
<div class="table" id="table" aria-hidden="true"><img class="etch" src="/brand/ais-symbol.png" alt=""></div>
<div id="plates"></div>
<svg class="links" id="links" aria-hidden="true"></svg>
<div class="center" id="center">
<div class="waiting" id="waiting" hidden>
<span class="pulse"><i></i>Waiting for a council</span>
<h2 data-type>Run the council from Claude Code</h2>
<p>Open Claude Code in this folder and type the line below with your decision. The council shows up here and plays live as it runs.</p>
<code>/founder-council should I ...</code>
<div class="row"><button class="ghost" type="button" id="waitHistory">Watch a past council</button></div>
</div>
<form class="composer" id="composer" hidden>
<h2 data-type>What decision do you need help with?</h2>
<textarea id="prompt" rows="3" placeholder="Give them the decision, your options, a few numbers (revenue, cash, team), and which way you're leaning." required minlength="10"></textarea>
<div class="samples" id="samples"></div>
<div class="composer-row">
<div class="mode" role="radiogroup" aria-label="Council size">
<label><input type="radio" name="mode" value="full" checked><span>Full council <small>7 seats, 3 rounds</small></span></label>
<label><input type="radio" name="mode" value="quick"><span>Quick <small>4 seats, 2 rounds</small></span></label>
</div>
<button class="convene" type="submit" id="convene">Convene the council</button>
</div>
</form>
<div class="caption" id="caption" hidden>
<div class="cap-head">
<span class="cap-av" id="capAv"></span>
<span class="cap-who" id="capWho"></span>
<span class="cap-tag" id="capTag"></span>
</div>
<p class="cap-text" id="capText"></p>
<div class="cap-sub" id="capSub"></div>
</div>
<div class="cruxes" id="cruxes" hidden></div>
<div class="plate" id="plate" hidden></div>
</div>
<div class="playbar" id="playbar" hidden>
<span class="queue" id="queueInfo"></span>
<div class="speed" role="radiogroup" aria-label="Playback speed">
<button type="button" data-speed="1" aria-pressed="true">1x</button>
<button type="button" data-speed="1.6" aria-pressed="false">1.6x</button>
<button type="button" data-speed="2.5" aria-pressed="false">2.5x</button>
</div>
<button type="button" class="skip" id="skipBtn">Skip ahead</button>
</div>
</div>
</section>
<aside class="panel" aria-label="Key points">
<div class="panel-head">Key points</div>
<div class="tabpanel" id="feed">
<div class="empty">One line per seat as the council talks. Click a seat to read its full card.</div>
</div>
</aside>
</main>
<div class="sheet" id="verdictSheet" hidden>
<div class="sheet-inner" id="verdictBody"></div>
</div>
<dialog id="cardDialog" class="card-dialog">
<div id="cardBody"></div>
<form method="dialog"><button class="ghost">Close</button></form>
</dialog>
<dialog id="historyDialog" class="card-dialog">
<h3>Past sessions</h3>
<p class="muted">Replay a council exactly as it happened.</p>
<ul class="history" id="historyList"></ul>
<form method="dialog"><button class="ghost">Close</button></form>
</dialog>
<div class="toast" id="toast" hidden></div>
<p class="disclaimer">Simulated advisors built from each person's public work and drawn as caricatures. They are not the people and do not speak for them.</p>
<script src="/app.js" type="module"></script>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

+426
View File
@@ -0,0 +1,426 @@
/* AI Automation Society. Brand guidelines v1 (Oct 2026): Montserrat only, dark blue grounds,
black and white lead, AIS Blue #37bdf8 as the accent only, no blue fills or gradients. */
:root {
--canvas: #07121c;
--surface: #0a1824;
--surface-2: #0d2031;
--surface-3: #16293a;
--hairline: rgba(255, 255, 255, 0.08);
--hairline-strong: rgba(255, 255, 255, 0.16);
--ink: #ffffff;
--ink-soft: #c9d1dc;
--ink-mute: #96a2b5;
--accent: #37bdf8;
--accent-deep: #37bdf8;
--accent-soft: rgba(55, 189, 248, 0.12);
--go: #3fcf8e;
--amend: #ff9025;
--dissent: #ff5a4f;
--font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
--font-text: "Montserrat", "Helvetica Neue", Arial, sans-serif;
--track-head: -0.04em;
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
--r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
background: var(--canvas);
color: var(--ink-soft);
font: 400 14.5px/1.55 var(--font-text);
min-height: 100vh;
-webkit-font-smoothing: antialiased;
font-variant-numeric: tabular-nums;
}
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--ink-mute); }
::selection { background: rgba(55, 189, 248, 0.3); color: var(--ink); }
* { caret-color: var(--accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #21252b; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
/* ---------------- top bar ---------------- */
.topbar {
display: flex; align-items: center; gap: 24px; padding: 12px 24px;
border-bottom: 1px solid var(--hairline); background: rgba(7, 18, 28, 0.86); backdrop-filter: blur(10px);
position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-rule { width: 1px; height: 22px; background: var(--hairline-strong); }
.brand-name { font: 500 15px/1 var(--font-display); color: var(--ink); letter-spacing: -0.02em; }
.stepper { display: flex; gap: 2px; list-style: none; margin: 0 auto; padding: 0; }
.stepper li {
font-size: 12.5px; font-weight: 500; color: var(--ink-mute);
padding: 6px 12px; border-radius: 999px; display: flex; align-items: center; gap: 7px; white-space: nowrap;
transition: color .3s, background .3s;
}
.stepper li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); transition: background .3s; }
.stepper li.done { color: var(--ink-soft); }
.stepper li.done::before { background: var(--accent); }
.stepper li.active { color: var(--ink); }
.stepper li.active::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .25); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.usage { font-size: 12px; color: var(--ink-mute); }
.ghost {
background: transparent; border: 1px solid var(--hairline-strong); color: var(--ink-soft);
padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: 13px; transition: border-color .2s, color .2s;
}
.ghost:hover { border-color: var(--accent); color: var(--ink); }
/* ---------------- topic banner ---------------- */
.topic {
display: flex; gap: 28px; align-items: center; justify-content: space-between;
margin: 16px 24px 0; padding: 16px 22px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r);
}
.label { font-size: 11px; color: var(--ink-mute); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.topic h1 { font: 500 26px/1.15 var(--font-display); color: var(--ink); margin: 6px 0 6px; letter-spacing: var(--track-head); }
.topic p { margin: 0; color: var(--ink-soft); max-width: 72ch; font-size: 14px; }
.options { display: grid; gap: 8px; min-width: 300px; max-width: 440px; flex: 0 1 440px; }
.opt { display: grid; grid-template-columns: 26px 1fr 38px; gap: 10px; align-items: center; font-size: 13px; }
.opt .id { font: 700 13px/1 var(--font-display); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-soft); }
.opt.lead .id { background: #ffffff; color: #07121c; }
.opt .label { color: var(--ink-soft); line-height: 1.3; font-weight: 400; font-size: 13px; text-transform: none; letter-spacing: 0; }
.opt .bar { grid-column: 2; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: -4px; }
.opt .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .9s var(--ease-out); }
.opt .val { grid-row: 1 / span 2; grid-column: 3; font: 600 18px/1 var(--font-display); text-align: right; color: var(--ink); }
/* ---------------- layout ---------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; padding: 16px 24px 28px; align-items: start; }
.stage-wrap { min-width: 0; }
/* ---------------- the stage ---------------- */
.stage {
position: relative; width: 100%; aspect-ratio: 16 / 9.4; max-height: calc(100vh - 120px); min-height: 520px;
border-radius: 20px; overflow: hidden; border: 1px solid var(--hairline);
background:
radial-gradient(70% 40% at 50% 52%, rgba(55, 189, 248, 0.07), transparent 70%),
linear-gradient(180deg, #0a1a28 0%, #07121c 60%, #050d15 100%);
}
.wall {
position: absolute; inset: 0; pointer-events: none;
background:
repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 120px),
linear-gradient(180deg, transparent 0 46%, rgba(56, 189, 248, 0.05) 46.2%, transparent 47%);
}
.spot {
position: absolute; width: 380px; height: 380px; border-radius: 50%; pointer-events: none; z-index: 2;
background: radial-gradient(circle, rgba(255, 255, 255, 0.10), rgba(55, 189, 248, 0.05) 45%, transparent 70%);
opacity: 0; transform: translate(-50%, -50%); transition: left .55s var(--ease-out), top .55s var(--ease-out), opacity .4s;
}
.spot.on { opacity: 1; }
/* seats: a cartoon bust per seat, behind the table edge */
.seat {
position: absolute; z-index: 10; transform-origin: 50% 100%;
transition: filter .45s, opacity .45s, transform .55s var(--ease-out);
cursor: pointer;
}
.seat .bust { position: relative; width: 100%; height: 100%; transform-origin: 50% 90%; animation: breathe 5.5s ease-in-out infinite; }
.seat .bust img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; user-select: none; }
.seat .bust[data-shape="base"] img.base,
.seat .bust[data-shape="open"] img.open,
.seat .bust[data-shape="mid"] img.mid,
.seat .bust[data-shape="blink"] img.blink { opacity: 1; }
@keyframes breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-1px) scale(1.006); } }
.stage.live .seat { filter: brightness(.62) saturate(.8); }
.stage.live .seat.speaking { filter: none; z-index: 25 !important; }
.stage.live .seat.addressed { filter: brightness(.9); }
.seat.speaking .bust { animation: talk 1.6s ease-in-out infinite; }
@keyframes talk {
0%, 100% { transform: translateY(0) rotate(0); }
25% { transform: translateY(-3px) rotate(-1.2deg); }
50% { transform: translateY(-1px) rotate(.6deg); }
75% { transform: translateY(-4px) rotate(1.1deg); }
}
.seat.absent { opacity: .2; filter: grayscale(1) brightness(.5) !important; }
.seat:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
/* thinking dots over a head */
.think {
position: absolute; left: 50%; top: 2%; translate: -50% -100%; display: none; gap: 4px; padding: 7px 10px;
background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: 999px; z-index: 3;
}
.seat.thinking .think { display: flex; }
.think i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bob 1.1s infinite ease-in-out; }
.think i:nth-child(2) { animation-delay: .15s; }
.think i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-4px); opacity: 1; } }
/* vote stamp on the chest */
.vote {
position: absolute; left: 50%; bottom: 30%; translate: -50% 0; rotate: -8deg; z-index: 4;
font: 800 12px/1 var(--font-display); letter-spacing: .08em; padding: 6px 9px; border-radius: 7px; border: 2px solid currentColor;
background: rgba(7, 18, 28, .9); animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
.vote.endorse { color: var(--go); }
.vote.amend { color: var(--amend); }
.vote.dissent { color: var(--dissent); }
@keyframes stamp { from { opacity: 0; scale: 2.2; } }
/* the table */
.table {
position: absolute; z-index: 30; border-radius: 50%; pointer-events: none;
background:
radial-gradient(70% 60% at 50% 30%, #11263a 0%, #0b1a29 55%, #07121c 100%);
box-shadow:
inset 0 1.5px 0 rgba(255, 255, 255, 0.22),
inset 0 18px 40px rgba(255, 255, 255, 0.03),
0 -18px 70px rgba(55, 189, 248, 0.07);
}
.table .etch { position: absolute; left: 50%; top: 30%; width: 11%; translate: -50% -50%; opacity: .06; }
/* nameplates on the table edge */
.nameplate {
position: absolute; z-index: 32; translate: -50% -50%; text-align: center; cursor: pointer;
background: rgba(7, 18, 28, .86); border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 5px 10px 6px;
min-width: 96px; backdrop-filter: blur(6px); transition: border-color .3s, opacity .4s, box-shadow .3s;
}
.nameplate b { display: block; font: 600 13px/1.15 var(--font-display); color: var(--ink); white-space: nowrap; }
.nameplate small { display: block; font-size: 10.5px; color: var(--ink-mute); white-space: nowrap; }
.nameplate .meta { display: flex; gap: 5px; justify-content: center; align-items: center; margin-top: 4px; }
.nameplate .meta:not(:has(.chip:not([hidden]), .score:not([hidden]), .pips i)) { display: none; }
.stage.live .nameplate small, .stage:has(.chip:not([hidden])) .nameplate small { display: none; }
.nameplate.speaking { border-color: #ffffff; }
.nameplate.absent { opacity: .3; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 5px; height: 5px; border-radius: 50%; background: var(--surface-3); }
.pips i.on { background: var(--accent); }
.chip { max-width: 84px; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-soft); white-space: nowrap; }
.chip.endorse { color: var(--go); } .chip.amend { color: var(--amend); } .chip.dissent { color: var(--dissent); }
.score { white-space: nowrap; font: 600 11px/1 var(--font-display); padding: 3px 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink); }
/* rebuttal arcs */
.links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 34; }
.links path { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 7 7; animation: dash 1.1s linear infinite; }
.links path.old { opacity: .28; }
@keyframes dash { to { stroke-dashoffset: -28; } }
/* the middle of the table: composer, captions, fault lines, verdict plate */
.center { position: absolute; z-index: 36; display: grid; place-items: start center; }
.composer { width: min(620px, 100%); display: grid; gap: 10px; text-align: center; }
.composer h2 { font: 500 clamp(20px, 2vw, 28px)/1.15 var(--font-display); margin: 0; color: var(--ink); letter-spacing: var(--track-head); }
.composer textarea {
width: 100%; resize: vertical; min-height: 72px; max-height: 200px; border-radius: 12px; border: 1px solid var(--hairline-strong);
background: rgba(8, 10, 14, .78); color: var(--ink); padding: 11px 14px; font: 14px/1.45 var(--font-text); outline: none;
}
.composer textarea::placeholder { color: var(--ink-mute); }
.composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
.samples { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.samples button {
background: rgba(255, 255, 255, .04); color: var(--ink-soft); border: 1px solid var(--hairline-strong);
border-radius: 999px; padding: 4px 11px; font-size: 12px; transition: border-color .2s, color .2s;
}
.samples button:hover { border-color: var(--accent); color: var(--ink); }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mode { display: flex; gap: 6px; }
.mode label { cursor: pointer; }
.mode input { position: absolute; opacity: 0; }
.mode span { display: block; text-align: left; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid var(--hairline-strong); color: var(--ink-soft); background: rgba(8, 10, 14, .6); }
.mode small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-mute); }
.mode input:checked + span { border-color: #ffffff; color: var(--ink); background: rgba(255, 255, 255, .06); }
.mode input:focus-visible + span { outline: 2px solid var(--accent); }
.convene {
background: #ffffff; color: #07121c; border: 0; border-radius: 999px; padding: 11px 22px; font-weight: 600; font-size: 14px;
transition: background .2s;
}
.convene:hover { background: #e6edf5; }
.convene:disabled { opacity: .6; cursor: progress; }
.caption { width: 100%; text-align: left; animation: rise .35s var(--ease-out) both; }
.cap-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cap-av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--surface-3); flex: none; display: grid; place-items: center; border: 1px solid var(--hairline-strong); }
.cap-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.cap-av.chair img { width: 70%; height: 70%; object-fit: contain; }
.cap-who { font: 600 15px/1.1 var(--font-display); color: var(--ink); }
.cap-tag { margin-left: auto; font-size: 10.5px; color: var(--ink-mute); font-weight: 600; text-align: right; text-transform: uppercase; letter-spacing: .1em; }
.cap-text { margin: 0; font: 500 clamp(16px, 1.5vw, 20px)/1.45 var(--font-display); color: var(--ink); letter-spacing: -0.02em; min-height: 3em; }
.cap-text .w { opacity: .14; transition: opacity .12s; }
.cap-text .w.on { opacity: 1; }
.cap-text.chair { color: var(--ink-soft); font-weight: 400; }
.cap-sub { margin-top: 8px; font-size: 12.5px; color: var(--ink-mute); min-height: 1em; }
.dots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bob 1.1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
.cruxes { display: grid; gap: 8px; width: 100%; text-align: left; }
.cruxes .head { font: 600 15px/1.25 var(--font-display); color: var(--ink); }
.cruxes .note { font-size: 13px; color: var(--ink-soft); margin-top: -2px; }
.crux { background: rgba(8, 10, 14, .7); border: 1px solid var(--hairline-strong); border-radius: 12px; padding: 9px 12px; animation: rise .5s var(--ease-out) both; }
.crux b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 5px; font-weight: 600; }
.crux .sides { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.crux .side { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.crux .faces { display: inline-flex; }
.crux .faces img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; margin-right: -6px; border: 1.5px solid var(--surface); background: var(--surface-3); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.plate { display: grid; gap: 10px; justify-items: center; width: 100%; text-align: center; animation: rise .6s var(--ease-out) both; }
.plate p { margin: 0; font: 500 clamp(15px, 1.4vw, 18px)/1.38 var(--font-display); color: var(--ink); }
.plate .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.plate .row button { background: #ffffff; color: #07121c; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; }
.plate .row button.alt { background: transparent; color: var(--ink); border: 1px solid var(--hairline-strong); }
/* playback controls */
.playbar {
position: absolute; z-index: 38; right: 14px; bottom: 12px; display: flex; gap: 8px; align-items: center;
background: rgba(7, 18, 28, .82); border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 4px 4px 12px; backdrop-filter: blur(6px);
}
.playbar .queue { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.speed { display: flex; gap: 2px; }
.speed button, .skip { background: transparent; border: 0; color: var(--ink-mute); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 999px; }
.speed button[aria-pressed="true"] { background: #ffffff; color: #07121c; }
.skip { color: var(--ink-soft); border: 1px solid var(--hairline-strong); }
.skip:hover, .speed button:hover { color: var(--ink); }
/* ---------------- side panel ---------------- */
.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); position: sticky; top: 72px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--hairline); }
.tabs button { flex: 1; background: none; border: 0; padding: 12px 8px; font-weight: 600; font-size: 13px; color: var(--ink-mute); border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button:disabled { opacity: .4; cursor: default; }
.tabpanel { overflow-y: auto; padding: 14px 14px 20px; display: grid; gap: 10px; align-content: start; }
.empty { color: var(--ink-mute); font-size: 13.5px; padding: 18px 4px; }
.feed-phase { font: 600 10.5px/1 var(--font-text); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); padding: 10px 0 2px; display: flex; align-items: center; gap: 8px; }
.feed-phase::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.feed-card { border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); cursor: pointer; animation: rise .35s var(--ease-out) both; transition: border-color .2s; }
.feed-card:hover { border-color: var(--accent); }
.feed-card .h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--surface-3); flex: none; border: 1px solid var(--hairline-strong); }
.feed-card .h .r { margin-left: auto; font-size: 11px; color: var(--ink-mute); font-weight: 500; }
.feed-card p { margin: 7px 0 0; font-size: 13px; color: var(--ink-soft); }
.feed-card .q { font-size: 11.5px; color: var(--ink-mute); margin-top: 6px; }
.feed-note { font-size: 13px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px; color: var(--ink-soft); }
.feed-note b { color: var(--ink); font-weight: 600; }
.feed-note ul { margin: 6px 0 0; padding-left: 18px; }
.brief-block h4 { margin: 12px 0 4px; font: 600 14px/1.2 var(--font-display); color: var(--ink); }
.brief-block p, .brief-block li { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 4px; }
.brief-block ul { padding-left: 18px; margin: 0; }
.wtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wtable td { padding: 6px 4px; border-top: 1px solid var(--hairline); vertical-align: top; color: var(--ink-soft); }
.wtable td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
/* ---------------- dialogs ---------------- */
.card-dialog { border: 1px solid var(--hairline-strong); border-radius: 18px; padding: 22px 24px; width: min(660px, 92vw); max-height: 86vh; background: var(--surface); color: var(--ink-soft); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.card-dialog::backdrop { background: rgba(4, 6, 9, .66); backdrop-filter: blur(3px); }
.card-dialog pre { white-space: pre-wrap; font: 14px/1.6 var(--font-text); color: var(--ink-soft); margin: 10px 0 14px; }
.card-dialog h3 { font: 600 22px/1.2 var(--font-display); margin: 0 0 4px; color: var(--ink); }
.card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.card-head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--surface-3); border: 1px solid var(--hairline-strong); }
.qcheck { font-size: 12px; margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 4px; }
.qcheck li::before { content: "✓ "; color: var(--go); font-weight: 800; }
.qcheck li.bad::before { content: "? "; color: var(--dissent); }
.history { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.history button { width: 100%; text-align: left; background: var(--surface-2); color: var(--ink); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; }
.history button:hover { border-color: var(--accent); }
.history small { display: block; color: var(--ink-mute); }
/* ---------------- verdict sheet ---------------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(4, 6, 9, .7); display: grid; place-items: end center; overflow-y: auto; padding: 40px 16px 0; animation: fadein .3s both; }
@keyframes fadein { from { opacity: 0; } }
.sheet-inner { width: min(980px, 100%); background: var(--surface); border: 1px solid var(--hairline-strong); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 30px 36px 50px; animation: slideup .55s var(--ease-out) both; }
@keyframes slideup { from { transform: translateY(80px); opacity: 0; } }
.v-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.v-label { display: inline-block; font: 700 clamp(24px, 3.4vw, 38px)/1 var(--font-display); letter-spacing: -0.03em; padding: 10px 18px; border-radius: 14px; color: #04140b; background: var(--go); animation: stampbig .6s .2s cubic-bezier(.2, 1.5, .4, 1) both; margin-top: 6px; }
.v-label.reshape, .v-label.wait { background: var(--amend); color: #1c1203; }
.v-label.dont { background: var(--dissent); color: #1e0505; }
@keyframes stampbig { from { transform: scale(1.6) rotate(-6deg); opacity: 0; } }
.v-call { font: 500 clamp(18px, 1.9vw, 22px)/1.4 var(--font-display); margin: 18px 0 8px; color: var(--ink); letter-spacing: -0.03em; }
.v-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 22px; }
.v-stats span { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); }
.v-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 34px; }
.v-sec h3 { font: 600 16px/1.2 var(--font-display); margin: 0 0 10px; color: var(--ink); }
.v-sec ul, .v-sec ol { margin: 0; padding-left: 18px; }
.v-sec li { margin-bottom: 7px; font-size: 14px; color: var(--ink-soft); }
.v-sec li b { color: var(--ink); font-weight: 600; }
.v-sec .tag { font-size: 11.5px; color: var(--ink-mute); }
.v-wide { grid-column: 1 / -1; }
.v-opts { display: grid; gap: 10px; }
.scorecard { width: 100%; border-collapse: collapse; font-size: 13px; }
.scorecard th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-mute); padding: 6px; border-bottom: 1px solid var(--hairline); }
.scorecard td { padding: 8px 6px; border-bottom: 1px solid var(--hairline); vertical-align: middle; color: var(--ink-soft); }
.scorecard td.n { font: 600 15px/1 var(--font-display); text-align: center; color: var(--ink); }
.scorecard .who { display: flex; gap: 8px; align-items: center; font-weight: 600; white-space: nowrap; color: var(--ink); }
.scorecard .line { font-size: 12.5px; }
.minority { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 16px; }
.minority .who { display: flex; gap: 8px; align-items: center; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.minority q { font: 500 15px/1.45 var(--font-display); display: block; margin: 8px 0; color: var(--ink); }
.boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.box { border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); font-size: 13.5px; color: var(--ink-soft); }
.box b { display: block; font: 600 14px/1.2 var(--font-display); color: var(--ink); margin-bottom: 4px; }
.v-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; flex-wrap: wrap; }
.v-foot .muted { font-size: 12px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--surface-3); color: var(--ink); border: 1px solid var(--hairline-strong); padding: 10px 16px; border-radius: 10px; z-index: 60; font-size: 13.5px; max-width: 90vw; }
.disclaimer { text-align: center; font-size: 11.5px; color: var(--ink-mute); margin: 0 0 18px; padding: 0 16px; }
/* ---------------- responsive ---------------- */
@media (max-width: 1220px) {
.layout { grid-template-columns: minmax(0, 1fr); }
.panel { position: static; max-height: 70vh; }
.stepper li { padding: 6px 8px; }
}
@media (max-width: 820px) {
.topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
.stepper { order: 3; width: 100%; overflow-x: auto; margin: 0; }
.usage { display: none; }
.topic { flex-direction: column; align-items: stretch; margin: 12px 16px 0; padding: 14px 16px; }
.options { min-width: 0; max-width: none; flex: none; }
.layout { padding: 12px 16px 24px; }
body { overflow-x: hidden; }
.stage { aspect-ratio: auto; min-height: 0; max-height: none; overflow: visible; display: flex; flex-direction: column; }
.stage .scene { position: relative; }
.nameplate { min-width: 0; padding: 3px 6px 4px; border-radius: 8px; }
.nameplate small, .nameplate .meta .pips { display: none; }
.nameplate b { font-size: 11px; }
.center { position: relative !important; left: auto !important; top: auto !important; width: auto !important; height: auto !important; padding: 16px; border-top: 1px solid var(--hairline); background: var(--canvas); border-radius: 0 0 20px 20px; }
.composer-row { justify-content: center; }
.mode { flex-wrap: wrap; justify-content: center; }
.playbar { position: static; margin: 0 16px 14px; justify-content: space-between; align-self: stretch; }
.think { padding: 4px 6px; }
.think i { width: 4px; height: 4px; }
.v-grid, .boxes { grid-template-columns: 1fr; }
.sheet-inner { padding: 22px 18px 40px; }
.scorecard .line { display: none; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* AIS arrival: blocks fade and rise, headings type in per character */
.arrive { animation: rise 1s var(--ease-out) both; }
.typein .ch { display: inline-block; opacity: 0; filter: blur(6px); animation: chin .5s var(--ease-out) forwards; white-space: pre; }
@keyframes chin { to { opacity: 1; filter: blur(0); } }
/* viewer mode: waiting for a council started in Claude Code */
.waiting { display: grid; gap: 12px; justify-items: center; text-align: center; width: min(560px, 100%); }
.waiting h2 { font: 500 clamp(20px, 2vw, 28px)/1.15 var(--font-display); margin: 0; color: var(--ink); letter-spacing: var(--track-head); }
.waiting p { margin: 0; color: var(--ink-soft); font-size: 14px; max-width: 48ch; }
.waiting code { font: 600 13px/1 var(--font-text); color: var(--ink); background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: 8px; padding: 7px 10px; }
.waiting .pulse { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.waiting .pulse i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bob 1.6s infinite ease-in-out; }
.waiting .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
/* simplified record and verdict */
.panel-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--hairline); font: 600 11px/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.feed-card { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 12px; }
.feed-card .h { font-size: 13px; }
.feed-card p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; }
.feed-note b { font-weight: 600; }
.v-meta { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-mute); }
.v-meta b { color: var(--ink-soft); font-weight: 600; }
.v-why, .v-steps { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 10px; }
.v-why li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin: 0 !important; }
.v-steps li { margin: 0 !important; }
.v-steps li b { display: inline-block; min-width: 64px; color: var(--ink); font-weight: 600; }
.v-more { margin-top: 28px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.v-more summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-soft); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.v-more summary::-webkit-details-marker { display: none; }
.v-more summary::before { content: "+"; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--hairline-strong); display: grid; place-items: center; font-size: 13px; }
.v-more[open] summary::before { content: "−"; }
.v-more[open] summary { margin-bottom: 20px; }
.v-sec p { font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
.nameplate small, .nameplate .pips { display: none !important; }