/*
 * Crux product demos for the landing page: the current IDE recreated in HTML/CSS (no screenshots or recordings).
 * Tokens mirror components/crux/workbench/workbench.css so the demos read as the real workbench.
 * Rendered by ./crux-demos.js into any element with data-crux-demo="<name>".
 */

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist/GeistMono-Variable.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}

.cd-host {
  --cd-bg: #0c0c0e;
  --cd-chrome: #111114;
  --cd-elevated: #18181c;
  --cd-overlay: #1f1f24;
  --cd-hover: rgba(255, 255, 255, 0.055);
  --cd-active: rgba(255, 255, 255, 0.09);
  --cd-border: #1f1f24;
  --cd-border-strong: #2c2c33;
  --cd-fg: #e8e8ec;
  --cd-fg-2: #a3a3ad;
  --cd-fg-3: #6f6f7a;
  --cd-fg-4: #4a4a53;
  --cd-accent: #0055ff;
  --cd-accent-text: #5c8dff;
  --cd-accent-soft: rgba(0, 85, 255, 0.18);
  --cd-success: #3fb950;
  --cd-warning: #d29922;
  --cd-danger: #f85149;
  --cd-ui: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --cd-code: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --cd-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--cd-bg);
  border-radius: inherit;
  contain: layout paint;
}

/* Each demo is laid out at a fixed design size and scaled to fit its slot (see fit() in crux-demos.js). */
.cd-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--cd-bg);
  color: var(--cd-fg);
  font-family: var(--cd-ui);
  font-size: 13px;
  letter-spacing: -0.003em;
  line-height: 1.4;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.cd-stage * { box-sizing: border-box; }
.cd-mono { font-family: var(--cd-code); }

/* ---------- shared chrome ---------- */
.cd-titlebar { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; background: var(--cd-chrome); border-bottom: 1px solid var(--cd-border); }
.cd-brand { font-weight: 700; font-size: 18px; letter-spacing: -0.05em; color: var(--cd-fg); }
.cd-project { display: inline-flex; align-items: center; gap: 6px; color: var(--cd-fg-2); font-size: 14px; }
.cd-caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.8; }
.cd-spacer { flex: 1; }
.cd-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 6px; background: var(--cd-elevated); border: 1px solid var(--cd-border-strong); color: var(--cd-fg); font-size: 13px; }
.cd-btn-accent { background: var(--cd-accent); border-color: var(--cd-accent); color: #fff; }
.cd-btn-ghost { background: transparent; border-color: var(--cd-border-strong); color: var(--cd-fg-2); }
.cd-avatars { display: flex; }
.cd-avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--cd-chrome); font-size: 10px; font-weight: 600; color: #fff; }
.cd-avatar:first-child { margin-left: 0; }
.cd-tabs { display: flex; height: 36px; background: var(--cd-chrome); border-bottom: 1px solid var(--cd-border); }
.cd-tab { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-right: 1px solid var(--cd-border); color: var(--cd-fg-3); font-size: 12.5px; }
.cd-tab.is-active { background: var(--cd-bg); color: var(--cd-fg); box-shadow: inset 0 1px 0 var(--cd-accent); }
.cd-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.cd-statusbar { display: flex; align-items: center; gap: 14px; height: 24px; padding: 0 12px; background: var(--cd-chrome); border-top: 1px solid var(--cd-border); color: var(--cd-fg-3); font-size: 11px; }

/* ---------- explorer ---------- */
.cd-explorer { width: 220px; background: var(--cd-chrome); border-right: 1px solid var(--cd-border); padding: 10px 0; }
.cd-explorer-head { padding: 0 14px 8px; color: var(--cd-fg-3); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.cd-file { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 14px; color: var(--cd-fg-2); font-size: 12.5px; transition: background-color 200ms var(--cd-ease), opacity 300ms var(--cd-ease), transform 300ms var(--cd-ease); }
.cd-file.is-active { background: var(--cd-active); color: var(--cd-fg); }
.cd-file.is-folder { color: var(--cd-fg); }
.cd-file.is-hidden { opacity: 0; transform: translateX(-6px); }
.cd-file-ic { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cd-file .cd-presence { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; }

/* ---------- code ---------- */
.cd-code { position: relative; flex: 1; padding: 14px 0; font-family: var(--cd-code); font-size: 13px; line-height: 22px; color: var(--cd-fg); white-space: normal; }
.cd-line { position: relative; display: flex; height: 22px; white-space: pre; transition: background-color 300ms var(--cd-ease); } /* pre per line, so template whitespace between rows is ignored */
.cd-ln { width: 52px; flex: none; padding-right: 16px; text-align: right; color: var(--cd-fg-4); font-size: 12px; user-select: none; }
.cd-line.is-added { background: rgba(63, 185, 80, 0.12); }
.cd-line.is-added .cd-ln { color: var(--cd-success); }
.cd-line.is-removed { background: rgba(248, 81, 73, 0.12); text-decoration: line-through; text-decoration-color: rgba(248, 81, 73, 0.5); }
.cd-line.is-removed .cd-ln { color: var(--cd-danger); }
.cd-line.is-new { animation: cd-line-in 380ms var(--cd-ease) both; }
@keyframes cd-line-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.k { color: #c792ea; } .f { color: #82aaff; } .s { color: #c3e88d; } .n { color: #f78c6c; } .c { color: var(--cd-fg-3); } .t { color: #89ddff; }

/* remote cursor: caret + name flag, the multiplayer look from the editor */
.cd-cursor { position: relative; display: inline-block; width: 0; height: 22px; vertical-align: top; }
.cd-cursor::before { content: ""; position: absolute; left: -1px; top: 2px; width: 2px; height: 18px; background: var(--cd-peer, var(--cd-accent)); border-radius: 1px; animation: cd-blink 1.1s steps(1) infinite; }
.cd-cursor-flag { position: absolute; left: -1px; top: -15px; padding: 1px 6px; border-radius: 4px 4px 4px 0; background: var(--cd-peer, var(--cd-accent)); color: var(--cd-peer-fg, #fff); font-family: var(--cd-ui); font-size: 10.5px; font-weight: 600; line-height: 15px; white-space: nowrap; }
@keyframes cd-blink { 50% { opacity: 0.25; } }
.cd-select { background: color-mix(in srgb, var(--cd-peer, var(--cd-accent)) 26%, transparent); border-radius: 2px; }

/* ---------- agent / chat ---------- */
.cd-panel { display: flex; flex-direction: column; background: var(--cd-chrome); border-left: 1px solid var(--cd-border); }
.cd-panel-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--cd-border); font-size: 12.5px; color: var(--cd-fg-2); }
.cd-seg { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--cd-bg); border: 1px solid var(--cd-border); }
.cd-seg span { padding: 3px 10px; border-radius: 5px; color: var(--cd-fg-3); font-size: 12px; }
.cd-seg span.is-on { background: var(--cd-elevated); color: var(--cd-fg); }
.cd-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 14px; overflow: hidden; } /* pinned to the newest message, like the real panel */
.cd-msg { max-width: 92%; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.55; animation: cd-pop 320ms var(--cd-ease) both; }
.cd-msg-user { align-self: flex-end; background: var(--cd-elevated); border: 1px solid var(--cd-border-strong); }
.cd-msg-agent { align-self: flex-start; color: var(--cd-fg); padding-left: 0; padding-right: 0; }
.cd-msg-agent code { font-family: var(--cd-code); font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--cd-elevated); color: var(--cd-accent-text); }
@keyframes cd-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cd-agent-row { display: flex; align-items: center; gap: 8px; color: var(--cd-fg-2); font-size: 12px; }
.cd-bot { position: relative; display: inline-flex; width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, #2d6bff, #0033aa); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); flex: none; }
.cd-bot::before, .cd-bot::after { content: ""; position: absolute; top: 8px; width: 3px; height: 4px; border-radius: 2px; background: #fff; }
.cd-bot::before { left: 6px; } .cd-bot::after { right: 6px; }
.cd-steps { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 10px; background: var(--cd-bg); border: 1px solid var(--cd-border); }
.cd-step { display: flex; align-items: center; gap: 9px; color: var(--cd-fg-3); font-size: 12.5px; transition: color 240ms var(--cd-ease); }
.cd-step i { position: relative; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--cd-fg-4); flex: none; transition: border-color 240ms var(--cd-ease), background-color 240ms var(--cd-ease); }
.cd-step.is-run { color: var(--cd-fg); }
.cd-step.is-run i { border-color: var(--cd-accent-text); border-top-color: transparent; animation: cd-spin 800ms linear infinite; }
.cd-step.is-done { color: var(--cd-fg-2); }
.cd-step.is-done i { border-color: var(--cd-success); background: var(--cd-success); }
.cd-step.is-done i::after { content: ""; position: absolute; left: 3.5px; top: 1px; width: 3px; height: 6px; border: solid #0c0c0e; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
@keyframes cd-spin { to { transform: rotate(360deg); } }

.cd-diffcard { border-radius: 10px; border: 1px solid var(--cd-border-strong); background: var(--cd-bg); overflow: hidden; animation: cd-pop 320ms var(--cd-ease) both; }
.cd-diffcard-head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-bottom: 1px solid var(--cd-border); background: var(--cd-chrome); font-size: 12px; color: var(--cd-fg-2); }
.cd-diffcard-head b { color: var(--cd-fg); font-weight: 500; }
.cd-plus { color: var(--cd-success); } .cd-minus { color: var(--cd-danger); }
.cd-diffcard .cd-code { padding: 6px 0; font-size: 12px; line-height: 20px; }
.cd-diffcard .cd-line { height: 20px; }
.cd-diffcard .cd-ln { width: 36px; padding-right: 10px; font-size: 11px; }
.cd-actions { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--cd-border); }
.cd-actions .cd-btn { height: 28px; font-size: 12.5px; transition: transform 160ms var(--cd-ease), filter 160ms var(--cd-ease); }
.cd-actions .cd-btn.is-press { transform: scale(0.96); filter: brightness(1.25); }
.cd-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; }
.cd-badge-ok { background: rgba(63, 185, 80, 0.14); color: var(--cd-success); }

/* ---------- home (the agent home screen) ---------- */
.cd-home-side { width: 318px; background: var(--cd-chrome); border-right: 1px solid var(--cd-border); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cd-input { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 6px; background: var(--cd-elevated); border: 1px solid var(--cd-border-strong); color: var(--cd-fg-2); font-size: 15px; }
.cd-conv { display: flex; gap: 12px; padding: 8px 4px; color: var(--cd-fg-2); font-size: 14px; }
.cd-conv small { display: block; color: var(--cd-fg-3); font-size: 12px; margin-top: 3px; }
.cd-greeting { position: relative; font-size: 46px; font-weight: 600; letter-spacing: -0.04em; color: var(--cd-fg); }
.cd-greeting::before { content: ""; position: absolute; left: -24px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--cd-accent); }
.cd-composer { border-radius: 12px; border: 1px solid #55555e; background: #16161a; box-shadow: 0 2px 4px rgb(0 0 0 / 10%), 0 16px 48px rgb(0 0 0 / 18%); transition: border-color 240ms var(--cd-ease); }
.cd-composer.is-focus { border-color: var(--cd-accent-text); box-shadow: 0 0 0 1px rgba(0, 85, 255, 0.2), 0 16px 48px rgb(0 0 0 / 18%); }
.cd-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--cd-border-strong); background: var(--cd-bg); color: var(--cd-fg); font-size: 14px; }
.cd-chip .cd-chip-meta { color: var(--cd-fg-4); }
.cd-prompt { min-height: 96px; padding: 18px 24px 8px; font-size: 16px; line-height: 1.55; color: var(--cd-fg); }
.cd-prompt.is-empty { color: var(--cd-fg-3); }
.cd-caret-line { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -3px; background: var(--cd-accent-text); animation: cd-blink 1s steps(1) infinite; }
.cd-composer-tools { display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 14px 0 22px; border-top: 1px solid var(--cd-border); background: rgba(17, 17, 20, 0.42); border-radius: 0 0 12px 12px; color: var(--cd-fg-2); font-size: 15px; }
.cd-meter { color: var(--cd-warning); font-size: 14px; }
.cd-send { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cd-elevated); color: var(--cd-fg-3); transition: background-color 200ms var(--cd-ease), color 200ms var(--cd-ease), transform 160ms var(--cd-ease); }
.cd-send.is-ready { background: var(--cd-accent); color: #fff; }
.cd-send.is-press { transform: scale(0.9); }
.cd-arrow-up { width: 10px; height: 10px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: translateY(2px) rotate(45deg); }
.cd-task { display: flex; align-items: center; gap: 22px; height: 61px; border-bottom: 1px solid var(--cd-border); color: var(--cd-fg); font-size: 16px; }
.cd-task:last-child { border-bottom: 0; }
.cd-task em { font-style: normal; font-family: var(--cd-code); font-size: 13px; color: var(--cd-fg-3); }
.cd-task .cd-ne { margin-left: auto; color: var(--cd-fg-3); }

/* ---------- canvas ----------
 * Mirrors components/canvas (EditorNode, ConnectorLayer, WireLabelLayer) and the NexusCanvas dot grid.
 * The world is a fixed 960×600 plane centred in the stage; wider stages just show more canvas. */
.cvs-canvas { position: absolute; inset: 0; background-color: var(--cd-bg); background-image: radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1.2px); background-size: 24px 24px; background-position: center; }
.cvs-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.35) 100%); }
.cvs-world { position: absolute; left: 50%; top: calc(50% + 24px); width: 960px; height: 600px; transform: translate(-50%, -50%) scale(var(--cvs-scale, 1)); }
.cvs-wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.cvs-wire { transition: opacity 200ms var(--cd-ease); }
.cvs-wire.is-dimmed { opacity: 0.15; }
.cvs-hit { fill: none; stroke: transparent; stroke-width: 24; }
.cvs-wire-idle { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 1; }
.cvs-wire-flow { display: none; fill: none; stroke: var(--cd-accent); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 5 7; animation: cvs-flow 900ms linear infinite; }
.cvs-wire.is-active .cvs-wire-idle { display: none; }
.cvs-wire.is-active .cvs-wire-flow { display: inline; }
@keyframes cvs-flow { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.cvs-arrow-idle { fill: rgba(255, 255, 255, 0.2); }
.cvs-arrow-active { fill: var(--cd-accent); }
.cvs-end { display: none; stroke-width: 1.5; }
.cvs-wire.is-active .cvs-end { display: inline; }
.cvs-end-from { fill: var(--cd-bg); stroke: var(--cd-accent); }
.cvs-end-to { fill: var(--cd-accent); stroke: var(--cd-bg); }
.cvs-packet { fill: rgba(255, 255, 255, 0.2); opacity: 0.7; }
.cvs-wire.is-active .cvs-packet { fill: var(--cd-accent); opacity: 1; }
.cvs-packet-2 { display: none; }
.cvs-wire.is-active .cvs-packet-2 { display: inline; opacity: 0.8; }

.cvs-node { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.07); background: var(--cd-chrome); color: var(--cd-fg); box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.7); transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), border-color 120ms, box-shadow 120ms, opacity 160ms; }
.cvs-node.has-presence { border-color: var(--lead); box-shadow: 0 0 0 1px var(--lead), 0 18px 48px -20px rgba(0, 0, 0, 0.8); }
.cvs-node.is-highlighted { border-color: var(--cd-accent); box-shadow: 0 0 0 1px var(--cd-accent), 0 18px 48px -20px rgba(0, 0, 0, 0.8); }
.cvs-node.has-presence.is-highlighted { border-color: var(--lead); box-shadow: 0 0 0 1px var(--lead), 0 0 0 4px var(--cd-accent), 0 18px 48px -20px rgba(0, 0, 0, 0.8); }
.cvs-node.is-dimmed { opacity: 0.3; }
.cvs-node.is-dragging { transition: border-color 120ms, box-shadow 120ms, opacity 160ms; }
.cvs-head { display: flex; flex: none; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 13px; font-weight: 500; }
.cvs-badge { display: inline-flex; width: 16px; justify-content: center; color: #4d9bf0; font: 700 9px/1 var(--cd-code); letter-spacing: -0.04em; }
.cvs-lang { color: var(--cd-fg-4); font-size: 12px; font-weight: 400; }
.cvs-code { flex: 1; min-height: 0; overflow: hidden; padding: 10px 12px 10px 0; font: 12.5px/1.65 var(--cd-code); }
.cvs-line { display: flex; align-items: center; border-left: 2px solid transparent; white-space: pre; }
.cvs-line.is-peer-line { border-left-color: var(--cd-accent); background: var(--cd-accent-soft); }
.cvs-ln { flex: none; width: 40px; padding-right: 14px; text-align: right; color: var(--cd-fg-4); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cvs-src { position: relative; min-width: 0; flex: 1; }
.cvs-caret { position: absolute; top: 0; height: 100%; border-left: 2px solid var(--peer); opacity: 0; }
.cvs-caret-tag { position: absolute; left: -2px; top: 100%; z-index: 1; padding: 0 6px; border-radius: 2px; background: var(--peer); color: var(--peer-fg); font: 500 10px/16px var(--cd-ui); white-space: nowrap; }
.is-peer-line .cvs-caret { opacity: 1; animation: cd-pop 320ms var(--cd-ease) both; }
.cvs-foot { display: flex; flex: none; align-items: center; gap: 16px; height: 28px; padding: 0 12px; border-top: 1px solid rgba(255, 255, 255, 0.06); color: var(--cd-fg-3); font-size: 11.5px; }
.cvs-link { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cvs-link > span { color: var(--cd-fg-4); }
.cvs-link code { color: var(--cd-fg-2); font-family: var(--cd-code); }
.cvs-tags { position: absolute; top: -13px; right: 12px; z-index: 1; display: flex; gap: 4px; }
.cvs-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 2px; border-radius: 999px; font-size: 11.5px; font-weight: 500; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.6); animation: cd-pop 320ms var(--cd-ease) both; }
.cvs-tag i { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(12, 12, 14, 0.82); font: 600 9.5px/1 var(--cd-ui); font-style: normal; }
.cvs-tag-ic { width: 12px; height: 12px; opacity: 0.8; }

.cvs-labels { position: absolute; left: 0; top: 0; z-index: 5; }
.cvs-label { position: absolute; left: 0; top: 0; width: 240px; display: flex; flex-direction: column; align-items: center; font-family: var(--cd-ui); animation: cd-pop 200ms var(--cd-ease) both; }
.cvs-label.is-vertical { align-items: flex-start; }
.cvs-label-pill { display: flex; max-width: 100%; align-items: center; gap: 6px; padding: 2px 2px 2px 8px; border: 1px solid var(--cd-border-strong); border-radius: 6px; background: var(--cd-elevated); color: var(--cd-fg-3); font-size: 12px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.65); }
.cvs-label-pill code { color: var(--cd-fg); font: 11.5px var(--cd-code); }
.cvs-label-pill .cvs-ic { width: 12px; height: 12px; color: var(--cd-fg-4); }
.cvs-label-trash { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; color: var(--cd-fg-3); }
.cvs-label-detail { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--cd-border-strong); border-radius: 10px; background: var(--cd-elevated); color: var(--cd-fg-3); font-size: 12px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.65); }
.cvs-label-detail > * + * { margin-top: 6px; }
.cvs-label-row { display: flex; justify-content: space-between; gap: 8px; }
.cvs-label-row b { color: var(--cd-fg); font-weight: 500; }
.cvs-label-row span { color: var(--cd-fg-4); font-size: 11px; font-variant-numeric: tabular-nums; }
.cvs-label-change { display: block; overflow: hidden; padding: 4px 8px; border-left: 2px solid var(--cd-success); border-radius: 4px; background: var(--cd-bg); color: var(--cd-fg); font: 11px var(--cd-code); white-space: nowrap; text-overflow: ellipsis; }
.cvs-label-detail p { margin: 6px 0 0; color: var(--cd-fg-2); line-height: 1.4; }
.cvs-label-lines span { font: 10.5px var(--cd-code); }

.cvs-pointer { position: absolute; left: 0; top: 0; z-index: 6; width: 20px; height: 22px; opacity: 0; transform: translate(480px, 560px); transition: transform 700ms cubic-bezier(0.45, 0, 0.2, 1), opacity 200ms; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.cvs-pointer.is-shown { opacity: 1; }
.cvs-pointer-ic { display: block; width: 100%; height: 100%; transform-origin: 3px 2px; }
.cvs-pointer.is-pressed .cvs-pointer-ic { animation: cvs-press 260ms ease; }
@keyframes cvs-press { 50% { transform: scale(0.82); } }

.cvs-toolbar { position: absolute; left: 50%; top: 12px; z-index: 7; display: flex; align-items: center; gap: 2px; height: 38px; padding: 4px 4px 4px 12px; transform: translateX(-50%); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; background: rgba(32, 32, 36, 0.86); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.35); backdrop-filter: blur(24px) saturate(160%); white-space: nowrap; }
.cvs-title { color: var(--cd-fg); font-size: 13px; font-weight: 500; }
.cvs-count { margin-left: 8px; color: var(--cd-fg-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.cvs-divider { width: 1px; height: 16px; margin: 0 6px; background: rgba(255, 255, 255, 0.08); }
.cvs-btn { display: inline-flex; height: 28px; min-width: 28px; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; color: var(--cd-fg-3); font-size: 12px; }
.cvs-btn .cvs-ic { width: 16px; height: 16px; }
.cvs-btn-wide { padding: 0 8px; }
.cvs-btn small { color: var(--cd-fg-4); font-size: 11px; }
.cvs-btn-chev { min-width: 20px; margin-left: -4px; }
.cvs-btn-chev .cvs-ic { width: 14px; height: 14px; }
.cvs-live { color: var(--cd-fg-2); }
.cvs-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--cd-success); box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.15); }
@media (prefers-reduced-motion: reduce) {
  .cvs-wire-flow { animation: none; }
  .cvs-node, .cvs-pointer { transition: none; }
}

/* ---------- notch ---------- */
.cd-desk { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, #1a2440 0%, #0c0e16 55%, #08090d 100%); }
.cd-menubar { position: absolute; left: 0; right: 0; top: 0; height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: rgba(255, 255, 255, 0.8); font-size: 12px; background: rgba(0, 0, 0, 0.35); }
.cd-notch { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 190px; height: 32px; background: #000; border-radius: 0 0 12px 12px; overflow: hidden; transition: width 340ms cubic-bezier(0.32, 0.72, 0, 1), height 340ms cubic-bezier(0.32, 0.72, 0, 1), border-radius 340ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 340ms cubic-bezier(0.32, 0.72, 0, 1); }
.cd-notch[data-mode="active"] { width: 330px; }
.cd-notch[data-mode="peek"] { width: 400px; height: 96px; border-radius: 0 0 22px 22px; }
.cd-notch[data-mode="expanded"] { width: 470px; height: 330px; border-radius: 0 0 26px 26px; box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(255, 255, 255, 0.06); }
.cd-notch-layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 180ms var(--cd-ease); }
.cd-notch[data-mode="active"] .cd-notch-active,
.cd-notch[data-mode="peek"] .cd-notch-peek,
.cd-notch[data-mode="expanded"] .cd-notch-expanded { opacity: 1; transition-delay: 160ms; }
.cd-wings { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 12px; }
.cd-orb { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(from 0deg, #5c8dff, #0055ff, #9ab8ff, #5c8dff); animation: cd-spin 1.4s linear infinite; box-shadow: 0 0 12px rgba(92, 141, 255, 0.6); }
.cd-notch-peek .cd-peek-text { padding: 2px 16px 0 44px; color: var(--cd-fg-2); font-size: 12.5px; line-height: 1.45; }
.cd-notch-expanded { display: flex; flex-direction: column; padding: 40px 16px 14px; gap: 10px; color: var(--cd-fg); font-size: 12.5px; }
.cd-notch-expanded .cd-steps { background: #0b0b0d; }
.cd-notch-compose { margin-top: auto; display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 10px; background: #141417; border: 1px solid #26262c; color: var(--cd-fg-3); }
.cd-done-pulse { animation: cd-done 900ms cubic-bezier(0.32, 0.72, 0, 1) both; }
@keyframes cd-done { 0% { transform: scale(0.6); opacity: 0; } 45% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.cd-window { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); width: 84%; height: 62%; border-radius: 12px; background: var(--cd-chrome); border: 1px solid var(--cd-border-strong); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9); overflow: hidden; }

/* Workflows section tiles: see ./crux-workflows-section.css. */

/* ---------- open project ---------- */
.cd-dialog { position: absolute; left: 50%; top: 50%; width: 520px; transform: translate(-50%, -50%); border-radius: 12px; background: var(--cd-elevated); border: 1px solid var(--cd-border-strong); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); transition: opacity 260ms var(--cd-ease), transform 260ms var(--cd-ease); }
.cd-dialog.is-gone { opacity: 0; transform: translate(-50%, -46%) scale(0.98); }
.cd-dialog-row { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--cd-border); font-size: 14px; color: var(--cd-fg-2); }
.cd-dialog-row.is-on { background: var(--cd-accent-soft); color: var(--cd-fg); }
.cd-folder { width: 16px; height: 12px; border-radius: 2px 2px 3px 3px; background: var(--cd-accent-text); position: relative; opacity: 0.9; }
.cd-folder::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 4px; border-radius: 2px 2px 0 0; background: inherit; }

/* ---------- blog thumbnails ---------- */
.cd-thumb { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 44px; gap: 14px; background: radial-gradient(110% 90% at 0% 0%, #13213f, var(--cd-bg) 65%); }
.cd-term { border-radius: 10px; background: #08080a; border: 1px solid var(--cd-border-strong); padding: 16px 18px; font-family: var(--cd-code); font-size: 15px; line-height: 1.7; color: var(--cd-fg-2); }
.cd-term b { color: var(--cd-success); font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  .cd-stage *, .cd-stage *::before, .cd-stage *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}

/* ---------- hero: home and workspace layers (matches the agent home screenshot) ---------- */
.cd-layer { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transition: opacity 420ms var(--cd-ease); background: var(--cd-bg); }
.cd-layer.is-on { opacity: 1; }
.cd-ghost { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--cd-fg-2); border: 1px solid var(--cd-border-strong); font-size: 13px; }
.cd-side { width: 300px; flex: none; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--cd-chrome); border-right: 1px solid var(--cd-border); }
.cd-side-head { display: flex; gap: 10px; align-items: center; padding: 2px 2px 8px; font-size: 14.5px; color: var(--cd-fg); }
.cd-side-head small { display: block; color: var(--cd-fg-3); font-size: 12px; margin-top: 1px; }
.cd-side-head .cd-folder { width: 16px; height: 12px; flex: none; }
.cd-newchat { justify-content: flex-start; height: 42px; font-size: 14.5px; background: var(--cd-bg); border-color: var(--cd-border-strong); }
.cd-newchat b { font-weight: 400; font-size: 18px; line-height: 1; color: var(--cd-fg-2); }
.cd-search { height: 40px; font-size: 14px; color: var(--cd-fg-3); }
.cd-rule { height: 1px; background: var(--cd-border); margin: 4px 0 2px; }
.cd-convhead { display: flex; justify-content: space-between; color: var(--cd-fg-2); font-size: 13.5px; padding: 0 2px; }
.cd-daylabel { color: var(--cd-fg-3); font-size: 12.5px; padding: 0 2px; }
.cd-conv { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-radius: 6px; color: var(--cd-fg-2); font-size: 13.5px; }
.cd-conv-new { background: var(--cd-active); color: var(--cd-fg); }
.cd-conv small { display: block; color: var(--cd-fg-3); font-size: 11.5px; margin-top: 2px; }
.cd-conv > div { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-chat-ic { width: 13px; height: 12px; margin-top: 4px; border: 1.5px solid var(--cd-fg-3); border-radius: 3px; flex: none; }
.cd-dots { color: var(--cd-fg-4); }
.cd-settings { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--cd-border); color: var(--cd-fg-2); font-size: 14px; }
.cd-settings span:last-child { color: var(--cd-fg-4); font-size: 12px; }
.cd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-main-head { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 18px; border-bottom: 1px solid var(--cd-border); color: var(--cd-fg-2); font-size: 14px; }
.cd-sidetoggle { width: 16px; height: 13px; border: 1.5px solid var(--cd-fg-3); border-radius: 3px; flex: none; }
.cd-seg-lg { font-size: 14px; }
.cd-seg-lg span { padding: 5px 13px; font-size: 14px; }
.cd-hicon { color: var(--cd-fg-3); font-size: 14px; padding: 0 2px; }
.cd-home-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 58px 40px 0; overflow: hidden; }
.cd-home-body > * { width: 100%; max-width: 780px; }
.cd-home-proj { display: flex; align-items: center; gap: 10px; font-family: var(--cd-code); font-size: 15px; color: var(--cd-fg-2); margin-bottom: 14px; }
.cd-home-proj .cd-folder { width: 16px; height: 12px; }
.cd-home-body .cd-greeting { font-size: 46px; padding-left: 0; }
.cd-subgreet { color: var(--cd-fg-2); font-size: 16px; margin: 10px 0 26px; }
.cd-chipwrap { padding: 12px 14px 0; }
.cd-chipwrap .cd-chip { height: 28px; font-size: 13px; background: var(--cd-chrome); }
.cd-doc { width: 10px; height: 13px; border: 1.5px solid #5c8dff; border-radius: 2px; flex: none; }
.cd-prompt { min-height: 74px; padding: 14px 22px 4px; font-size: 16px; }
.cd-prompt-foot { display: flex; justify-content: space-between; padding: 0 22px 14px; color: var(--cd-fg-2); font-size: 14px; }
.cd-composer-tools { height: 52px; font-size: 14px; gap: 16px; }
.cd-clip { color: var(--cd-fg-3); font-size: 16px; }
.cd-meter { display: inline-flex; align-items: center; gap: 8px; color: var(--cd-warning); font-size: 13px; white-space: nowrap; }
.cd-ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--cd-warning); border-top-color: transparent; animation: cd-spin 1.2s linear infinite; }
.cd-send { width: 32px; height: 32px; }
.cd-starthead { margin: 34px 0 8px 2px; color: var(--cd-fg-2); font-size: 12.5px; letter-spacing: 0.08em; }
.cd-hints { display: flex; align-items: center; gap: 22px; margin-top: 26px; color: var(--cd-fg-2); font-size: 13px; }
kbd { font-family: var(--cd-code); font-size: 11.5px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--cd-border-strong); background: var(--cd-elevated); color: var(--cd-fg-2); margin-right: 4px; }
.cd-home-body .cd-task { height: 52px; font-size: 15px; }
.cd-home-body .cd-task em { font-size: 12.5px; }
.cd-home-body { position: relative; }
.cd-notch { z-index: 5; }

/* Hero chat — dimensions and tokens from ChatPageView / ChatPageSidebar / Composer.
   Scoped independently so the Collaboration, Canvas and Notch demos retain their layouts. */
@font-face {
  font-family: "Crux Demo UI";
  src: url("../fonts/geist/Geist-Variable.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}
.ch-app { height: 100%; display: flex; flex-direction: column; font-family: "Crux Demo UI", var(--cd-ui); font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: normal; background: var(--cd-bg); color: var(--cd-fg); }
.ch-app [hidden] { display: none !important; }
.ch-app .ch-icon { display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: middle; }
.ch-muted { color: var(--cd-fg-3); }
.ch-titlebar { position: relative; display: flex; align-items: center; gap: 24px; height: 40px; flex: none; padding: 0 16px; border-bottom: 1px solid var(--cd-border); background: var(--cd-chrome); }
.ch-wordmark { font-size: 18px; font-weight: 700; letter-spacing: -1px; }
.ch-project { display: flex; align-items: center; gap: 6px; color: var(--cd-fg-2); }
.ch-project .ch-icon { width: 12px; height: 12px; }
.ch-presence { display: grid; place-items: center; width: 24px; height: 24px; color: var(--cd-fg); }
.ch-share { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: #34343b; border: 1px solid #46464d; border-radius: 6px; font-weight: 500; }
.ch-share .ch-icon { width: 14px; height: 14px; }
.ch-workspace { display: flex; flex: 1; min-height: 0; }
.ch-sidebar { width: 240px; flex: none; display: flex; flex-direction: column; background: var(--cd-chrome); border-right: 1px solid var(--cd-border); }
.ch-project-heading { height: 52px; display: flex; align-items: center; gap: 10px; flex: none; padding: 0 16px; border-bottom: 1px solid var(--cd-border); }
.ch-project-heading > .ch-icon { color: var(--cd-fg-2); }
.ch-project-heading strong { display: block; font-size: 12px; font-weight: 500; }
.ch-project-heading small { display: block; margin-top: 2px; color: var(--cd-fg-2); font-size: 10px; }
.ch-sidebar-tools { display: grid; gap: 12px; padding: 16px 12px; }
.ch-new, .ch-search { display: flex; align-items: center; gap: 8px; border-radius: 6px; }
.ch-new { height: 36px; border: 1px solid var(--cd-border-strong); background: var(--cd-elevated); padding: 0 12px; font-weight: 500; }
.ch-new .ch-icon { color: var(--cd-accent-text); }
.ch-search { height: 32px; border: 1px solid var(--cd-border); background: var(--cd-bg); padding: 0 10px; color: var(--cd-fg-2); }
.ch-search .ch-icon { width: 14px; height: 14px; }
.ch-conversations { flex: 1; min-height: 0; padding: 0 12px; }
.ch-list-heading { margin: 0 4px; padding: 16px 0 4px; border-top: 1px solid var(--cd-border); display: flex; justify-content: space-between; color: var(--cd-fg-2); font-size: 11px; }
.ch-day { padding: 12px 8px 8px; font-size: 10px; color: var(--cd-fg-2); }
.ch-conversation { display: flex; align-items: flex-start; gap: 8px; border-radius: 6px; padding: 8px; margin-bottom: 4px; color: var(--cd-fg-2); }
.ch-conversation.is-active { background: var(--cd-active); color: var(--cd-fg); }
.ch-conversation > .ch-icon { width: 14px; height: 14px; margin-top: 3px; color: var(--cd-fg-3); }
.ch-conversation.is-active > .ch-icon:first-child { color: var(--cd-accent-text); }
.ch-conversation > div { flex: 1; min-width: 0; }
.ch-conversation > div > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 20px; }
.ch-conversation small { display: block; margin-top: 2px; font-size: 10px; color: var(--cd-fg-2); }
.ch-settings { height: 54px; flex: none; margin: 0 12px; padding: 8px; border-top: 1px solid var(--cd-border); display: flex; align-items: center; gap: 8px; color: var(--cd-fg-2); }
.ch-settings > span { margin-left: auto; font-size: 10px; }
.ch-main { position: relative; display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ch-header { height: 52px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--cd-border); color: var(--cd-fg-2); }
.ch-control { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; white-space: nowrap; }
.ch-header .ch-control { width: 28px; padding: 0; justify-content: center; }
.ch-header-title { flex: 1; min-width: 0; padding: 0 6px; font-weight: 500; }
.ch-view-tabs { display: flex; padding: 2px; border-radius: 6px; background: var(--cd-chrome); }
.ch-view-tabs > span { padding: 4px 10px; color: var(--cd-fg-2); }
.ch-view-tabs > .is-selected { color: var(--cd-fg); background: var(--cd-elevated); border-radius: 4px; }
.ch-divider { height: 16px; width: 1px; margin: 0 4px; background: var(--cd-border-strong); }
.ch-welcome { display: flex; flex: 1; min-height: 0; padding: 24px 40px; overflow-y: auto; scrollbar-width: thin; }
.ch-launch { width: 100%; max-width: 640px; margin: auto; }
.ch-intro { margin-bottom: 28px; }
.ch-folder-label { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--cd-fg-2); font-family: var(--cd-code); font-size: 12px; }
.ch-folder-label .ch-icon { width: 14px; height: 14px; }
.ch-intro h2 { position: relative; margin: 0; color: var(--cd-fg); font-family: inherit; font-size: 36px; font-weight: 500; line-height: 1.2; letter-spacing: -0.04em; }
.ch-intro h2::before { content: ""; position: absolute; left: -18px; top: 4px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--cd-accent); }
.ch-intro p { margin: 12px 0 0; font-size: 13px; line-height: 1.625; color: var(--cd-fg-2); }
.ch-composer { border: 1px solid color-mix(in srgb, var(--cd-fg-2) 45%, var(--cd-border-strong)); border-radius: 12px; background: color-mix(in srgb, var(--cd-elevated) 84%, var(--cd-bg)); box-shadow: 0 2px 4px #0000001a, 0 16px 48px #0000002e; transition: border-color 180ms var(--cd-ease), box-shadow 180ms var(--cd-ease); }
.ch-composer.is-focused { border-color: var(--cd-accent-text); box-shadow: 0 0 0 1px #0055ff33, 0 16px 48px #0000002e; }
.ch-context { margin: 8px 8px 0; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px 0 4px; border: 1px solid var(--cd-border-strong); border-radius: 6px; background: var(--cd-chrome); color: var(--cd-fg-2); }
.ch-context .ch-icon { width: 14px; height: 14px; color: #3178c6; }
.ch-input { min-height: 44px; padding: 14px 18px 10px; color: var(--cd-fg-2); font-size: 14px; line-height: 1.6; }
.ch-composer-welcome .ch-input { min-height: 64px; color: var(--cd-fg); }
.ch-input.is-empty { color: var(--cd-fg-2); }
.ch-caret { display: inline-block; width: 1.5px; height: 16px; vertical-align: -3px; margin-left: 1px; background: var(--cd-fg); animation: cd-blink 1s steps(1) infinite; }
.ch-model-controls { display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 10px 8px; color: var(--cd-fg-2); }
.ch-model-controls > span { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; }
.ch-model-controls .ch-icon, .ch-toolbar .ch-control .ch-icon { width: 12px; height: 12px; }
.ch-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 8px; border-top: 1px solid var(--cd-border); border-radius: 0 0 12px 12px; background: color-mix(in srgb, var(--cd-chrome) 42%, transparent); color: var(--cd-fg-2); }
.ch-toolbar .ch-attach .ch-icon { width: 16px; height: 16px; }
.ch-usage { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; font-size: 10px; white-space: nowrap; }
.ch-usage-ring { width: 14px; height: 14px; border: 2px solid var(--cd-border-strong); border-top-color: var(--cd-fg-2); border-radius: 50%; }
.ch-send { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--cd-elevated); color: var(--cd-fg-3); transition: background 180ms, color 180ms, transform 160ms; }
.ch-send.is-ready { background: var(--cd-accent); color: #fff; }
.ch-send.is-pressed { transform: scale(.9); }
.ch-send .ch-icon { width: 16px; height: 16px; }
.ch-starters { margin-top: 24px; }
.ch-starter-label { margin: 0 0 8px; padding: 0 8px; font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--cd-fg-2); }
.ch-starter { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--cd-border); font-size: 12px; }
.ch-starter:last-child { border-color: transparent; }
.ch-starter > span { width: 16px; flex: none; font-family: var(--cd-code); font-size: 10px; color: var(--cd-fg-3); }
.ch-starter .ch-icon { width: 14px; height: 14px; margin-left: auto; color: var(--cd-fg-3); }
.ch-shortcuts { display: flex; align-items: center; gap: 16px; margin-top: 20px; color: var(--cd-fg-2); font-size: 11px; }
.ch-shortcuts > span:last-child { margin-left: auto; }
.ch-shortcuts kbd { height: 16px; min-width: 16px; margin-right: 3px; padding: 1px 4px; background: transparent; font-size: 9px; }
.ch-thread { display: none; flex: 1; flex-direction: column; min-height: 0; }
.ch-app[data-state="thread"] .ch-welcome { display: none; }
.ch-app[data-state="thread"] .ch-thread { display: flex; animation: ch-thread-in 240ms var(--cd-ease) both; }
.ch-messages { width: 100%; max-width: 688px; flex: 1; min-height: 0; margin: 0 auto; padding: 24px 24px 20px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--cd-border-strong) transparent; }
.ch-user-message { width: fit-content; max-width: 85%; margin-left: auto; padding: 10px 14px; border: 1px solid var(--cd-border); border-radius: 12px; background: var(--cd-elevated); font-size: 13px; line-height: 1.6; }
.ch-response { margin-top: 28px; font-size: 13px; line-height: 1.65; }
.ch-response-author { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ch-response-author strong { font-size: 13px; font-weight: 600; }
.ch-response-author > span:last-child { color: var(--cd-fg-3); font-size: 11px; }
.ch-agent-avatar { width: 24px; height: 24px; display: grid; place-items: center; background: var(--cd-elevated); border: 1px solid var(--cd-border-strong); border-radius: 7px; }
.ch-thinking { display: flex; align-items: center; gap: 4px; color: var(--cd-fg-2); font-size: 12px; }
.ch-thinking > i { width: 3px; height: 3px; border-radius: 50%; background: var(--cd-fg-2); animation: ch-think 1.2s ease-in-out infinite; }
.ch-thinking > i:nth-child(2) { animation-delay: .15s; }
.ch-thinking > i:nth-child(3) { animation-delay: .3s; }
.ch-thinking > span { margin-left: 6px; }
.ch-answer p { margin: 0 0 14px; }
.ch-answer-details { animation: ch-thread-in 240ms var(--cd-ease) both; }
.ch-code-label { display: flex; justify-content: space-between; padding: 7px 12px; background: var(--cd-chrome); border: 1px solid var(--cd-border-strong); border-bottom: 0; border-radius: 8px 8px 0 0; font-family: var(--cd-code); font-size: 10px; color: var(--cd-fg-2); }
.ch-code-label > span { color: var(--cd-fg-3); }
.ch-answer pre { margin: 0 0 14px; padding: 12px 16px; background: var(--cd-chrome); border: 1px solid var(--cd-border-strong); border-radius: 0 0 8px 8px; font-family: var(--cd-code); font-size: 11px; line-height: 1.6; white-space: pre; }
.ch-answer code { font: inherit; }
.ch-read-only { display: flex; align-items: center; gap: 6px; color: var(--cd-fg-2); font-size: 11px; }
.ch-read-only .ch-icon { width: 13px; height: 13px; }
.ch-thread-compose { width: 100%; max-width: 688px; flex: none; margin: 0 auto; padding: 0 24px 16px; }
.ch-disclaimer { margin: 8px 0 0; text-align: center; color: var(--cd-fg-2); font-size: 11px; line-height: 1.6; }
@keyframes ch-thread-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ch-think { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ch-app *, .ch-app *::before { animation: none !important; transition: none !important; } }
.cd-host[data-crux-demo="hero"] > .cd-stage { container-type: inline-size; }
@container (max-width: 767px) {
  .ch-sidebar { display: none; }
}
@container (max-width: 639px) {
  .ch-welcome { padding-inline: 20px; }
  .ch-intro h2 { font-size: 30px; }
  .ch-header { padding-inline: 12px; }
  .ch-titlebar { gap: 12px; }
  .ch-shortcuts { gap: 12px; }
  .ch-usage > span { display: none; }
}
@media (max-width: 767px) {
  /* The export's image slot was 16:9; the mobile chat needs its actual portrait shape. */
  [data-framer-name="dashboard image"]:has([data-crux-demo="hero"]) { aspect-ratio: 520 / 800 !important; height: auto !important; }
}
@font-face { font-family: "Crux Demo Brand"; src: url("../fonts/etna-free-font.otf") format("opentype"); font-display: swap; }
.ch-wordmark { font-family: "Crux Demo Brand", sans-serif; font-size: 16px; font-weight: 900; letter-spacing: 0; }
.ch-avatar { display: block; width: 24px; height: 24px; }
.ch-agent-avatar { background: none; border: 0; }
.ch-user-label { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; }
.ch-user-avatar { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--cd-elevated); color: var(--cd-fg-2); font-size: 10px; }

/* Same Lucide Settings stroke as ChatPageSidebar. */
.ch-settings > .ch-icon { stroke-width: 1.75; }

/* Overlay the actual MD/ocean composer beam without shifting the input or intercepting clicks. */
.ch-composer { position: relative; isolation: isolate; }
.ch-composer > .ch-beam { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ch-beam > span { display: block; width: 100%; height: 100%; border-radius: 12px; }

/* Agent activity stays in the same chat surface from plan through review. */
.ch-tools-enabled { display: inline-flex; align-items: center; gap: 5px; padding: 0 6px; color: var(--cd-warning); font-size: 11px; white-space: nowrap; }
.ch-tools-enabled .ch-icon { width: 13px; height: 13px; }
.ch-stop { display: none; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--cd-fg); }
.ch-stop > i { width: 9px; height: 9px; border-radius: 1px; background: var(--cd-bg); }
.ch-app[data-working="true"] .ch-send { display: none; }
.ch-app[data-working="true"] .ch-stop { display: grid; }
.ch-agent-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; width: 190px; height: 32px; padding: 0 13px; overflow: hidden; border: 1px solid #ffffff12; border-top: 0; border-radius: 0 0 12px 12px; background: #050506; box-shadow: 0 4px 12px #0004; transition: width 300ms var(--cd-ease); }
.ch-agent-notch .ch-avatar { width: 18px; height: 18px; flex: none; }
.ch-agent-notch > span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--cd-fg-2); }
.ch-notch-indicator { width: 4px; height: 4px; flex: none; border-radius: 50%; background: var(--cd-fg-3); }
.ch-agent-notch[data-phase="working"] { width: 238px; }
.ch-agent-notch[data-phase="working"] .ch-notch-indicator { background: var(--cd-accent-text); box-shadow: 0 0 0 3px #0055ff22; animation: ch-think 1.8s ease-in-out infinite; }
.ch-agent-notch[data-phase="done"] .ch-notch-indicator { background: var(--cd-success); }
.ch-notch-track { position: absolute; height: 2px; left: 12px; right: 12px; bottom: 0; background: #ffffff08; opacity: 0; }
.ch-agent-notch:not([data-phase="idle"]) .ch-notch-track { opacity: 1; }
.ch-notch-track > i { display: block; width: var(--ch-progress,0%); height: 100%; background: var(--cd-accent); transition: width 500ms var(--cd-ease); }
.ch-agent-notch[data-phase="done"] .ch-notch-track > i { background: var(--cd-success); }
.ch-agent-steps { margin: 16px 0; padding: 3px 0 3px 12px; border-left: 1px solid var(--cd-border-strong); }
.ch-agent-step { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 10px; color: var(--cd-fg-3); transition: color 180ms; }
.ch-agent-step > div { flex: 1; min-width: 0; }
.ch-agent-step > div > span { display: block; font-size: 12px; line-height: 1.5; }
.ch-agent-step small { display: block; font-family: var(--cd-code); font-size: 10px; line-height: 1.5; color: var(--cd-fg-3); }
.ch-step-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; border: 1px solid var(--cd-fg-4); }
.ch-agent-step[data-status="running"] { color: var(--cd-fg); }
.ch-agent-step[data-status="running"] .ch-step-dot { background: var(--cd-accent); border-color: var(--cd-accent); box-shadow: 0 0 0 4px #0055ff20; animation: ch-think 1.2s ease-in-out infinite; }
.ch-agent-step[data-status="done"] { color: var(--cd-fg-2); }
.ch-agent-step[data-status="done"] .ch-step-dot { background: var(--cd-success); border-color: var(--cd-success); }
.ch-step-result { opacity: 0; color: var(--cd-success); }
.ch-step-result .ch-icon { width: 13px; height: 13px; }
.ch-agent-step[data-status="done"] .ch-step-result { opacity: 1; }
.ch-agent-review { overflow: hidden; margin-top: 16px; border: 1px solid var(--cd-border-strong); border-radius: 8px; background: var(--cd-chrome); animation: ch-thread-in 240ms var(--cd-ease) both; }
.ch-review-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--cd-border); color: var(--cd-fg-3); font-size: 10px; }
.ch-review-head > .ch-icon { width: 13px; height: 13px; color: #3178c6; }
.ch-review-head strong { margin-right: 4px; font-size: 11px; font-weight: 500; color: var(--cd-fg); }
.ch-diff-plus { color: var(--cd-success); }
.ch-diff-minus { color: var(--cd-danger); }
.ch-diff-code { padding: 8px 0; overflow-x: auto; font-family: var(--cd-code); font-size: 11px; line-height: 24px; }
.ch-diff-code > div { display: flex; gap: 12px; padding: 0 12px; white-space: pre; }
.ch-diff-code code { font-family: inherit; }
.ch-diff-remove { background: #f851490b; color: #df9996; }
.ch-diff-add { background: #3fb9500d; color: #97cda1; }
.ch-review-footer { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--cd-border); color: var(--cd-fg-3); font-size: 10px; }
.ch-review-footer > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--cd-fg-2); }
.ch-review-footer .ch-icon { width: 13px; height: 13px; }
.ch-agent-outcome { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 11px; animation: ch-thread-in 240ms var(--cd-ease) both; }
.ch-agent-outcome > span { display: inline-flex; align-items: center; gap: 6px; color: var(--cd-success); }
.ch-agent-outcome .ch-icon { width: 13px; height: 13px; }
.ch-agent-outcome > .ch-review-action { padding: 5px 9px; border: 1px solid var(--cd-border-strong); border-radius: 5px; background: var(--cd-elevated); color: var(--cd-fg); }
@container (max-width:639px) { .ch-project { display: none; } .ch-agent-notch { width: 180px; } .ch-agent-notch[data-phase="working"] { width: 220px; } }

/* Static blue backdrop; the hero card tilt is driven by scroll in crux-hero-straighten. */
.framer-1q5f2vj [data-framer-name="BG Image"] { background: radial-gradient(ellipse at 50% 78%,#123caa 0%,#071a52 40%,#020615 72%,#000 100%) !important; }
.framer-1q5f2vj [data-framer-name="BG Image"] img { visibility: hidden !important; }

/* Balanced hero typography, matching the template reference's centered two-line rhythm. */
.framer-1ojaeqe { width: 100% !important; max-width: 900px; padding-inline: 24px; box-sizing: border-box; gap: 28px !important; }
.framer-1ojaeqe .framer-1tymvhm { width: 100% !important; }
h1.crux-hero-title { margin: 0; font-family: "Arial MT","ArialMT",Arial,"Arial MT Pro",Helvetica,sans-serif !important; font-size: clamp(44px,6.25vw,76px) !important; font-weight: 400 !important; line-height: 1.08 !important; letter-spacing: -.06em !important; text-align: center !important; text-wrap: balance; }
h1.crux-hero-title .crux-hero-line { display: block !important; white-space: nowrap; }
.framer-1ojaeqe .framer-b49080 { width: 100% !important; max-width: 620px; margin-inline: auto; }
.framer-1ojaeqe .framer-b49080 p { font-family: "Geist",sans-serif !important; font-size: 18px !important; font-weight: 400 !important; line-height: 1.6 !important; letter-spacing: -.015em !important; text-align: center !important; text-wrap: balance; }
.framer-1ojaeqe .framer-b49080 p,.framer-1ojaeqe .framer-b49080 p span { color: #c8cbd7 !important; -webkit-text-fill-color: #c8cbd7 !important; }
@media(max-width:767px) {
 .framer-1ojaeqe { padding-inline: 20px; gap: 24px !important; }
 h1.crux-hero-title { font-size: clamp(30px,8.6vw,44px) !important; letter-spacing: -.06em !important; line-height: 1.08 !important; }
 .framer-1ojaeqe .framer-b49080 p { font-size: 16px !important; line-height: 1.6 !important; }
}

/* Match the reference's vertical composition: headline below the navigation breathing room. */
.framer-1q5f2vj { padding-top: 220px !important; }
.framer-1ojaeqe { max-width: 1040px; }
.framer-1ojaeqe .framer-b49080 { max-width: 640px; }
.framer-1ojaeqe .framer-5mpfu7 { width: 100% !important; }
.framer-1ojaeqe .framer-1raaxh-container { width: 100% !important; max-width: 480px; min-width: 0; }
.framer-1ojaeqe .crux-waitlist { margin-inline: auto; }
@media(min-width:768px) and (max-width:1199px) { .framer-1q5f2vj { padding-top: 180px !important; } }
@media(max-width:767px) {
 .framer-1q5f2vj { padding-top: 120px !important; }
 .framer-1ojaeqe .framer-1raaxh-container { max-width: 100%; }
 .framer-1ojaeqe .crux-waitlist { flex-wrap: nowrap; }
 .framer-1ojaeqe .crux-waitlist input { flex: 1 1 140px; width: 0; }
 .framer-1ojaeqe .crux-waitlist button { flex: none; padding-inline: 14px; font-size: 14px; white-space: nowrap; }
 .framer-1ojaeqe .crux-waitlist-msg { position: absolute; top: calc(100% + 8px); }
 .framer-1ojaeqe .crux-waitlist { position: relative; }
}
@media(min-width:768px) {
 .framer-1ojaeqe .framer-b49080 p { font-size: 20px !important; line-height: 1.5 !important; }
}

/* Same local Arial MT face used by app/globals.css and AeyeHero's font-sans. */
@font-face { font-family: "Arial MT"; src: local("ArialMT"),local("Arial"); font-style: normal; font-weight: 400; font-display: swap; }

/* Hero pointer: the Canvas/Notch arrow, plus a ring where it clicks. Transform and opacity only. */
.ch-pointer { position: absolute; left: 0; top: 0; z-index: 30; width: 20px; height: 22px; opacity: 0; pointer-events: none; transition: transform 700ms cubic-bezier(0.45, 0, 0.2, 1), opacity 200ms; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); will-change: transform; }
.ch-pointer.is-shown { opacity: 1; }
.ch-pointer .cvs-pointer-ic { display: block; width: 100%; height: 100%; transform-origin: 3px 2px; }
.ch-pointer.is-pressed .cvs-pointer-ic { animation: cvs-press 260ms ease; }
.ch-pointer-ripple { position: absolute; left: 3px; top: 2px; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid rgba(165, 216, 255, 0.9); border-radius: 50%; opacity: 0; transform: scale(0.3); }
.ch-pointer.is-pressed .ch-pointer-ripple { animation: ch-ripple 520ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes ch-ripple { 0% { opacity: 0.75; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .ch-pointer { display: none; } }
