/* ============================================================
   Compose — experience operating system
   Cinematic calm: a living dark ground, glass surfaces with
   gradient hairlines, violet identity + one electric undertone,
   green owned by verification. Motion only where state changes.
   ============================================================ */
* { box-sizing: border-box; }

:root {
  /* ground */
  --bg: #07080d;
  --z1: #0c0d15;            /* intent  — faintly warm */
  --z2: #090a11;            /* canvas  — neutral      */
  --z3: #05060b;            /* stage   — coolest      */
  --surface: rgba(255,255,255,.032);
  --surface-solid: #12141f;
  --surface-2: rgba(255,255,255,.055);
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.13);
  /* ink */
  --ink: #f0f1f8;
  --ink-2: #aeb3c7;
  --ink-3: #757a90;
  /* identity + state */
  --violet: #7c5cff;
  --violet-2: #a08bff;
  --violet-ghost: rgba(124,92,255,.13);
  --cyan: #22d3ee;          /* undertone only: ambient + hairlines, never text blocks */
  --green: #34d399;
  --green-ghost: rgba(52,211,153,.12);
  --amber: #f5b74e;
  --amber-ghost: rgba(245,183,78,.10);
  --red: #f0716f;
  /* type */
  --display: "SF Pro Display", -apple-system, "Helvetica Neue", sans-serif;
  --body: "SF Pro Text", -apple-system, "Helvetica Neue", sans-serif;
  --serif: "New York", ui-serif, Georgia, serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  --r: 18px; --r-s: 12px;
  --ease: cubic-bezier(.22,.9,.24,1);
  --stage-color: rgba(255,255,255,.14);
}
:root[data-stage="working"] { --stage-color: var(--amber); }
:root[data-stage="verified"] { --stage-color: var(--green); }
:root[data-stage="live"] { --stage-color: var(--green); }

html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow: hidden;
}
::selection { background: rgba(124,92,255,.35); }
a { color: var(--violet-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- living ground: two drifting light fields + fine grain ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient .orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .55; will-change: transform; }
.ambient .orb.a {
  width: 720px; height: 720px; left: 14%; top: -28%;
  background: radial-gradient(circle, rgba(124,92,255,.16), transparent 65%);
  animation: drift-a 52s ease-in-out infinite alternate;
}
.ambient .orb.b {
  width: 640px; height: 640px; right: -12%; bottom: -30%;
  background: radial-gradient(circle, rgba(34,211,238,.07), transparent 65%);
  animation: drift-b 64s ease-in-out infinite alternate;
}
.ambient::after { /* fine grain — kills the flat-dark deadness */
  content: ""; position: absolute; inset: 0; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(90px, 60px) scale(1.08); } }
@keyframes drift-b { from { transform: translate(0, 0) scale(1.05); } to { transform: translate(-70px, -50px) scale(1); } }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: 340px 1fr; grid-template-rows: minmax(0, 1fr); height: 100vh; }
@media (max-width: 1500px) { .app { grid-template-columns: 300px 1fr; } }

/* explicit placement — rail | workspace; home overlays the workspace */
.intent { grid-column: 1; grid-row: 1; }
.workspace { grid-column: 2; grid-row: 1; position: relative; min-width: 0; display: flex; overflow: hidden; animation: boot .6s var(--ease) .09s both; }
.workspace > .canvas-zone, .workspace > .stage { min-width: 0; }

/* boot choreography — the three zones arrive */
.intent { animation: boot .6s var(--ease) both; }
@keyframes boot { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* scrollbars — quiet */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ ZONE 1 · INTENT ============ */
.intent { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--z1), color-mix(in srgb, var(--z1) 88%, #000)); border-right: 1px solid var(--line); min-width: 0; }

.brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: none; position: relative;
  background: linear-gradient(140deg, #9174ff, #6742e8 58%, #4c2fbb);
  box-shadow: 0 6px 18px rgba(105,72,235,.42), inset 0 1px 0 rgba(255,255,255,.32);
  display: grid; place-items: center; font: 700 18px/1 var(--display); color: #fff;
}
.brand-mark::after { /* specular edge */
  content: ""; position: absolute; inset: 0; border-radius: 11px;
  background: linear-gradient(160deg, rgba(255,255,255,.28), transparent 42%);
}
.brand-id h1 { margin: 0; font: 640 17px/1.2 var(--display); letter-spacing: -.02em; }
.brand-env { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 11.5px; font-family: var(--mono); }
.env-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,.7); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.actor {
  margin-left: auto; appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 500 12px var(--body); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px;
  transition: border-color .2s, color .2s;
}
.actor:hover { border-color: rgba(255,255,255,.24); color: var(--ink); }
.actor:focus { outline: none; border-color: var(--violet); }

.thread { flex: 1; overflow-y: auto; padding: 6px 20px 18px; display: flex; flex-direction: column; gap: 15px; }
.msg { max-width: 100%; animation: rise .32s var(--ease) both; }
.msg.user {
  align-self: flex-end; max-width: 90%;
  background: linear-gradient(140deg, #8465f5, #6d48e8);
  color: #fff; border-radius: 17px 17px 5px 17px;
  padding: 11px 15px; font-size: 14px; line-height: 1.5;
  box-shadow: 0 4px 18px rgba(104,70,232,.32), inset 0 1px 0 rgba(255,255,255,.18);
}
.msg.system { align-self: flex-start; color: var(--ink-2); font-size: 13.5px; line-height: 1.62; padding: 2px 2px 0; }
.msg.system b, .msg.system a { color: var(--ink); font-weight: 570; }
.msg.working { align-self: flex-start; color: var(--ink-3); font-size: 13px; padding: 2px; display: flex; gap: 9px; align-items: center; }
.msg.working::before { content: ""; width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--ink-3); border-top-color: var(--violet-2); animation: spin .8s linear infinite; }
.msg.error { align-self: flex-start; color: var(--red); font-size: 13.5px; padding: 2px; }
.hint { display: inline-block; margin-top: 6px; color: var(--ink-3); font-size: 12px; border: 1px dashed var(--line-2); border-radius: 999px; padding: 3px 11px; }

.composer { display: flex; gap: 10px; padding: 14px 20px 16px; border-top: 1px solid var(--line); }
.composer input {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  color: var(--ink); padding: 13px 16px; font: 400 14px var(--body); outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.composer input::placeholder { color: var(--ink-3); }
.composer input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,92,255,.16), 0 0 24px rgba(124,92,255,.10); background: rgba(255,255,255,.045); }
.composer button {
  width: 46px; border: none; border-radius: 14px; cursor: pointer; font-size: 17px; color: #fff;
  background: linear-gradient(140deg, #8b6bff, #6742e8);
  box-shadow: 0 4px 14px rgba(104,70,232,.34), inset 0 1px 0 rgba(255,255,255,.24);
  transition: transform .15s var(--ease), filter .15s;
}
.composer button:hover { filter: brightness(1.1); }
.composer button:active { transform: scale(.93); }

.evidence-toggle {
  display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; border-top: 1px solid var(--line);
  color: var(--ink-3); padding: 11px 20px; font: 500 11.5px var(--body);
  letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: color .15s;
}
.evidence-toggle:hover { color: var(--ink-2); }
.ev-caret { transition: transform .2s var(--ease); font-size: 10px; }
.evidence-toggle.open .ev-caret { transform: rotate(180deg); }
.evidence { max-height: 270px; overflow-y: auto; border-top: 1px solid var(--line); padding: 12px 20px; }
.ev-row { display: grid; grid-template-columns: 15px 1fr; gap: 9px; padding: 5px 0; font-size: 12px; color: var(--ink-3); animation: rise .25s var(--ease) both; }
.ev-ic { color: var(--green); font-size: 11px; padding-top: 1px; }
.ev-row b { color: var(--ink-2); font-weight: 570; display: block; }
.ev-row span.d { font-family: var(--mono); font-size: 10.5px; word-break: break-all; }

/* ============ ZONE 2 · INTELLIGENCE ============ */
.canvas-zone { background: var(--z2); border-right: 1px solid var(--line); min-width: 0; display: flex; }
.canvas { flex: 1; overflow-y: auto; padding: 24px 22px 44px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }

.canvas-empty { margin: auto; text-align: center; color: var(--ink-3); animation: rise .5s var(--ease) .35s both; }
.ce-glyph { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 17px; border: 1px solid var(--line-2); position: relative; opacity: .8;
  background: linear-gradient(160deg, rgba(255,255,255,.04), transparent); }
.ce-glyph::before, .ce-glyph::after { content: ""; position: absolute; border-radius: 3px; background: var(--line-2); }
.ce-glyph::before { left: 12px; right: 12px; top: 14px; height: 7px; }
.ce-glyph::after { left: 12px; top: 27px; width: 18px; bottom: 14px; }
.canvas-empty p { font-size: 13px; line-height: 1.75; margin: 0; }

/* cards — glass with a gradient hairline */
.card {
  position: relative; background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  border-radius: var(--r); padding: 22px; flex: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 44px rgba(0,0,0,.38);
  animation: rise .42s var(--ease) both;
}
.card::before { /* gradient hairline border */
  content: ""; position: absolute; inset: 0; border-radius: var(--r); padding: 1px; pointer-events: none;
  background: linear-gradient(165deg, rgba(255,255,255,.16), rgba(255,255,255,.05) 38%, rgba(124,92,255,.14) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card.accent-amber::before { background: linear-gradient(165deg, rgba(245,183,78,.5), rgba(245,183,78,.12) 45%, rgba(255,255,255,.06)); }
.card.accent-green::before { background: linear-gradient(165deg, rgba(52,211,153,.55), rgba(52,211,153,.12) 45%, rgba(255,255,255,.06)); }
.card.accent-violet::before { background: linear-gradient(165deg, rgba(124,92,255,.6), rgba(34,211,238,.15) 60%, rgba(255,255,255,.06)); }

.k { font: 600 11px var(--body); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 7px; display: flex; align-items: center; gap: 8px; }
.k .spacer { flex: 1; }
.k .meta { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.card h2.t { margin: 0 0 5px; font: 640 20px/1.28 var(--display); letter-spacing: -.02em; color: var(--ink); }
.card .sub { color: var(--ink-2); font-size: 13.5px; line-height: 1.62; margin: 0; }
.sect { margin-top: 17px; }
.sect + .sect { margin-top: 15px; }
.thesis { font: 460 15.5px/1.7 var(--body); color: var(--ink); letter-spacing: -.005em; margin: 6px 0 0;
  padding-left: 14px; border-left: 2px solid rgba(124,92,255,.45); }

/* stat cells */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 13px 15px; }
.stat b { display: block; font: 640 24px/1.1 var(--display); letter-spacing: -.02em; }
.stat b small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.stat span { color: var(--ink-3); font-size: 11.5px; }

/* service rows */
.svc { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.svc:first-of-type { border-top: none; }
.svc .name { color: var(--ink-2); }
.svc .val { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 550; font-size: 12.5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.ok { background: var(--green); box-shadow: 0 0 7px rgba(52,211,153,.55); }
.dot.warn { background: var(--amber); } .dot.violet { background: var(--violet-2); }

/* capability browser */
details.browse { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 11px; }
details.browse summary { cursor: pointer; color: var(--ink-3); font-size: 12.5px; list-style: none; transition: color .15s; }
details.browse summary:hover { color: var(--ink-2); }
details.browse summary::before { content: "▸ "; }
details.browse[open] summary::before { content: "▾ "; }
.cap-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.cap-row { display: flex; align-items: baseline; gap: 9px; padding: 5px 2px; font-size: 13px; }
.cap-row .nm { color: var(--ink); font-weight: 550; }
.cap-row .st { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.cap-row.pending .nm { color: var(--ink-3); font-weight: 450; }

/* composition flow — connected rail with lit nodes */
.flow { margin-top: 10px; }
.flow-b { position: relative; padding: 12px 0 12px 32px; animation: rise .35s var(--ease) both; animation-delay: calc(var(--i) * 65ms); }
.flow-b::before { content: ""; position: absolute; left: 8px; top: 20px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--z2); border: 2px solid var(--violet); box-shadow: 0 0 10px rgba(124,92,255,.5); }
.flow-b::after { content: ""; position: absolute; left: 12px; top: 34px; bottom: -8px; width: 1px;
  background: linear-gradient(180deg, rgba(124,92,255,.45), rgba(124,92,255,.12)); }
.flow-b:last-child::after { display: none; }
.flow-b .cap { font: 620 14.5px var(--display); letter-spacing: -.01em; }
.flow-b .cap em { font: 500 10.5px var(--mono); color: var(--ink-3); font-style: normal; margin-left: 7px; }
.flow-b .why { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; margin-top: 3px; }

/* memory evidence — the intelligence signature */
.mem { position: relative; background: linear-gradient(150deg, rgba(124,92,255,.14), rgba(34,211,238,.05));
  border-radius: var(--r-s); padding: 14px 16px; margin-top: 8px; }
.mem::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-s); padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(124,92,255,.5), rgba(34,211,238,.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; }
.mem .mk { font: 600 10.5px var(--body); letter-spacing: .13em; text-transform: uppercase; color: var(--violet-2); }
.mem .insight { color: var(--ink); font-size: 13.5px; line-height: 1.58; margin-top: 6px; }
.mem details { margin-top: 9px; }
.mem summary { cursor: pointer; color: var(--ink-3); font-size: 12px; list-style: none; }
.mem summary::before { content: "▸ "; } .mem details[open] summary::before { content: "▾ "; }
.mem .m-row { display: flex; gap: 9px; align-items: baseline; padding: 4px 0; font-size: 12.5px; color: var(--ink-2); }
.mem .m-row code { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-left: auto; flex: none; }

/* buttons */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 13px; cursor: pointer; font: 620 14px var(--body);
  padding: 13px 20px; color: #fff; letter-spacing: .01em;
  background: linear-gradient(140deg, #8b6bff, #6742e8);
  box-shadow: 0 5px 18px rgba(104,70,232,.36), inset 0 1px 0 rgba(255,255,255,.24);
  transition: transform .16s var(--ease), filter .16s, box-shadow .2s;
}
.btn::after { /* sheen on hover */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  transform: skewX(-18deg); transition: left .45s var(--ease); pointer-events: none;
}
.btn:hover:not(:disabled)::after { left: 120%; }
.btn:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 7px 24px rgba(104,70,232,.46), inset 0 1px 0 rgba(255,255,255,.24); }
.btn:active:not(:disabled) { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.wide { width: 100%; margin-top: 17px; padding: 14px; font-size: 15px; }
.btn.ghost { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { filter: none; border-color: rgba(255,255,255,.26); color: var(--ink); }
.btn.serious { background: linear-gradient(140deg, #31b184, #1f8a63); box-shadow: 0 5px 18px rgba(38,150,110,.34), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-row { display: flex; gap: 9px; margin-top: 17px; }
.btn-row .btn { flex: 1; padding: 12px 8px; font-size: 13.5px; }

/* staged execution sequence */
.seq { margin-top: 12px; }
.seq-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 7.5px 0; font-size: 13.5px; color: var(--ink-3); animation: rise .3s var(--ease) both; }
.seq-row .lbl { transition: color .3s; }
.seq-row.done { color: var(--ink-2); } .seq-row.done .lbl { color: var(--ink-2); }
.seq-row.active .lbl { color: var(--ink); }
.seq-ic { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.seq-row.done .seq-ic { background: var(--green-ghost); color: var(--green); animation: pop .3s var(--ease); }
.seq-row.done .seq-ic::before { content: "✓"; }
.seq-row.active .seq-ic { border: 1.5px solid var(--ink-3); border-top-color: var(--violet-2); animation: spin .8s linear infinite; }
.seq-row .ms { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

/* change intelligence (refinement) */
.delta { display: flex; gap: 10px; margin-top: 15px; }
.delta .d-cell { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 13px; text-align: center; }
.delta .d-cell b { display: block; font: 640 23px/1.1 var(--display); letter-spacing: -.02em; }
.delta .d-cell.changed b { color: var(--violet-2); }
.delta .d-cell.moved b { color: var(--amber); }
.delta .d-cell span { font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }

/* verified badge */
.vbadge { display: inline-flex; align-items: center; gap: 7px; margin-top: 15px; padding: 7px 14px; border-radius: 999px;
  background: var(--green-ghost); border: 1px solid rgba(52,211,153,.32); color: var(--green); font: 600 12.5px var(--body); animation: pop .35s var(--ease); }
.vbadge small { color: rgba(52,211,153,.75); font-weight: 500; }
.vbadge.pending { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-3); animation: none; }
.vbadge.warn { background: var(--amber-ghost); border-color: rgba(245,183,78,.3); color: var(--amber); }

/* findings */
.f-sum { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.f-cat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 12.5px; color: var(--ink-2); }
.f-cat b { color: var(--ink); }
.finding { display: grid; grid-template-columns: 14px 1fr; gap: 11px; padding: 12px 2px; border-top: 1px solid var(--line); }
.finding:first-of-type { border-top: none; }
.f-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.f-dot.high { background: var(--red); box-shadow: 0 0 8px rgba(240,113,111,.5); }
.f-dot.medium { background: var(--amber); } .f-dot.low { background: var(--ink-3); }
.finding .f-t { font-weight: 580; font-size: 13.5px; }
.finding .f-e { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; margin-top: 2px; }

/* governance */
.gate-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; margin-bottom: 13px;
  background: var(--amber-ghost); border: 1px solid rgba(245,183,78,.32); box-shadow: 0 0 24px rgba(245,183,78,.12); }
.gate-ic.green { background: var(--green-ghost); border-color: rgba(52,211,153,.32); box-shadow: 0 0 24px rgba(52,211,153,.14); }
.gov-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.gov-row:first-of-type { border-top: none; }
.gov-row .gk { color: var(--ink-3); }
.gov-row .gv { color: var(--ink); font-weight: 550; text-align: right; }
.gov-row .gv code { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }

/* capability gap */
.fitbar { display: inline-flex; gap: 3px; margin-right: 11px; }
.fitbar i { width: 15px; height: 5px; border-radius: 3px; background: var(--line-2); }
.fitbar.s3 i { background: var(--violet-2); box-shadow: 0 0 7px rgba(124,92,255,.5); }
.fitbar.s2 i:nth-child(-n+2) { background: var(--violet-2); }
.fitbar.s1 i:first-child { background: var(--violet-2); }
.cand { display: flex; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.cand:first-of-type { border-top: none; }
.cand .cn { font-weight: 580; }
.cand .cf { margin-left: auto; color: var(--ink-3); font-size: 11.5px; letter-spacing: .06em; }
.rec { position: relative; background: linear-gradient(150deg, rgba(124,92,255,.12), rgba(255,255,255,.02));
  border-radius: var(--r-s); padding: 14px 16px; margin-top: 15px; }
.rec::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-s); padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(124,92,255,.5), rgba(255,255,255,.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; }
.rec .rk { font: 600 10.5px var(--body); letter-spacing: .13em; text-transform: uppercase; color: var(--violet-2); }
.rec .rv { font: 640 15.5px var(--display); margin-top: 4px; letter-spacing: -.01em; }
.rec .rr { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; margin-top: 4px; }

/* spec artifact */
.spec-h { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.spec-h .from { font: 600 16px var(--display); color: var(--ink-3); }
.spec-h .arrow { color: var(--violet-2); }
.spec-h .to { font: 640 20px var(--display); letter-spacing: -.02em; }
.spec-s { border-top: 1px solid var(--line); padding: 11px 2px; }
.spec-s .sk { font: 600 10.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.spec-s .sv { color: var(--ink-2); font-size: 13px; line-height: 1.6; margin-top: 3px; }
.spec-s .sv code { font-family: var(--mono); font-size: 11.5px; color: var(--ink); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }

/* record note */
.record { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--ink-3); font-size: 12.5px; line-height: 1.6; }
.record b { color: var(--ink-2); }

/* why evidence */
.why-answer { font: 400 14.5px/1.68 var(--body); color: var(--ink); margin: 4px 0 0; }
.ev-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ev-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 11px 14px; animation: rise .3s var(--ease) both; }
.ev-item.memory { border-color: rgba(124,92,255,.26); background: linear-gradient(150deg, rgba(124,92,255,.13), rgba(34,211,238,.04)); }
.ev-kind { font: 600 10.5px var(--body); letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); grid-column: 1 / -1; }
.ev-item.memory .ev-kind { color: var(--violet-2); }
.ev-detail { color: var(--ink); font-size: 13px; line-height: 1.5; }
.ev-rel { font-family: var(--mono); font-size: 10px; color: var(--ink-3); align-self: center; }

/* timing breakdown (evidence panel) */
.tm { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 13px; margin-bottom: 12px; background: var(--surface); }
.tm-h { font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.tm-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; color: var(--ink-2); }
.tm-row b { font-family: var(--mono); font-weight: 500; font-size: 11.5px; color: var(--ink); }

/* ============ ZONE 3 · STAGE ============ */
.stage { display: flex; flex-direction: column; background: var(--z3); min-width: 0; }
.stage-bar { position: relative; display: flex; gap: 14px; align-items: center; height: 58px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.stage-bar::after { /* the conductor — carries the live state color across the stage */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--stage-color) 18%, var(--stage-color) 82%, transparent);
  opacity: .8; transition: background .5s;
}
.st-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px; border-radius: 999px; font: 620 12px var(--body); letter-spacing: .02em; flex: none; transition: all .3s var(--ease); }
.st-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-idle { background: var(--surface); color: var(--ink-3); border: 1px solid var(--line-2); }
.st-working { background: var(--amber-ghost); color: var(--amber); border: 1px solid rgba(245,183,78,.3); }
.st-working::before { animation: breathe 1.1s ease-in-out infinite; }
.st-local { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); }
.st-verified { background: var(--green-ghost); color: var(--green); border: 1px solid rgba(52,211,153,.36); animation: pop .4s var(--ease); box-shadow: 0 0 18px rgba(52,211,153,.14); }
.st-live { background: var(--green); color: #04331f; border: 1px solid var(--green); animation: pop .4s var(--ease); box-shadow: 0 0 24px rgba(52,211,153,.3); }
.st-live::before { background: #04331f; }
.stage-url { flex: 1; min-width: 0; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 8px 15px; font: 400 12px var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; transition: border-color .4s; }
:root[data-stage="verified"] .stage-url, :root[data-stage="live"] .stage-url { border-color: rgba(52,211,153,.28); }
.su-scheme { color: var(--ink-3); }
#stageUrlText { overflow: hidden; text-overflow: ellipsis; }
.stage-open { flex: none; font-size: 15px; color: var(--ink-2); padding: 4px 9px; border-radius: 8px; transition: all .15s; }
.stage-open:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.viewports { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.vp { border: none; background: none; color: var(--ink-3); font-size: 13px; padding: 4px 11px; border-radius: 8px; cursor: pointer; transition: all .18s var(--ease); }
.vp.active { background: var(--surface-2); color: var(--ink); box-shadow: 0 1px 5px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.stage-sub { padding: 8px 24px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line); animation: rise .3s var(--ease); }
.stage-sub b { color: var(--green); font-weight: 580; }

.stage-body { flex: 1; position: relative; padding: 24px; display: flex; }

/* the aspirational empty stage */
.stage-empty { margin: auto; text-align: center; position: relative; }
.se-grid { position: absolute; inset: -220px -300px; opacity: .55; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(124,92,255,.08), transparent 58%),
    radial-gradient(ellipse at 60% 70%, rgba(34,211,238,.04), transparent 55%),
    repeating-linear-gradient(0deg, transparent, transparent 41px, rgba(255,255,255,.03) 42px),
    repeating-linear-gradient(90deg, transparent, transparent 41px, rgba(255,255,255,.03) 42px);
  mask-image: radial-gradient(ellipse at center, #000 28%, transparent 70%);
  animation: grid-drift 26s ease-in-out infinite alternate;
}
@keyframes grid-drift { from { transform: translate(0, 0); } to { transform: translate(22px, 14px); } }
.se-copy { position: relative; }
.se-live {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 6px 15px; border-radius: 999px; font: 600 11px var(--body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2);
}
.se-live .env-dot { width: 6px; height: 6px; }
.se-copy h2 {
  font: 660 36px/1.15 var(--display); letter-spacing: -.028em; margin: 0 0 12px;
  background: linear-gradient(140deg, #fff 30%, #b7a6ff 75%, #8f9bff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.se-copy p { color: var(--ink-3); font-size: 14.5px; line-height: 1.75; margin: 0; }
.se-conn { margin-top: 26px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.se-conn .cfact {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2);
  animation: rise .4s var(--ease) both;
}
.se-conn .cfact:nth-child(2) { animation-delay: .08s; } .se-conn .cfact:nth-child(3) { animation-delay: .16s; }
.se-conn .cfact b { color: var(--ink); font-weight: 580; }
.se-conn .cfact .dot { width: 5px; height: 5px; }

/* the experience frame */
.frame { flex: 1; display: flex; justify-content: center; min-width: 0; animation: rise .45s var(--ease); }
.frame iframe {
  width: 100%; height: 100%; border: 1px solid var(--line-2); border-radius: 16px; background: #fff;
  box-shadow: 0 34px 90px rgba(0,0,0,.55), 0 2px 0 rgba(255,255,255,.05) inset;
  transition: width .42s var(--ease), border-color .5s;
}
.frame.mobile iframe { width: 393px; }
.frame.just-verified iframe { border-color: rgba(52,211,153,.6); animation: verify-ring 1.15s var(--ease); }
.frame[hidden] { display: none; }

/* ============ motion ============ */
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.82); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes verify-ring {
  0% { box-shadow: 0 34px 90px rgba(0,0,0,.55), 0 0 0 0 rgba(52,211,153,.4); }
  60% { box-shadow: 0 34px 90px rgba(0,0,0,.55), 0 0 0 16px rgba(52,211,153,0); }
  100% { box-shadow: 0 34px 90px rgba(0,0,0,.55); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ HOME · intent-first surface ============ */
.home {
  grid-column: 2 / 3; grid-row: 1; z-index: 6; position: relative;
  background: linear-gradient(180deg, var(--z2), var(--z3));
  overflow-y: auto; display: flex;
  animation: boot .7s var(--ease) .1s both;
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}
.home.gone { opacity: 0; transform: scale(.985); pointer-events: none; }
.home-inner { margin: auto; width: min(1080px, calc(100% - 96px)); padding: 64px 0 56px; text-align: center; }
.home .se-live { animation: rise .5s var(--ease) .25s both; }
.home-q {
  margin: 26px 0 0; font: 680 56px/1.08 var(--display); letter-spacing: -.035em;
  animation: rise .55s var(--ease) .32s both;
}
.home-q em {
  font-style: normal;
  background: linear-gradient(120deg, #a78fff 10%, #7c5cff 45%, #22d3ee 110%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.home-sub { margin: 18px auto 0; max-width: 560px; color: var(--ink-3); font-size: 15px; line-height: 1.7; animation: rise .55s var(--ease) .4s both; }

.home-cmd {
  margin: 34px auto 0; max-width: 640px; display: flex; gap: 10px; position: relative;
  animation: rise .55s var(--ease) .48s both;
}
.home-cmd input {
  flex: 1; min-width: 0; background: rgba(255,255,255,.045); border: 1px solid var(--line-2);
  border-radius: 18px; color: var(--ink); padding: 19px 24px; font: 400 16px var(--body); outline: none;
  box-shadow: 0 18px 50px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color .2s, box-shadow .2s;
}
.home-cmd input::placeholder { color: var(--ink-3); }
.home-cmd input:focus { border-color: var(--violet); box-shadow: 0 18px 50px rgba(0,0,0,.4), 0 0 0 4px rgba(124,92,255,.16), 0 0 40px rgba(124,92,255,.12); }
.home-cmd button {
  width: 58px; border: none; border-radius: 18px; cursor: pointer; font-size: 20px; color: #fff;
  background: linear-gradient(140deg, #8b6bff, #6742e8);
  box-shadow: 0 8px 24px rgba(104,70,232,.4), inset 0 1px 0 rgba(255,255,255,.26);
  transition: transform .15s var(--ease), filter .15s;
}
.home-cmd button:hover { filter: brightness(1.1); }
.home-cmd button:active { transform: scale(.93); }

.home-suggest { margin-top: 16px; display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; animation: rise .55s var(--ease) .56s both; }
.home-suggest button {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); font: 500 12.5px var(--body); padding: 8px 16px; cursor: pointer;
  transition: all .18s var(--ease);
}
.home-suggest button:hover { color: var(--ink); border-color: rgba(124,92,255,.5); background: rgba(124,92,255,.08); }

.home-grid { margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
@media (max-width: 1320px) { .home-grid { grid-template-columns: repeat(2, 1fr); } }
.tile {
  position: relative; border-radius: var(--r); padding: 18px 19px;
  background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 36px rgba(0,0,0,.3);
  animation: rise .5s var(--ease) both; animation-delay: calc(.62s + var(--i) * 70ms);
}
.tile::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--r); padding: 1px; pointer-events: none;
  background: linear-gradient(165deg, rgba(255,255,255,.14), rgba(255,255,255,.045) 45%, rgba(124,92,255,.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.tile-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; margin-bottom: 12px; }
.tile-ic.v { background: var(--violet-ghost); color: var(--violet-2); }
.tile-ic.c { background: rgba(34,211,238,.1); color: #67e3f4; }
.tile-ic.g { background: var(--green-ghost); color: var(--green); }
.tile-ic.a { background: var(--amber-ghost); color: var(--amber); }
.tile-k { font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.tile-big { margin-top: 6px; font: 660 26px/1.1 var(--display); letter-spacing: -.02em; }
.tile-big small { font: 500 12px var(--body); color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.tile-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.tile-list span { font-size: 11.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.tile-assets { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 7px; }
.tile-assets img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line-2); background: #fff; }
.tile-note { margin-top: 9px; color: var(--ink-3); font-size: 12px; line-height: 1.55; }
.tile-rows { margin-top: 9px; display: flex; flex-direction: column; }
.tile-rows > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.tile-rows > div:first-child { border-top: none; }
.tile-rows span { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-rows b { color: var(--ink); font-weight: 560; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.tile-rows .dot, .tile-rows i.dot { width: 5px; height: 5px; display: inline-block; }
.mono { font-family: var(--mono); font-size: 11px; }
.home-foot { margin-top: 30px; color: var(--ink-3); font: 400 10.5px var(--mono); opacity: .75; animation: rise .5s var(--ease) 1.1s both; }

/* ============ home → strategy handoff ============ */
/* thinking phase: the surface yields to the intent */
.home.thinking .se-live, .home.thinking .home-q, .home.thinking .home-sub,
.home.thinking .home-cmd, .home.thinking .home-suggest, .home.thinking .home-foot,
.home.thinking .home-answer {
  animation: none; /* completed entrance fills would override the hide */
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.home.thinking .home-grid, .home.thinking .tile { animation: none; }
.home.thinking .home-grid { opacity: 0; transform: translateY(14px) scale(.99); pointer-events: none;
  transition: opacity .5s var(--ease) .08s, transform .5s var(--ease) .08s; }
.home-think { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0 48px; pointer-events: none; }
.home-think[hidden] { display: none; }
.ht-eyebrow { font: 600 11px var(--body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--violet-2); animation: rise .5s var(--ease) .25s both; }
.ht-intent { margin: 20px 0 0; max-width: 760px; font: 560 24px/1.45 var(--display);
  letter-spacing: -.018em; color: var(--ink); animation: rise .55s var(--ease) .32s both; }
.ht-beam { width: 220px; height: 2px; margin-top: 30px; border-radius: 2px; overflow: hidden;
  position: relative; background: rgba(255,255,255,.08); animation: rise .5s var(--ease) .45s both; }
.ht-beam::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(90deg, transparent, #a08bff, #22d3ee, transparent);
  animation: beam 1.6s var(--ease) infinite; }
@keyframes beam { from { left: -50%; } to { left: 105%; } }
.ht-events { margin-top: 26px; display: flex; flex-direction: column; gap: 9px; min-height: 96px; }
.ht-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2);
  animation: rise .4s var(--ease) both; }
.ht-check { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; background: var(--green-ghost); color: var(--green); animation: pop .3s var(--ease); }

/* the handoff: home drifts toward the canvas as the strategy ignites */
.home.gone { opacity: 0; transform: translateX(-28px) scale(.985); pointer-events: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease); }

/* strategy ignition — the hairline flares, then settles */
.card.ignite { animation: rise .5s var(--ease) both, ignite 1.5s var(--ease) .15s both; }
@keyframes ignite {
  0% { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 44px rgba(0,0,0,.38), 0 0 0 0 rgba(124,92,255,0); }
  35% { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 44px rgba(0,0,0,.38), 0 0 44px 2px rgba(124,92,255,.28); }
  100% { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 44px rgba(0,0,0,.38), 0 0 0 0 rgba(124,92,255,0); }
}

/* the frame's first arrival — cinematic rise */
.frame { animation: frame-in .68s var(--ease) both; }
@keyframes frame-in { from { opacity: 0; transform: translateY(30px) scale(.965); } to { opacity: 1; transform: none; } }

/* ============ final pass: one composer · spine · hierarchy ============ */
/* single command surface: rail composer hidden until the first prompt commits */
body.at-home .composer { display: none; }
.composer { animation: rise .5s var(--ease); }

/* home hierarchy — one elevated intelligence panel, then quiet tiles */
.home-lead { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; text-align: left; }
.ei-panel {
  position: relative; border-radius: var(--r); padding: 22px 24px;
  background: linear-gradient(150deg, rgba(124,92,255,.15), rgba(34,211,238,.05));
  animation: rise .5s var(--ease) both; animation-delay: calc(.62s + var(--i) * 70ms);
}
.ei-panel::before { content: ""; position: absolute; inset: 0; border-radius: var(--r); padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(124,92,255,.55), rgba(34,211,238,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; }
.ei-panel .mk { font: 600 10.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--violet-2); }
.ei-big { margin-top: 8px; font: 660 32px/1.1 var(--display); letter-spacing: -.025em; }
.ei-big small { font: 500 13px var(--body); color: var(--ink-2); letter-spacing: 0; margin-left: 6px; }
.ei-note { margin: 10px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.6; max-width: 420px; }
.ei-dots { position: absolute; right: 24px; top: 24px; display: flex; align-items: center; }
.ei-dots i { border-radius: 50%; background: var(--violet-2); opacity: .9; }
.ei-dots i:nth-child(1) { width: 10px; height: 10px; box-shadow: 0 0 12px rgba(124,92,255,.6); }
.ei-dots i:nth-child(2) { width: 7px; height: 7px; margin-left: 14px; opacity: .6; }
.ei-dots i:nth-child(3) { width: 5px; height: 5px; margin-left: 12px; opacity: .35; }
.env-panel {
  position: relative; border-radius: var(--r); padding: 20px 22px; text-align: left;
  background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  animation: rise .5s var(--ease) both; animation-delay: calc(.62s + var(--i) * 70ms);
}
.env-panel::before { content: ""; position: absolute; inset: 0; border-radius: var(--r); padding: 1px; pointer-events: none;
  background: linear-gradient(165deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; }
.mk2 { font: 600 10.5px var(--body); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.env-name { margin-top: 7px; font: 640 21px/1.15 var(--display); letter-spacing: -.02em; }
.env-org { color: var(--ink-3); margin-top: 1px; }
.home-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; text-align: left; }

/* the Experience Spine — Compose's signature motif */
.spine { margin-top: 12px; position: relative; }
.spine-cap { position: relative; padding: 4px 0 4px 32px; font: 600 10px var(--body); letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); animation: rise .35s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.spine-cap::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 1.5px; background: var(--line-2); }
.spine-cap.end { color: var(--green); }
.spine-cap.end::before { background: rgba(52,211,153,.5); }
.spine-cap.next { color: var(--violet-2); }
.spine-cap.next::before { background: rgba(124,92,255,.5); }
.spine-n { position: relative; padding: 12px 0 12px 32px; animation: rise .35s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.spine-n::before { content: ""; position: absolute; left: 7.5px; top: 19px; width: 10px; height: 10px;
  background: var(--z2); border: 2px solid var(--violet); transform: rotate(45deg); border-radius: 2px;
  box-shadow: 0 0 10px rgba(124,92,255,.45); }
.spine-n::after { content: ""; position: absolute; left: 12px; top: 34px; bottom: -10px; width: 1px;
  background: linear-gradient(180deg, rgba(124,92,255,.4), rgba(124,92,255,.12)); }
.spine-cap + .spine-n::before { }
.spine-n:last-of-type::after { bottom: -4px; }
.spine .spine-cap.end { margin-top: 2px; }
.spine-n .cap { font: 620 14.5px var(--display); letter-spacing: -.01em; }
.spine-n .cap em { font: 500 10.5px var(--mono); color: var(--ink-3); font-style: normal; margin-left: 7px; }
.spine-n .why { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; margin-top: 3px; }
/* memory feeds the spine */
.mem-link { width: 1px; height: 18px; margin: 2px 0 -8px 24px;
  background: linear-gradient(180deg, rgba(124,92,255,.55), rgba(124,92,255,.15)); }

/* gap spine: the break in the sequence */
.gap-spine { margin: 14px 0 4px; }
.gap-spine .spine-n.mini { padding: 6px 0 6px 32px; }
.gap-spine .spine-n.mini .cap { font-size: 13px; }
.gap-spine .spine-n.mini::before { top: 12px; }
.gap-spine .spine-n.mini::after { top: 26px; bottom: -4px; }
.spine-n.unresolved { padding: 9px 0 9px 32px; }
.spine-n.unresolved::before { border: 1.5px dashed var(--amber); background: var(--amber-ghost);
  transform: rotate(0); border-radius: 50%; box-shadow: 0 0 12px rgba(245,183,78,.35); animation: breathe 2.2s ease-in-out infinite; }
.spine-n.unresolved::after { background: linear-gradient(180deg, rgba(245,183,78,.35), rgba(124,92,255,.15)); }
.spine-n.unresolved .cap { color: var(--amber); font-size: 13.5px; }
.spine-n.unresolved .cap em { color: rgba(245,183,78,.8); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }

/* refinement mini-spine — which nodes were actually touched */
.mini-spine { display: flex; align-items: flex-start; gap: 14px; margin-top: 14px; padding: 12px 4px 2px; flex-wrap: wrap; }
.mini-n { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.mini-n i { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; background: var(--surface-2); border: 1.5px solid var(--line-2); }
.mini-n.chg i { background: var(--violet-ghost); border-color: var(--violet-2); box-shadow: 0 0 10px rgba(124,92,255,.55); }
.mini-n.mov i { background: var(--amber-ghost); border-color: var(--amber); box-shadow: 0 0 10px rgba(245,183,78,.45); }
.mini-n u { text-decoration: none; font-size: 10px; color: var(--ink-3); max-width: 64px; text-align: center; line-height: 1.3; }
.mini-n.chg u { color: var(--violet-2); } .mini-n.mov u { color: var(--amber); }

/* capability evolution chips: ? → ◌ → ✓ */
.evo-chip { display: inline-flex; align-items: center; gap: 7px; margin: 4px 0 10px; padding: 5px 13px;
  border-radius: 999px; font: 600 11.5px var(--body); letter-spacing: .02em; }
.evo-chip.q { background: var(--amber-ghost); border: 1px dashed rgba(245,183,78,.5); color: var(--amber); }
.evo-chip.cand { background: var(--violet-ghost); border: 1px solid rgba(124,92,255,.4); color: var(--violet-2); }
.evo-chip.ok { background: var(--green-ghost); border: 1px solid rgba(52,211,153,.4); color: var(--green); margin-top: 12px; }
/* home-grid is now a stack container for lead + tiles rows */
.home-grid { display: block; margin-top: 46px; }

/* ============ lock pass: evidence↔spine · alive waits · clarify ============ */
/* grounded evidence illumination — soft, brief, never neon */
.spine-n.lit::before { border-color: var(--violet-2); box-shadow: 0 0 16px rgba(124,92,255,.75); transition: box-shadow .35s, border-color .35s; }
.spine-n.lit .cap { color: var(--violet-2); transition: color .35s; }
.spine-n .cap, .spine-n::before { transition: color .6s, box-shadow .6s, border-color .6s; }
.spine-cap.lit, .spine-cap[data-anchor].lit { color: var(--violet-2); transition: color .35s; }
.spine.gov-glow .spine-n::after { background: linear-gradient(180deg, rgba(52,211,153,.5), rgba(124,92,255,.2)); transition: background .4s; }
.ev-item.linked { cursor: default; }
.ev-item.linked:hover { border-color: rgba(124,92,255,.45); }

/* honest active-thinking rows */
.ht-active { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 13.5px; color: var(--ink-3); animation: rise .4s var(--ease) both; }
.ht-spin { width: 13px; height: 13px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--ink-3); border-top-color: var(--violet-2); animation: spin .8s linear infinite; }
.ht-active .lbl { color: var(--ink-2); }
.ht-active .els { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

/* clarification — Compose asking for missing business information, not an error */
.msg.clarify { background: var(--surface); border: 1px solid rgba(124,92,255,.3); border-radius: 14px; padding: 13px 15px; color: var(--ink-2); }
.msg.clarify .cl-k { display: block; font: 600 10px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--violet-2); margin-bottom: 5px; }
.msg.clarify .cl-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.msg.clarify .cl-hints i { font-style: normal; font-size: 11.5px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 999px; padding: 3px 10px; }

/* ============ UX flow: compression · action bar · experience control ============ */
.canvas-zone { flex-direction: column; display: flex; }
.action-bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.14));
  animation: rise .4s var(--ease) both;
}
.ab-sum { flex: 1; min-width: 0; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.ab-sum b { color: var(--ink); font-weight: 620; }
.action-bar .btn { padding: 11px 18px; font-size: 13.5px; }
.action-bar .ab-review { padding: 11px 14px; }
.linklike { background: none; border: none; color: var(--ink-3); font: 500 11px var(--body); letter-spacing: .02em; cursor: pointer; padding: 0; text-transform: none; }
.linklike:hover { color: var(--violet-2); }

/* compact spine: whole composition at a glance, reasoning one line (full on hover/expand) */
.thesis.compactt { font-size: 15px; margin-top: 8px; }
.mem.slim { padding: 11px 14px; }
.insight.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spine.compact .spine-n { padding: 6.5px 0 6.5px 32px; }
.spine.compact .spine-n::before { top: 12px; }
.spine.compact .spine-n::after { top: 26px; bottom: -5px; }
.spine.compact .spine-n .cap { font-size: 13.5px; }
.spine.compact .spine-n .cap em { display: none; }
.spine.compact .spine-n .why { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; margin-top: 1px; }
.reason-more { margin-top: 10px; border-top: none; padding-top: 0; }

/* experience control */
.release-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--ink-3); font-size: 12px; }
.release-row .linklike { font-size: 12px; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; }
.release-row .linklike:hover { border-color: rgba(52,211,153,.4); color: var(--green); }
.hv { transition: color .3s; }

/* command suggestions above the composer (optional accelerators) */
.cmd-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 20px 0; animation: rise .4s var(--ease) both; }
.cmd-suggest button { background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-3); font: 500 11.5px var(--body); padding: 5px 12px; cursor: pointer; transition: all .18s var(--ease); }
.cmd-suggest button:hover { color: var(--ink); border-color: rgba(124,92,255,.45); }
.thesis.compactt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ab-sum { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* home answer + classifying state */
.home-answer { position: relative; margin: 24px auto 0; max-width: 620px; text-align: left;
  border-radius: var(--r-s); padding: 14px 18px;
  background: linear-gradient(150deg, rgba(124,92,255,.12), rgba(255,255,255,.02)); }
.home-answer::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-s); padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(124,92,255,.5), rgba(255,255,255,.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; }
.home-answer.pop { animation: pop .4s var(--ease); }
.home-answer .ha-k { font: 600 10px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--violet-2); }
.home-answer p { margin: 5px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.home-answer b { color: var(--ink); }
.home.classifying .home-cmd button { pointer-events: none; animation: breathe 1s ease-in-out infinite; }

/* small-window safety net: below presentation width, scroll — never crush the layout */
@media (max-width: 1279px) {
  body { overflow: auto; }
  .app { min-width: 1280px; }
}
.home-answer .ha-q { display: block; color: var(--ink-3); font-size: 12.5px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-style: italic; }

/* ============ one primary workspace with modes ============ */
/* STRATEGY: intelligence uses the whole workspace; no empty preview pane */
body[data-ws="strategy"] .stage { display: none; }
body[data-ws="strategy"] .canvas-zone { position: relative; flex: 1; border-right: none; }
body[data-ws="strategy"] .canvas { max-width: 860px; width: 100%; margin: 0 auto; }
body[data-ws="strategy"] .action-bar { justify-content: flex-end; }
body[data-ws="strategy"] .ab-sum { flex: none; max-width: 46%; }
body[data-ws="strategy"] .drawer-head { display: none; }

/* PREVIEW: the experience is the product; intelligence is a contextual drawer */
body[data-ws="preview"] .stage { flex: 1; }
body[data-ws="preview"] .canvas-zone {
  position: absolute; top: 59px; right: 0; bottom: 0; z-index: 7; /* below stage chrome — preview controls stay reachable */
  width: min(470px, 44%); border-right: none; border-left: 1px solid var(--line-2);
  background: linear-gradient(165deg, rgba(16,17,27,.97), rgba(9,10,17,.97));
  box-shadow: -30px 0 70px rgba(0,0,0,.5);
  transform: translateX(103%); transition: transform .38s var(--ease), width .3s var(--ease);
  display: flex; flex-direction: column;
}
body[data-ws="preview"] .canvas-zone:not(.open) { visibility: hidden; pointer-events: none; } /* hard zero-footprint guarantee — geometry alone proved unreliable */
body[data-ws="preview"] .canvas-zone.open { transform: translateX(0); visibility: visible; }
body[data-ws="preview"] .canvas-zone.wide { width: min(620px, 56%); }
.drawer-head { display: none; }
body[data-ws="preview"] .drawer-head {
  display: flex; justify-content: space-between; align-items: center; flex: none;
  padding: 13px 20px; border-bottom: 1px solid var(--line);
  font: 600 11px var(--body); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3);
}
.drawer-head button { background: none; border: none; color: var(--ink-3); font-size: 13px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.drawer-head button:hover { color: var(--ink); background: var(--surface); }
.drawer-toggle { display: none; }
body[data-ws="preview"] .drawer-toggle { display: inline-block; }

/* default (pre-plan, behind home): behave like strategy — single calm surface */
body:not([data-ws]) .stage, body[data-ws="home"] .stage { display: none; }
body:not([data-ws]) .canvas-zone, body[data-ws="home"] .canvas-zone { flex: 1; }


/* transient status toast — the page stays the hero */
.toast {
  position: absolute; top: 74px; left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: 8; display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; border-radius: 999px; opacity: 0;
  background: rgba(14,15,24,.92); border: 1px solid var(--line-2);
  box-shadow: 0 14px 40px rgba(0,0,0,.45); font-size: 13px; color: var(--ink-2);
  transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { color: var(--ink); font-weight: 600; }
.toast .dot { width: 6px; height: 6px; }

/* composing skeleton — the approved plan assembling, honestly */
.composing { flex: 1; display: flex; align-items: center; justify-content: center; animation: rise .35s var(--ease); }
.cmp-inner { width: min(560px, 80%); }
.cmp-inner .k { margin-bottom: 14px; }
.cmp-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center;
  padding: 13px 4px; border-top: 1px solid var(--line); font: 560 15px var(--display); letter-spacing: -.01em; }
.cmp-row:first-of-type { border-top: none; }
.cmp-row i { width: 11px; height: 11px; border-radius: 3px; transform: rotate(45deg);
  border: 2px solid var(--ink-3); animation: breathe 1.6s ease-in-out infinite; }
.cmp-row.done i { border-color: var(--violet); background: var(--violet-ghost);
  box-shadow: 0 0 10px rgba(124,92,255,.5); animation: none; }
.cmp-row em { font: 400 12px var(--mono); color: var(--ink-3); font-style: normal; }
.cmp-row.done em { color: var(--violet-2); }
.cmp-note { margin-top: 16px; color: var(--ink-3); font-size: 12px; line-height: 1.6; }

/* ============ Experience Command Rail (post-build) ============ */
.rail-ctl { flex: none; border-top: 1px solid var(--line); padding: 15px 20px 13px; animation: rise .4s var(--ease) both; }
.rc-name { font: 640 15px/1.25 var(--display); letter-spacing: -.015em; }
.rc-status { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 12px; color: var(--ink-2); }
.rc-rev { font: 400 10.5px var(--mono); color: var(--ink-3); margin-top: 2px; }
.rc-btn { width: 100%; margin-top: 10px; padding: 11px; font-size: 13.5px; }
.rc-btn.ghost { margin-top: 8px; padding: 10px; }
.rc-why { display: block; margin: 10px auto 0; font-size: 12px; }
.rc-release { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 14px; border-top: 1px solid var(--line); padding-top: 11px; }
.rc-release .rc-k { display: block; font: 600 9.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.rc-release .rc-k.live { color: var(--green); }
.rc-release .rc-note { font-size: 11.5px; color: var(--ink-3); }
.rc-release .rc-pub { font-size: 12px; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; }
.rc-release .rc-pub:hover { border-color: rgba(52,211,153,.4); color: var(--green); }

/* ---------- demo-critical stabilization pass (2026-08-17) ---------- */
.msg.working[data-elapsed]::after { content: ' · ' attr(data-elapsed); color: var(--ink-3, #8b8fa3); font-variant-numeric: tabular-nums; }
.card.flash { animation: cardFlash 1.2s ease; }
@keyframes cardFlash { 0% { box-shadow: 0 0 0 2px var(--violet, #7c6cff); } 100% { box-shadow: 0 0 0 0 transparent; } }
button[disabled], button[aria-disabled="true"] { opacity: .42; cursor: not-allowed; filter: saturate(.4); }
.composer input::placeholder, .home-cmd input::placeholder { text-overflow: ellipsis; }
.msg.error .btn-row .btn { font-size: 12.5px; padding: 6px 14px; }
