/* Business-brain demo (shared by /ai-agents and /how-i-work). Styles start with bb-. */
.bb-stage {
  --bb-tip-bg: #0b0e1a;
  --bb-tip-line: rgba(160, 175, 215, 0.18);
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 560px;
  width: 100%;   /* without this, min-height + aspect-ratio push the box wider than the page between 860px and 1000px */
  border-radius: 16px;
  border: 1px solid #1a1d2b;
  overflow: hidden;
  background-color: #05060d;
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(40, 52, 96, 0.22), transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0L56 16.2V48.5L28 64.7L0 48.5V16.2Z M28 64.7V97' fill='none' stroke='%23ffffff' stroke-opacity='0.035' stroke-width='1'/%3E%3C/svg%3E");
  background-size: auto, 56px 97px;
  font-family: var(--sans);
}
.bb-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: default; touch-action: manipulation; }
.bb-stage canvas.pointing { cursor: pointer; }
.bb-bar { position: absolute; left: 18px; right: 18px; top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; }
.bb-demo { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: #8d94ad; text-transform: uppercase; }
.bb-demo b { color: #e6e9f5; font-weight: 500; }
.bb-legend { display: flex; gap: 14px; font-size: 12px; color: #9aa2bd; flex-wrap: wrap; justify-content: flex-end; }
.bb-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bb-legend i { display: inline-block; }
.bb-lg-hex { width: 12px; height: 13px; background: #6aa8ff; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); opacity: .85; }
.bb-lg-dot { width: 8px; height: 8px; border-radius: 50%; background: #a77bff; box-shadow: 0 0 8px #a77bff; }
.bb-lg-core { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #ff9a52; box-shadow: 0 0 8px #ff9a52; }
.bb-ticker { position: absolute; left: 18px; bottom: 16px; right: 200px; font-size: 13px; color: #c9cfe3; line-height: 1.4; display: flex; align-items: center; gap: 8px; pointer-events: none; transition: opacity .35s ease; }
.bb-live { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: #8fdc5a; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.bb-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #8fdc5a; box-shadow: 0 0 8px #8fdc5a; }
.bb-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bb-hint { position: absolute; right: 18px; bottom: 16px; font-size: 12px; color: #7d84a0; pointer-events: none; }
.bb-tip { position: absolute; z-index: 3; min-width: 170px; max-width: 250px; background: var(--bb-tip-bg); border: 1px solid var(--bb-tip-line); border-radius: 10px; padding: 10px 12px 11px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.bb-tip.on { opacity: 1; transform: none; }
.bb-t { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.bb-l { font-size: 12.5px; color: #c4c9da; line-height: 1.4; }
.bb-s { font-size: 11.5px; color: #8088a3; line-height: 1.4; margin-top: 4px; }
.bb-pill { display: inline-block; margin-top: 7px; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid #ff8a3d; color: #ffb27a; }
.bb-result { position: absolute; z-index: 2; width: 250px; background: #0d1120; border: 1px solid rgba(143, 220, 90, 0.55); border-radius: 12px; padding: 10px 12px 11px; box-shadow: 0 0 0 4px rgba(143, 220, 90, 0.07), 0 14px 34px rgba(0, 0, 0, .55); pointer-events: none; opacity: 0; transform: scale(.96); transition: opacity .25s ease, transform .25s ease; }
.bb-result.on { opacity: 1; transform: none; }
.bb-rh { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #e6e9f5; }
.bb-result.bb-yes .bb-done { color: #8fdc5a; border-color: rgba(143, 220, 90, .5); }
.bb-result { transition: opacity .25s ease, transform .25s ease, border-color .35s ease, box-shadow .35s ease; }
.bb-result.bb-held { border-color: rgba(245, 196, 81, 0.6); box-shadow: 0 0 0 4px rgba(245, 196, 81, 0.08), 0 14px 34px rgba(0, 0, 0, .55); }
.bb-done { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8fdc5a; border: 1px solid rgba(143, 220, 90, .5); border-radius: 999px; padding: 1px 7px; }
.bb-rb { margin-top: 6px; font-size: 13.5px; line-height: 1.4; color: #eef0f7; }
.bb-rf { margin-top: 7px; font-size: 11px; color: #8088a3; line-height: 1.35; }
.bb-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bb-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; transition: border-color .3s ease, background .3s ease; }
.bb-sn { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; color: var(--accent); border: 1px solid rgba(245, 196, 81, .3); background: #17140c; transition: background .3s ease, color .3s ease; }
.bb-steps b { display: block; font-size: 16px; margin: 3px 0 4px; }
.bb-steps p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.bb-steps li.active { border-color: rgba(245, 196, 81, .55); background: #15130c; }
.bb-steps li.active .bb-sn { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 860px) {
  .bb-stage { aspect-ratio: auto; height: 640px; min-height: 0; }
  .bb-legend { display: none; }
  .bb-ticker { right: 18px; bottom: 40px; font-size: 12px; }
  .bb-hint { left: 18px; right: auto; bottom: 14px; }
  .bb-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bb-result { width: 220px; }
  .bb-result.bb-dock, .bb-tip.bb-dock { left: 10px !important; right: 10px; top: auto !important; bottom: 40px; width: auto; max-width: none; transform: none; }
  .bb-tip.bb-dock { z-index: 4; }
  .bb-hint { bottom: 12px; }
}

.bb-done.bb-gate { color: var(--accent); border-color: rgba(245, 196, 81, .55); }

/* ---------- Light theme: the step cards under the demo (the demo panel stays dark on purpose) ---------- */
html[data-theme="light"] .bb-steps .bb-sn { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
html[data-theme="light"] .bb-steps li.active { border-color: rgba(138, 90, 0, 0.55); background: #fff6db; }
html[data-theme="light"] .bb-steps li.active .bb-sn { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
