/* Forge Labs — the council's room, in Forge's own identity: Geist, warm
   neutrals, the ember accent, and the blacksmith's heat scale that follows an
   idea from the council (cold iron) to the review (white-hot gold). The
   debate's live view stays a dark « forge » card. */
:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #f2efeb;
  --line: #e4e0d8;
  --line-2: #ece8e1;
  --text: #1c1a17;
  --text-body: #57524b;
  --muted: #6b665f;
  --faint: #a8a39b;
  --accent: #b8613f;
  --accent-hover: #a8543a;
  --accent-soft: #f4e4db;
  --accent-ink: #a8543a;
  --ok: #3f7a4e;
  --ok-soft: #e3efe5;
  --warn: #a86a1c;
  --warn-soft: #f6ebd9;
  --bad: #b3261e;
  --bad-soft: #f7e1de;
  --side: #191714;
  --side-2: #262320;
  --side-text: #c9c5bf;
  --side-muted: #a8a39b;
  /* The heat scale: an idea heats up as it moves on. */
  --heat-0: #8a847b;
  --heat-1: #8c3b2a;
  --heat-2: #b8613f;
  --heat-3: #d9822b;
  --heat-4: #e3a13a;
  --heat-5: #e9bb45;
  /* The forge card (live view of the debate) */
  --fer: #191714;
  --fer-2: #221f1b;
  --acier: #3a352e;
  --cendre: #a8a39b;
  --texte: #f5f3ef;
  --braise: #cf7250;
  --incandescent: #e9bb45;
  --blanc: #fff2d0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.05);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── Shell ──────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 22px 14px 16px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; text-decoration: none; }
.brand-tile { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(180deg, #cf7250, #a8543a); display: grid; place-items: center; position: relative; flex: none; }
.brand-tile img { width: 26px; height: 26px; display: block; }
/* The « Labs » touch: a white-hot spark, the top of the heat scale. */
.brand-spark { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--heat-5); box-shadow: 0 0 0 2.5px var(--side), 0 0 10px rgba(233, 187, 69, 0.7); }
.brand-text { display: grid; line-height: 1.2; }
.brand-text b { color: #fff; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand-text b em { font-style: normal; font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--heat-5); border: 1px solid rgba(233, 187, 69, 0.45); border-radius: 5px; padding: 0 5px; margin-left: 4px; vertical-align: 2px; }
.brand-text span { color: var(--side-muted); font-size: 12px; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; text-decoration: none; color: var(--side-text); font-weight: 500; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: var(--side-2); color: #fff; font-weight: 600; }
.nav a svg { color: var(--side-muted); }
.nav a.active svg { color: var(--braise); }
.nav-badge:not(:empty) { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--braise); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.nav-badge.soft:not(:empty) { background: var(--side-2); color: var(--side-text); box-shadow: inset 0 0 0 1px #3a352e; }
.nav-live { margin-left: auto; font-size: 11.5px; color: #e89a7c; display: flex; align-items: center; gap: 5px; }
.nav-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--braise); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.side-foot { margin-top: auto; display: grid; gap: 16px; padding: 14px 4px 0; }
.side-label { font-size: 11.5px; font-weight: 600; color: var(--side-muted); padding: 0 8px; display: block; margin-bottom: 4px; }
.host-nav { padding-top: 12px; border-top: 1px solid var(--side-2); }
.pilot { font-size: 12.5px; color: var(--side-muted); line-height: 1.45; padding: 0 8px; }
.pilot b { color: var(--side-text); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.pilot b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--side-muted); }
.pilot.on b::before { background: #6fbf85; }
.me-block { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--side-2); }
.me-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--side-2); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.me-avatar.sm { width: 28px; height: 28px; background: var(--surface-2); color: var(--text); font-size: 12.5px; }
.me-text { display: grid; line-height: 1.3; min-width: 0; }
.me-text b { color: #fff; font-size: 13.5px; }
.me-change { background: none; border: none; padding: 0; color: var(--side-muted); font-size: 12px; cursor: pointer; text-align: left; }
.me-change:hover { color: var(--side-text); text-decoration: underline; }
.me-ask { display: grid; gap: 5px; width: 100%; font-size: 12.5px; color: var(--side-muted); }
.me-ask input[type="text"] { background: var(--side-2); border: 1px solid #3a352e; border-radius: 8px; padding: 7px 9px; color: #fff; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; padding: 0 8px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 30px; height: 18px; border-radius: 999px; background: #3a352e; position: relative; transition: background 0.15s; }
.switch-ui::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + .switch-ui { background: var(--braise); }
.switch input:checked + .switch-ui::after { transform: translateX(12px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--braise); outline-offset: 2px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 34px 48px 8px; background: var(--bg); }
.topbar-title { min-width: 0; flex: 1; }
.topbar h1 { font-size: 30px; letter-spacing: -0.02em; }
.topbar p { color: var(--text-body); margin-top: 4px; font-size: 15.5px; }
body[data-route="idee"] .topbar-title { display: none; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.demo-chip { font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.demo-chip.engine-live { color: var(--ok); background: var(--ok-soft); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; }
.page { padding: 22px 48px 72px; display: grid; gap: 24px; align-content: start; max-width: 1320px; width: 100%; }

/* ── Primitives ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 500; white-space: nowrap; box-shadow: var(--shadow); text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.link { background: none; border: none; padding: 0; color: var(--accent-ink); font-weight: 500; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 15px; }
.card-head p { color: var(--muted); font-size: 13px; }
.card-body { padding: 20px; }
.muted { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.badge.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.badge.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty-state p { max-width: 52ch; margin: 0 auto; }
input[type="text"], textarea, select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
textarea { min-height: 76px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Home ───────────────────────────────────────────────────────────────── */
.callout { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.callout-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.callout-icon svg { width: 20px; height: 20px; }
.callout.live .callout-icon { background: var(--accent); color: #fff; }
.callout.done .callout-icon { background: var(--ok-soft); color: var(--ok); }
.callout.idle .callout-icon { background: var(--surface-2); color: var(--muted); }
.callout-text { flex: 1; min-width: 0; }
.callout-text b { font-weight: 600; font-size: 15px; display: block; }
.callout-text span { color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.kpi-note { color: var(--faint); font-size: 12.5px; margin-top: 4px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.home-col { display: grid; gap: 24px; min-width: 0; }
.quick-idea h3 { font-size: 20px; margin: 4px 0 6px; }
.quick-idea .problem { color: var(--muted); max-width: 70ch; }
.quick-votes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 36px; bottom: -6px; width: 2px; background: var(--line); }
.steps .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); z-index: 1; }
.steps li.past .num { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.steps li.now .num { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.steps b { font-weight: 600; display: block; }
.steps span { color: var(--muted); font-size: 13.5px; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; }
.activity li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.activity li:last-child { border-bottom: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: color-mix(in srgb, var(--c, #999) 14%, white); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c, #999) 55%, white); flex: none; }
.activity .who { font-weight: 600; }
.activity .what { color: var(--muted); }
.activity .say { color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ── Vote cards ─────────────────────────────────────────────────────────── */
.idea-card { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); overflow: hidden; }
.idea-main { padding: 28px; display: grid; gap: 14px; align-content: start; }
.idea-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.idea-title { font-size: 26px; letter-spacing: -0.02em; }
.idea-problem { font-size: 16px; color: var(--muted); max-width: 68ch; }
.ba { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ba div { padding: 12px 14px; }
.ba div + div { border-left: 1px solid var(--line); background: var(--ok-soft); }
.ba small { display: block; color: var(--muted); font-size: 12.5px; }
.objection { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.objection .by { color: var(--muted); font-size: 13px; }
.objection .q { margin-top: 4px; font-style: italic; }
.objection .a { margin-top: 6px; color: var(--ok); font-size: 13.5px; }
.idea-side { background: var(--surface-2); border-left: 1px solid var(--line); padding: 28px; display: grid; gap: 14px; align-content: start; }
.idea-side h3 { font-size: 15px; }
.idea-side .hook { font-style: italic; }
.idea-side ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; }
.idea-side video { width: 100%; border-radius: 10px; background: #000; display: block; }
.vote-zone { grid-column: 1 / -1; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.vote-form { padding: 24px 28px; display: grid; gap: 12px; align-content: start; }
.vote-form h3, .vote-results h3 { font-size: 15px; }
.vote-btn .e { font-size: 20px; line-height: 1; }
.vote-btn:hover { border-color: #c9cdd4; background: var(--surface-2); }
.voted { color: var(--ok); font-size: 13.5px; }
.vote-results { padding: 24px 28px; border-left: 1px solid var(--line); display: grid; gap: 14px; align-content: start; background: var(--surface-2); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.compare b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.compare span { color: var(--muted); font-size: 12.5px; }
.tally { display: grid; gap: 8px; }
.t-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13.5px; }
.t-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.t-row .bar span { display: block; height: 100%; border-radius: 99px; }
.comments { display: grid; gap: 12px; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.comment .c-who { font-weight: 600; font-size: 13px; }
.comment .reply { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--c, var(--line)); font-size: 13px; color: var(--muted); }
.comment .reply b { color: var(--text); font-weight: 600; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.host-bar { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding: 16px 28px; background: #fffaf8; display: grid; gap: 10px; }
.host-bar h4 { font-size: 12.5px; color: var(--accent-ink); font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input[type="text"] { flex: 1; min-width: 180px; width: auto; }
pre.preview { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12.5px; max-height: 260px; overflow: auto; margin: 0; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.chip-filter { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--muted); }
.chip-filter.on { background: var(--text); border-color: var(--text); color: #fff; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 14px 20px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover td { background: var(--surface-2); }
table.data td small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.score { font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* ── Debates ────────────────────────────────────────────────────────────── */
.debate-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.session-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; max-height: calc(100vh - 180px); overflow-y: auto; }
.session-list button { width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; }
.session-list button:hover { background: var(--surface-2); }
.session-list button.active { background: var(--accent-soft); }
.session-list .s-date { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.session-list .s-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debate-main { display: grid; gap: 24px; min-width: 0; }
.debate-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.phases { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.phases li { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.phases li.done { color: var(--text); }
.phases li.done::before { content: "✓ "; color: var(--ok); }
.phases li.current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }

/* The live view: the council around the anvil, on a dark forge card. */
.forge { position: relative; height: clamp(400px, 52vh, 540px); border-radius: var(--radius); overflow: hidden; color: var(--texte);
  background: radial-gradient(ellipse 34% 30% at 50% 54%, rgba(255, 77, 46, var(--fire, 0.16)), transparent 70%), radial-gradient(ellipse 80% 70% at 50% 50%, #151c24, var(--fer) 75%); }
.forge-legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 4px; align-items: center; font-size: 11.5px; color: var(--cendre); z-index: 3; }
.forge-legend i { display: block; width: 26px; height: 5px; border-radius: 2px; }
.forge-legend span { margin-right: 6px; }
.forge-tools { position: absolute; right: 14px; top: 14px; z-index: 3; }
.forge-tools .btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; }
.forge-tools .btn:hover { background: rgba(255, 255, 255, 0.16); }
.table-top { position: absolute; left: 50%; top: 50%; width: 60%; height: 56%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #1b232d, #121820 70%); box-shadow: inset 0 0 0 1px #26303c, inset 0 18px 60px rgba(0, 0, 0, 0.55), 0 30px 80px rgba(0, 0, 0, 0.5); }
.seat { --c: #888; position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; width: 150px; text-align: center; z-index: 2; }
.medal { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 25px; background: radial-gradient(circle at 35% 30%, #2d3744, #151b22 70%); box-shadow: 0 0 0 3px var(--fer), 0 0 0 5px color-mix(in srgb, var(--c) 55%, var(--acier)), 0 10px 24px rgba(0, 0, 0, 0.6); transition: box-shadow 0.35s, transform 0.35s; }
.seat-name { font-weight: 600; font-size: 14px; }
.seat-role { font-size: 12px; color: var(--cendre); line-height: 1.25; }
.seat.speaking .medal { transform: scale(1.08); box-shadow: 0 0 0 3px var(--fer), 0 0 0 5px var(--c), 0 0 30px color-mix(in srgb, var(--c) 70%, transparent); }
.bubble { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 260px; background: #fff; color: var(--text); padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; text-align: left; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); animation: speak 0.3s ease-out; }
.bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; }
.seat.low .bubble { bottom: auto; top: calc(100% + 8px); }
.seat.low .bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #fff; }
@keyframes speak { from { opacity: 0; transform: translate(-50%, 6px); } }
.anvil { position: absolute; left: 50%; top: 53%; transform: translate(-50%, -50%); width: min(400px, 42%); display: grid; justify-items: center; z-index: 1; }
.ingots { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px; min-height: 36px; padding: 0 12px; }
.anvil-body { width: 100%; height: 78px; background: linear-gradient(180deg, #8d99a8 0%, #5b6674 14%, #39424e 45%, #262e38 100%); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.6)); clip-path: polygon(0 0, 100% 0, 100% 18%, 84% 30%, 72% 34%, 70% 70%, 86% 100%, 14% 100%, 30% 70%, 28% 34%, 12% 28%, 0 12%); }
.anvil-caption { min-height: 40px; margin-top: 10px; text-align: center; font-size: 13.5px; color: var(--cendre); max-width: 42ch; }
.anvil-caption b { color: var(--texte); font-weight: 600; }
.ingot { --h: #3b4654; --g: transparent; position: relative; width: 76px; height: 28px; border: none; padding: 0; cursor: pointer; background: linear-gradient(180deg, color-mix(in srgb, var(--h) 70%, white) 0%, var(--h) 45%, color-mix(in srgb, var(--h) 70%, black) 100%); clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 12px var(--g)); transition: background 0.8s, filter 0.8s, opacity 0.5s, transform 0.5s; color: rgba(0, 0, 0, 0.72); font: 600 12px/28px var(--font); }
.ingot.cold { color: var(--cendre); }
.ingot.fire { animation: smoulder 2.4s ease-in-out infinite; }
@keyframes smoulder { 50% { filter: drop-shadow(0 0 16px rgba(201, 49, 26, 0.55)); } }
.ingot.selected { transform: translateY(-6px); }
.ingot.out { opacity: 0.35; transform: translateY(4px); }
.ingot.vetoed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 46%, rgba(0, 0, 0, 0.85) 47%, rgba(0, 0, 0, 0.85) 50%, transparent 51%); }
.ingot.retained { width: 96px; height: 32px; line-height: 32px; animation: white-hot 1.8s ease-in-out infinite; }
@keyframes white-hot { 50% { filter: drop-shadow(0 0 24px rgba(255, 242, 208, 0.95)) drop-shadow(0 0 50px rgba(255, 185, 56, 0.5)); } }

.feed { display: grid; gap: 2px; max-height: 620px; overflow-y: auto; padding-bottom: 8px; }
.feed-phase { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 14px 20px 6px; }
.line { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 20px; }
.line:hover { background: var(--surface-2); }
.line .meta { font-size: 13px; color: var(--muted); }
.line .meta b { color: var(--text); font-weight: 600; }
.line .ref { color: var(--accent-ink); cursor: pointer; font-weight: 500; }
.line .say { margin-top: 1px; }
.line.error .say { color: var(--bad); }
.line .veto { color: var(--bad); font-weight: 600; }
.verdict-line { margin: 10px 20px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.detail { display: grid; gap: 12px; }
.detail h3 { font-size: 18px; }
.d-votes { display: grid; gap: 8px; }
.d-vote { display: grid; grid-template-columns: 110px 1fr 24px; gap: 10px; align-items: center; font-size: 13px; }
.d-vote .bar { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.d-vote .bar span { display: block; height: 100%; border-radius: 99px; }
.d-vote .n { font-weight: 600; text-align: right; }

/* ── Insights (the council's own dashboards) ────────────────────────────── */
.boards-grid { display: grid; gap: 24px; }
.board .board-by { color: var(--faint); font-size: 12.5px; }
.board-widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 20px; }
.widget { border: 1px solid var(--line-2); border-radius: 10px; padding: 16px; min-width: 0; background: var(--surface-2); }
.widget h4 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.w-chiffre { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.w-chiffre h4 { margin: 4px 0 0; }
.w-number { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.w-bar { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.w-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-track { height: 8px; background: var(--line); border-radius: 0 4px 4px 0; }
.w-track span { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.w-value { font-weight: 600; min-width: 2.5ch; text-align: right; }
.w-table { grid-column: 1 / -1; }
.w-scroll { overflow-x: auto; }
.w-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.w-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.w-table td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line-2); }
.w-empty { color: var(--muted); font-size: 13px; }
.w-error { color: var(--bad); font-size: 13px; }

/* ── Agents ─────────────────────────────────────────────────────────────── */
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.agent { padding: 20px; display: grid; gap: 12px; align-content: start; }
.agent-head { display: flex; gap: 12px; align-items: center; }
.agent-head .avatar { width: 42px; height: 42px; font-size: 21px; }
.agent-head b { display: block; font-weight: 600; }
.agent-head span { color: var(--muted); font-size: 13px; }
.agent-mission { color: var(--muted); font-size: 13.5px; }
.agent-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.agent-stats b { display: block; font-size: 18px; font-weight: 600; }
.agent-stats span { color: var(--muted); font-size: 12px; }

.toast { position: fixed; right: 24px; bottom: 24px; background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 30; max-width: min(92vw, 460px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.toast.err { background: var(--bad); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid, .debate-grid, .idea-card, .vote-zone { grid-template-columns: 1fr; }
  .idea-side, .vote-results { border-left: none; border-top: 1px solid var(--line); }
  .debate-layout { grid-template-columns: 1fr; }
  .session-list { max-height: 220px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.4); }
  .menu-btn { display: block; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .forge { height: auto; padding: 16px 12px 44px; display: grid; gap: 16px; }
  .table-top { display: none; }
  #seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 6px; order: 1; }
  .seat { position: static; transform: none; width: auto; }
  .seat .bubble { display: none; }
  .anvil { position: static; transform: none; width: 100%; }
  .quick-votes, .vote-btns { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Audit pass: layout and flow fixes ──────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 13px; }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

/* Home: one call to action, with the vote in it */
.hero { overflow: hidden; border-color: #f4c9bd; }
.hero-head { display: flex; gap: 14px; align-items: center; padding: 16px 20px; background: var(--accent-soft); }
.hero-head b { display: block; font-size: 15px; font-weight: 600; }
.hero-head span { color: var(--accent-ink); font-size: 13.5px; }
.hero-head .callout-icon { background: var(--accent); color: #fff; }
.hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); gap: 24px; padding: 20px; align-items: center; }
.hero-idea h2 { font-size: 22px; letter-spacing: -0.02em; }
.hero-idea p { color: var(--muted); margin: 6px 0 10px; max-width: 62ch; }
a.kpi { text-decoration: none; transition: border-color 0.15s; }
a.kpi:hover { border-color: #c9cdd4; }
.kpi-value.none { font-size: 18px; color: var(--faint); font-weight: 500; margin-top: 12px; }
.mini-list { list-style: none; margin: 0; padding: 6px 8px; }
.mini-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.mini-list a:hover { background: var(--surface-2); }
.mini-list small { display: block; color: var(--muted); font-size: 12.5px; }

/* Vote: the idea on the left, the vote always in view on the right */
.vote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.vote-layout + .vote-layout { margin-top: 8px; padding-top: 32px; border-top: 1px solid var(--line); }
.vote-aside { display: grid; gap: 16px; position: sticky; top: 110px; }
.idea-card { display: block; }
.idea-card .idea-main { padding: 28px; }
.idea-section { padding: 22px 28px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; }
.idea-section h3, .section h3 { font-size: 14px; font-weight: 600; }
.section { display: grid; gap: 4px; }
.idea-section .hook { font-style: italic; }
.scenes { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; }
.idea-card .host-bar { border-radius: 0 0 var(--radius) var(--radius); }
.vote-panel { display: grid; gap: 12px; }
.vote-btns { grid-template-columns: 1fr; }
.vote-btns .vote-btn { grid-template-columns: 28px 1fr; justify-items: start; align-items: center; text-align: left; padding: 11px 14px; font-size: 14px; }
.vote-btns.compact { grid-template-columns: repeat(3, 1fr); }
.vote-btns.compact .vote-btn { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.reason { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: var(--bad-soft); }
.reason .field { color: var(--bad); font-weight: 500; }
.add-comment summary { cursor: pointer; color: var(--accent-ink); font-weight: 500; font-size: 13.5px; }
.add-comment textarea { margin-top: 8px; }
.add-comment p { margin-top: 6px; }
.voted { display: flex; gap: 8px; align-items: flex-start; }
.voted svg { color: var(--ok); margin-top: 2px; }

/* Ideas table */
.chip-filter { display: inline-flex; gap: 6px; align-items: center; }
.chip-filter span { font-size: 12px; padding: 0 6px; border-radius: 999px; background: var(--line-2); color: var(--muted); }
.chip-filter.on span { background: rgba(255, 255, 255, 0.2); color: #fff; }
.idea-cell { max-width: 460px; }
.score-cell { display: inline-flex; gap: 8px; align-items: center; }
table.data tbody tr.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Debates: the table full width, the selected idea follows the scroll */
.card-head .session-pick { flex: none; }
.card-head .session-pick select { width: auto; max-width: 340px; }
.forge { height: clamp(460px, 58vh, 580px); }
.anvil { top: 46%; }
.anvil-caption { position: absolute; left: 50%; top: calc(46% + 70px); transform: translateX(-50%); width: min(420px, 40%); margin: 0; z-index: 2; }
.feed { max-height: none; overflow: visible; }
.detail-card { position: sticky; top: 110px; }
.ref { background: none; border: none; padding: 0; font: inherit; color: var(--accent-ink); cursor: pointer; font-weight: 500; text-align: left; }
.ref:hover { text-decoration: underline; }

/* Agents */
.agent-model .badge { font-family: var(--font); }
.agent-mission { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 1100px) {
  .vote-layout, .hero-body { grid-template-columns: 1fr; }
  .vote-aside, .detail-card { position: static; }

}
@media (max-width: 760px) {
  .topbar { padding-top: 14px; padding-bottom: 12px; }
  .topbar p { display: none; }
  .demo-chip { font-size: 11.5px; padding: 3px 8px; }
  .card-head { flex-wrap: wrap; }
  .card-head .session-pick, .card-head .session-pick select { width: 100%; max-width: none; }
  .anvil-caption { position: static; transform: none; width: 100%; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 24px; }
  .idea-card .idea-main, .idea-section { padding: 18px; }
}
.reason:not([hidden]) ~ .add-comment { display: none; }

/* Concept video being rendered */
.render { display: grid; gap: 8px; padding: 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.render-head { display: flex; align-items: center; gap: 10px; }
.render-head b { font-weight: 600; flex: 1; }
.render-head span:last-child { font-weight: 600; color: var(--accent-ink); }
.render-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.render-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.6s; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.render-error { color: var(--bad); font-size: 13.5px; }
.scenes li b { font-weight: 600; color: var(--text); }
.idea-card .idea-main { padding-bottom: 20px; }
.idea-section video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; display: block; background: #000; }
.video-section { padding-top: 0; border-top: none; }
.demo-chip.engine-live { color: var(--ok); background: var(--ok-soft); }

/* ── Live follow-up of a session ────────────────────────────────────────── */
.live-head { padding: 20px 24px; display: grid; gap: 12px; }
.live-top { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.live-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.live-title h2 { font-size: 20px; letter-spacing: -0.02em; }
.live-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.live-badge.replay { background: var(--text); }
.live-help { color: var(--muted); font-size: 15px; max-width: 80ch; }
.stepper { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.stepper li { display: grid; gap: 6px; justify-items: start; font-size: 12.5px; color: var(--faint); position: relative; padding-top: 4px; border-top: 3px solid var(--line); }
.stepper li.done { color: var(--muted); border-top-color: var(--ok); }
.stepper li.now { color: var(--text); font-weight: 600; border-top-color: var(--accent); }
.stepper .dot { display: none; }
.stepper .lbl { line-height: 1.25; }
.view-switch { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.view-switch [data-view] { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 14px; cursor: pointer; color: var(--muted); font-weight: 500; }
.view-switch [data-view][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.view-switch .session-pick { margin-left: auto; }
.view-switch select { width: auto; max-width: 360px; padding: 6px 10px; }
#debate-body { display: grid; gap: 24px; }
.agents-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 16px 20px 20px; }
.agent-live { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: border-color 0.3s, background 0.3s; }
.agent-live-text { display: grid; min-width: 0; }
.agent-live-text b { font-weight: 600; font-size: 13.5px; }
.agent-live-text > span { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.agent-live { align-items: flex-start; }
.agent-live .spinner { margin-top: 2px; }
.agent-live.thinking { border-color: color-mix(in srgb, var(--c) 60%, white); background: color-mix(in srgb, var(--c) 7%, white); }
.agent-live.thinking .agent-live-text > span { color: var(--text); }
.agent-live.done .agent-live-text > span { color: var(--ok); }
.agent-live.error .agent-live-text > span { color: var(--bad); }
.agent-live.idle { opacity: 0.6; }
.agent-live .spinner { width: 12px; height: 12px; flex: none; border-width: 2px; }
.idea-board { display: grid; gap: 8px; padding: 14px 16px 18px; }
.idea-row { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.idea-row:hover { border-color: #c9cdd4; }
.idea-row.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.idea-row.out { opacity: 0.6; }
.idea-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.idea-row-top b { font-weight: 600; }
.idea-row-meta { font-size: 13px; color: var(--muted); }
.idea-row-bar { position: relative; height: 5px; border-radius: 99px; background: var(--line-2); margin-top: 4px; }
.idea-row-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; transition: width 0.6s; }
.idea-row-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: 0.35; }
.empty-note { color: var(--muted); padding: 20px; margin: 0; }
.line .when { float: right; color: var(--faint); font-size: 12px; margin-left: 10px; }
.sev { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.sev.bloquante { background: var(--bad-soft); color: var(--bad); }
.bubble.thinking { background: rgba(255, 255, 255, 0.85); color: var(--muted); font-style: italic; }
@media (max-width: 1100px) { .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 12px; } }
@media (max-width: 760px) { .view-switch { flex-wrap: wrap; } .view-switch .session-pick { margin-left: 0; width: 100%; } .view-switch select { max-width: none; width: 100%; } }
.bubble { overflow-wrap: anywhere; }
.seat.speaking { z-index: 5; }

/* Proposer une idée */
.propose-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.propose-form { display: grid; gap: 14px; }
.propose-form .field { color: var(--text); font-weight: 500; }
.req { font-weight: 400; font-size: 12px; color: var(--accent-ink); margin-left: 4px; }
.express { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); display: grid; gap: 8px; justify-items: start; }
.nav-badge.soft:not(:empty) { background: #2a2e36; color: var(--side-text); }
@media (max-width: 1100px) { .propose-grid { grid-template-columns: 1fr; } }
.sev.amended { background: var(--ok-soft); color: var(--ok); }

/* The decision once it has fallen, and how the open vote will end. */
.decision-note { display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px; }
.decision-note.ok { background: var(--ok-soft); color: var(--ok); }
.decision-note.bad { background: var(--bad-soft); color: var(--bad); }
.decision-note span { color: var(--text); font-size: 14px; }
.decision-note small { color: var(--muted); font-size: 12.5px; }
.vote-rule { margin-top: 10px; }

/* Development: one card per accepted idea. */
.dev-list { display: grid; gap: 16px; margin-top: 16px; }
.dev-stepper { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stepper li.stop { color: var(--bad); font-weight: 600; border-top-color: var(--bad); }
.dev-activity h3, .dev-card .section h3 { font-size: 13px; margin-bottom: 6px; }
.dev-activity ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
.dev-activity li.now { color: var(--text); font-weight: 500; }
.checks, .commits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.checks li.ok { color: var(--ok); }
.checks li.bad { color: var(--bad); }
.checks summary { cursor: pointer; }
.checks pre { margin-top: 6px; color: var(--text); }
.pre-line { white-space: pre-line; }
.dev-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head code, .dev-card code { font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.badge-link { text-decoration: none; }
.pr-link { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); text-decoration: none; }
.pr-link span { color: var(--text); font-size: 13.5px; }
.pr-link.draft { background: var(--warn-soft); color: var(--warn); }
.pr-link:hover b { text-decoration: underline; }

/* ══ Forge Labs: the new room ══════════════════════════════════════════════ */

/* Stage pill: the idea's stage, in the heat it has reached. */
.stage { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.stage i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.stage.h0 i { background: var(--heat-0); }
.stage.h1 { background: #f1e1dc; color: var(--heat-1); }
.stage.h2 { background: var(--accent-soft); color: var(--accent-ink); }
.stage.h3 { background: #f8e8d6; color: #9a5a17; }
.stage.h3 i { background: var(--heat-3); }
.stage.h4 { background: #f8eed8; color: #8c6212; }
.stage.h4 i { background: var(--heat-4); }
.stage.h5 { background: #faf1d6; color: #7d6210; }
.stage.h5 i { background: var(--heat-5); }
.stage.hx { background: var(--surface-2); color: var(--muted); }
.stage.hx i { background: var(--faint); }
.t-ok { color: var(--ok); }
.t-warn { color: var(--warn); }
.t-bad { color: var(--bad); }
.small { font-size: 13px; }

/* Tabs (Séances · Les agents · Indicateurs) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: -6px; }
.tab { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* À toi de jouer: the vote first */
.home-vote { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 0; overflow: hidden; border-radius: 18px; align-items: start; }
.home-vote-media { margin: 20px 0 20px 20px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: radial-gradient(120% 120% at 25% 100%, #6a2f1c 0%, #191714 65%); display: grid; }
.home-vote-media video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.video-ph { display: flex; flex-direction: column; justify-content: space-between; padding: 18px; color: var(--texte); }
.video-ph p { font-style: italic; font-size: 16px; line-height: 1.45; max-width: 30ch; }
.video-tag { align-self: flex-start; font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, 0.1); border-radius: 6px; padding: 3px 9px; }
.home-vote-body { padding: 28px 30px; display: grid; gap: 14px; align-content: start; }
.home-vote-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-vote h2 { font-size: 26px; letter-spacing: -0.02em; }
.home-vote h2 a { text-decoration: none; }
.home-vote h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.home-vote-text { color: var(--text-body); font-size: 15px; line-height: 1.6; max-width: 72ch; }
.objection-line { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--text-body); }
.objection-line svg { color: var(--muted); margin-top: 2px; width: 16px; height: 16px; }

/* The vote buttons: « cette semaine » is the one the room hopes for, but it is
   never pre-selected — only the choice made gets the full ember. */
.vote-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vote-panel.compact .vote-btns { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
.vote-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); text-align: left; }
.vote-btn span { min-width: 0; }
.vote-btn svg { width: 17px; height: 17px; color: var(--text-body); }
.vote-btn:hover { border-color: #cfc8bd; background: var(--surface-2); }
.vote-btn.v-semaine { border-color: #e2c1b1; color: var(--accent-ink); }
.vote-btn.v-semaine svg { color: var(--accent); }
.vote-btn.v-semaine:hover { background: var(--accent-soft); }
.vote-btn.picked { background: var(--accent); border-color: var(--accent); color: #fff; }
.vote-btn.picked svg { color: #fff; }
.vote-btn.v-bof.picked { background: var(--warn); border-color: var(--warn); }
.vote-btn.v-non.picked { background: var(--bad); border-color: var(--bad); }
.idea-side .vote-btns, .fiche-side .vote-btns { grid-template-columns: 1fr; }
.fiche-side .vote-btn { justify-content: flex-start; padding: 14px 16px; }

/* The other gestures waiting for me */
.todo-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.todo { display: flex; align-items: center; gap: 16px; padding: 16px 20px; text-decoration: none; background: var(--surface); }
.todo + .todo { border-top: 1px solid var(--line-2); }
.block > .todo { border: 1px solid var(--line); border-radius: 12px; }
.block > .todo + .todo { border-top: 1px solid var(--line); }
.todo:hover { background: var(--surface-2); }
.todo-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.todo-icon.h0 { color: var(--heat-0); }
.todo-icon.h2 { color: var(--heat-2); background: var(--accent-soft); }
.todo-icon.h4 { color: #b47a14; background: #f8eed8; }
.todo-icon.h5 { color: #8c6c0c; background: #faf1d6; }
.todo-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.todo-text b { font-weight: 600; font-size: 15px; }
.todo-text span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The forge at a glance: lanes by stage */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; }
.lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lane { background: var(--surface-2); border-radius: 13px; padding: 12px; display: grid; gap: 8px; align-content: start; min-height: 130px; }
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.lane-head .stage { background: none; padding-left: 2px; }
.lane-n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lane-empty { color: var(--faint); font-size: 13px; padding: 2px 4px; }
.ingot-row { display: flex; gap: 10px; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.ingot-row:hover { border-color: #cfc8bd; }
.ingot-row i { width: 3px; border-radius: 2px; flex: none; background: var(--heat-0); }
.ingot-row i.h2 { background: var(--heat-2); }
.ingot-row i.h3 { background: var(--heat-3); }
.ingot-row i.h4 { background: var(--heat-4); }
.ingot-row i.h5 { background: var(--heat-5); }
.ingot-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ingot-row.soft { background: transparent; border-style: dashed; }

/* Fiche idée */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--text); text-decoration: underline; }
.crumb svg { width: 14px; height: 14px; }
.fiche-head { display: grid; gap: 8px; margin-top: -8px; }
.fiche-head-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fiche-head h1 { font-size: 34px; letter-spacing: -0.025em; line-height: 1.15; }
/* Le fil: seven steps, each in the heat it reaches */
.fil { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.fil li { display: grid; gap: 3px; align-content: start; }
.fil i { height: 4px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.fil b { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.fil span { font-size: 12px; color: var(--faint); }
.fil li.past b, .fil li.now b { color: var(--text); }
.fil li.past span, .fil li.now span { color: var(--muted); }
.fil li.now i { height: 6px; margin-top: -1px; margin-bottom: 5px; }
.fil li.now b { color: var(--accent-ink); font-weight: 700; }
.fil li.past.h0 i, .fil li.now.h0 i { background: var(--heat-0); }
.fil li.past.h1 i, .fil li.now.h1 i { background: var(--heat-1); }
.fil li.past.h2 i, .fil li.now.h2 i { background: var(--heat-2); }
.fil li.past.h3 i, .fil li.now.h3 i { background: var(--heat-3); }
.fil li.past.h4 i, .fil li.now.h4 i { background: var(--heat-4); }
.fil li.past.h5 i, .fil li.now.h5 i { background: var(--heat-5); }
.fil li.stop i { background: var(--faint); }
.fil li.stop b { color: var(--text); }
.fiche-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.fiche-main { display: grid; gap: 30px; min-width: 0; }
.fiche-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.fiche-video { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.fiche-video h3 { font-size: 16px; }
.fiche-video video { width: 100%; border-radius: 12px; background: #000; display: block; }
.fiche-video .hook { font-style: italic; font-size: 15.5px; }
.fiche-video .scenes { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-body); }
.host-more summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.host-more .row { margin-top: 8px; }
body[data-route="idee"] .topbar { padding-top: 18px; padding-bottom: 0; }
.block { display: grid; gap: 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.block-head h2 { font-size: 19px; }
.tag { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.lead { font-size: 16.5px; line-height: 1.65; color: var(--text-body); max-width: 72ch; }
.problem { color: var(--text-body); max-width: 72ch; }
.origin summary { cursor: pointer; color: var(--accent-ink); font-weight: 500; font-size: 13.5px; }
.origin p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.exchange { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; display: grid; gap: 10px; }
.exchange-q { display: grid; grid-template-columns: 30px 1fr; gap: 12px; line-height: 1.55; }
.exchange-q small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.exchange-a { margin-left: 42px; padding-left: 14px; border-left: 2px solid var(--ok); color: var(--ok); line-height: 1.55; }
.side-card { padding: 20px 22px; display: grid; gap: 12px; border-radius: 16px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-head h2 { font-size: 17px; }
.vote-rule { line-height: 1.5; }
.voices { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.voices li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.voices p { font-size: 14px; }
.voice-text { color: var(--text-body); margin-top: 2px; }
.voice-answer { margin-top: 8px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; color: var(--text-body); }
.host-card { background: #fffaf6; border-style: dashed; }
.host-card .host-bar { grid-column: auto; border: none; padding: 0; background: none; }

/* Development and the pull request */
.pr-card { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 16px; background: #fbf3dd; border: 1px solid #ead39a; text-decoration: none; }
.pr-card.draft { background: var(--warn-soft); border-color: #e6c99b; }
.pr-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--heat-5); display: grid; place-items: center; color: var(--side); flex: none; }
.pr-card.draft .pr-icon { background: var(--heat-3); }
.pr-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pr-text b { font-size: 17px; }
.pr-text span { color: var(--text-body); font-size: 13.5px; }
.sub-block { display: grid; gap: 6px; }
.sub-block h3 { font-size: 15.5px; }
.sub-block p { color: var(--text-body); line-height: 1.6; max-width: 72ch; }
.agent-log { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.agent-log li { display: flex; gap: 12px; }
.agent-log li.now { color: var(--text); }
.agent-log span { color: var(--faint); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.checks li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; }
.checks li + li { border-top: 1px solid var(--line-2); }
.checks li.ok svg { color: var(--ok); }
.checks li.bad { color: var(--bad); display: block; }
.checks code { color: var(--text-body); }
.checks summary { cursor: pointer; display: flex; gap: 10px; align-items: center; }
.pre-line { white-space: pre-line; }

/* Tenir le conseil */
.animer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.settle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid #e6c99b; border-radius: 14px; flex-wrap: wrap; }
.settle a { text-decoration: none; }
.settle a:hover b { text-decoration: underline; }
.settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv span { color: var(--text-body); }
.kv b { font-weight: 600; text-align: right; }
.ann-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-body); }

/* ── Phone: one column, the vote under the thumb ─────────────────────────── */
.vote-dock { display: none; }
@media (max-width: 1100px) {
  .fiche-body { grid-template-columns: minmax(0, 1fr); }
  .fiche-side { position: static; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { padding: 16px 16px 4px; }
  .topbar h1 { font-size: 24px; }
  .page { padding: 12px 16px 40px; gap: 18px; }
  .home-vote { grid-template-columns: minmax(0, 1fr); }
  .video-ph { min-height: 190px; }
  .home-vote-body { padding: 20px; }
  .home-vote h2, .fiche-head h1 { font-size: 23px; }
  .vote-panel.compact .vote-btns, .vote-btns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vote-btn.v-semaine { grid-column: 1 / -1; }
  .fil { grid-template-columns: repeat(7, minmax(84px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .pr-card { flex-wrap: wrap; }
  .todo .btn { display: none; }
  .demo-chip { display: none; }
  /* The dock: the three choices fixed at the bottom of the screen. */
  .vote-dock { display: grid; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(28, 26, 23, 0.1); }
  .vote-dock .voted { font-size: 12.5px; }
  body[data-route="idee"] .page { padding-bottom: 190px; }
  body[data-route="idee"] .fiche-side .vote-card .vote-btns { display: none; }
}
.vote-dock-q { font-weight: 600; font-size: 14.5px; }

/* The door: sign in with a Forge account */
.me-role { color: var(--side-muted); font-size: 12px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(90% 70% at 50% 110%, #5a2a1a 0%, var(--side) 60%); }
.login-card { width: min(440px, 100%); background: var(--surface); border-radius: 20px; padding: 36px 32px; display: grid; gap: 16px; justify-items: start; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.login-card h1 { font-size: 30px; letter-spacing: -0.02em; }
.login-card h1 em { font-style: normal; font-family: var(--mono); font-weight: 500; font-size: 15px; color: #8c6c0c; border: 1px solid #e3cf8f; border-radius: 6px; padding: 1px 7px; margin-left: 6px; vertical-align: 5px; }
.login-card p { color: var(--text-body); line-height: 1.6; }
.brand-tile.big { width: 56px; height: 56px; border-radius: 15px; }
.brand-tile.big img { width: 40px; height: 40px; }
.brand-tile.big .brand-spark { width: 16px; height: 16px; box-shadow: 0 0 0 3px var(--surface), 0 0 12px rgba(233, 187, 69, 0.7); }
.login-btn { width: 100%; justify-content: center; padding: 13px 16px; font-size: 15px; }
.login-btn svg { fill: none; stroke: currentColor; }
.login-error { color: var(--bad) !important; background: var(--bad-soft); border-radius: 10px; padding: 10px 12px; width: 100%; font-size: 14px; }

/* Real ideas are long: clamp on the home card, fold on the idea page. */
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.lead-wrap { display: grid; gap: 6px; }
.lead-wrap.folded .lead { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; mask-image: linear-gradient(180deg, #000 70%, transparent); }
.unfold { justify-self: start; font-size: 14px; }
@media (max-width: 760px) { .home-vote-media { margin: 0; border-radius: 0; } }
.vote-panel.compact .vote-btns { display: flex; flex-wrap: wrap; }
.vote-panel.compact .vote-btn { flex: 1 1 auto; white-space: nowrap; }
