/* Botty AI section on the homepage (index.html): demo window, cards and plan strip. Builds on styles.css. */
.botty { padding: 48px 0; }
.botty .section-head { max-width: 760px; }
.botty .section-head h2 .pro { font-size: 14px; vertical-align: 10px; padding: 5px 8px; }

/* ---------- Prompt buttons ---------- */
.bp { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 auto 30px; list-style: none; padding: 0; }
.bp button {
    display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 16px;
    font: 500 14px/1.3 var(--sans); color: var(--muted); text-align: left; cursor: pointer;
    background: var(--surface); border: 1px solid var(--edge); border-radius: 10px;
    box-shadow: 4px 4px 0 var(--edge); transition: transform .2s var(--ease), box-shadow .2s var(--ease), color .2s, border-color .2s;
}
.bp button i { flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.bp button:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--edge); }
.bp button[aria-pressed="true"] { color: var(--ink); border-color: var(--c); box-shadow: 4px 4px 0 var(--edge), 0 0 0 1px var(--c); }
/* The playing request's progress runs along the bottom edge of its button. */
.bp button { position: relative; overflow: hidden; }
.bp button .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-2); display: none; }
.bp button[aria-pressed="true"] .bar { display: block; }
.bp button .bar::after { content: ""; position: absolute; inset: 0; background: var(--c); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- The demo window: Botty chat, workflow, browser ---------- */
.bd { position: relative; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: 10px 10px 0 -1px var(--edge), var(--shadow); overflow: hidden; }
.bd > .tile-tab { justify-content: space-between; }
.bd > .tile-tab span { display: flex; align-items: center; gap: 9px; }
.bd > .tile-tab i { background: #c084fc; }
.bd-screen { position: relative; display: grid; grid-template-columns: 270px minmax(0, 1fr) 310px; height: 560px; }
/* Botty sits on the right, as in Studio. */
.bd .bc { order: 3; }
.bd .browser { border-right: 1px solid var(--edge); }
.bd .wf { --card: #2c3138; }
.bd .wf li { padding: 8px 10px; grid-template-columns: 16px minmax(0, 1fr) auto; margin-left: calc(var(--d, 0) * 16px); }
.bd .wf li.has-kids { padding-left: 22px; }
.bd .wf li.has-kids::before { left: 8px; }
.bd .wf li svg { width: 16px; height: 16px; }
.bd .wf li b { font-size: 12.5px; }
.bd .wf li span { font-size: 11px; }
.bd .wf li .t { font-size: 10px; }
.bd .wf-head { height: 34px; font-size: 10.5px; }
.bd .wf-view { padding: 10px; }
.bd .wf ol { gap: 6px; }
.bd .wf li.is-new { animation: bd-add .45s var(--ease); }
@keyframes bd-add { from { opacity: 0; transform: translateX(-14px) scale(.97); background: #3a2f52; border-color: #8b6fd0; } }
.bd .wf li.wf-empty { display: block; margin: 0; background: none; padding: 26px 12px; text-align: center; font-size: 12px; color: #77808c; border: 1px dashed #3a414b; border-radius: 8px; }
.bd .browser { display: flex; flex-direction: column; }
.bd .chrome { height: 34px; }
.bd .tab i { background: #c084fc; }
.bd .page { zoom: 1.32; }
.bd .progress i { background: #c084fc; }
.bd.is-loading .progress i { animation: load .75s var(--ease) forwards; }

/* Botty's panel, drawn like Studio's: a log of "You" and "Botty" turns, credit line, composer, Stop. */
.bc { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #1f2327; color: #d4d8dd; }
.bc-head { flex: none; display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 12px; font: 650 12.5px/1 var(--sans); color: #f0f2f5; background: var(--chrome); }
.bc-head small { font: 500 10.5px/1 var(--mono); color: var(--muted); }
.bc-log { position: relative; flex: 1; min-height: 0; margin: 10px 10px 0; border: 1px solid #3a414b; border-radius: 6px; overflow: hidden; }
.bc-log ol { list-style: none; margin: 0; padding: 10px 12px 14px; display: grid; gap: 10px; font-size: 12.5px; line-height: 1.45; transition: transform .45s var(--ease); }
.bc-log li { animation: bd-in .35s var(--ease); }
@keyframes bd-in { from { opacity: 0; transform: translateY(6px); } }
.bc-log .who { display: block; font-weight: 700; color: #f0f3f6; }
.bc-log .who.you { color: #c5a3f5; }
.bc-log .who time { font-weight: 700; color: #4fc1ff; }
.bc-log em { font-style: normal; color: #b5cea8; }
.bc-log q { color: #ce9178; quotes: none; }
.bc-log .act { justify-self: start; font: 500 11px/1.4 var(--mono); color: #d3f4df; background: #17382b; padding: 2px 7px; border-radius: 4px; }
.bc-log .act.is-warn { color: #ffd8d8; background: #482529; }
.bc-log .done { padding: 8px 10px; border: 1px solid #335a43; border-radius: 6px; background: #1d3327; }
.bc-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.bc-dots i { width: 5px; height: 5px; border-radius: 50%; background: #9aa3ae; animation: bd-dot 1s infinite; }
.bc-dots i:nth-child(2) { animation-delay: .15s; }
.bc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bd-dot { 50% { opacity: .25; transform: translateY(-2px); } }
/* The working glow under the log, as in Studio. */
.bc-glow { flex: none; height: 2px; margin: 0 22px; border-radius: 2px; background: linear-gradient(90deg, transparent, #4fc1ff, transparent); background-size: 50% 100%; background-repeat: no-repeat; opacity: 0; transition: opacity .3s; }
.bd.is-working .bc-glow { opacity: 1; animation: bd-glow 1.4s linear infinite; }
@keyframes bd-glow { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.bc-credits { flex: none; padding: 8px 12px 6px; font: 400 11px/1.3 var(--sans); color: #9aa3ae; }
.bc-credits b { font-weight: 600; color: #d4d8dd; }
.bc-in { flex: none; min-height: 78px; margin: 0 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.45; color: #e7eaef; border: 1px solid #3a414b; border-radius: 6px; background: #181b1f; }
.bc-in:empty::before { content: attr(data-placeholder); color: #6c7480; }
.bc-in.is-focus { border-color: #8b6fd0; }
.bc-in.is-focus::after { content: ""; display: inline-block; width: 1px; height: 13px; margin-left: 1px; vertical-align: -2px; background: #e7eaef; animation: caret .8s steps(1) infinite; }
.bc-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 10px; font-size: 10.5px; color: #77808c; }
.bc-send { min-width: 64px; padding: 6px 12px; font: 600 11.5px/1 var(--sans); color: #e7eaef; text-align: center; background: #3b414b; border: 1px solid #4a525e; border-radius: 5px; transition: background .2s, transform .12s; }
.bc-send.is-pressed { transform: translate(1px, 1px); background: #4a525e; }

/* Runtime Data under the browser: the table or variables Botty's actions fill in. */
.rd { flex: none; height: 150px; display: flex; flex-direction: column; background: #23272d; border-top: 1px solid var(--edge); font-size: 11.5px; color: #d4d8dd; }
.rd-head { flex: none; display: flex; gap: 2px; height: 30px; align-items: flex-end; padding: 0 8px; background: var(--chrome); }
.rd-head span { padding: 6px 10px; font: 500 10.5px/1 var(--sans); color: var(--muted); border-radius: 6px 6px 0 0; }
.rd-head span.on { color: var(--ink); background: #23272d; }
.rd-body { flex: 1; min-height: 0; overflow: hidden; padding: 6px 10px; }
.rd table { width: 100%; border-collapse: collapse; font: 400 11px/1.3 var(--mono); }
.rd th { text-align: left; font-weight: 500; color: #9aa3ae; padding: 3px 8px; border-bottom: 1px solid #3a414b; }
.rd td { padding: 3px 8px; border-bottom: 1px solid #2f353d; white-space: nowrap; }
.rd td.v { color: #f0a050; }
.rd tr.is-new td { animation: bd-row 1s ease-out; }
@keyframes bd-row { from { background: rgba(76, 205, 141, .25); } }
.rd-empty { padding: 14px 4px; color: #6c7480; font-size: 11px; }

/* The cursor here lives over the whole screen (chat, workflow and browser). */
.bd .bz-cursor { z-index: 5; }
.bd.is-running .bz-cursor { display: block; }
/* The visitor's plain pointer asks; the botzilla pointer only appears while Botty works. */
.bd .bz-cursor { transition: transform .58s cubic-bezier(.45, 0, .2, 1), opacity .3s ease; }
.bd .bz-cursor:not(.bd-user) { opacity: 0; }
.bd.is-working .bz-cursor:not(.bd-user) { opacity: 1; }
.bd.is-working .bd-user { opacity: 0; }

/* ---------- Capability cards ---------- */
.bk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 56px; list-style: none; padding: 0; }
.bk .tile-face { display: flex; flex-direction: column; gap: 0; }
.bk .tile p { margin-top: 10px; }
.bk-art { margin-top: 20px; padding: 14px; background: #23272d; border: 1px solid var(--edge); border-radius: 10px; min-height: 168px; display: grid; align-content: center; gap: 6px; color: #d4d8dd; }
.bk-art .wf { background: none; border: 0; }
.bk-art .wf ol { padding: 0; }
.bk-art .note { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font: 500 11px/1 var(--mono); color: #9aa3ae; }
.bk-art .note b { color: #7ee2a8; background: #1f3d2c; padding: 4px 7px; border-radius: 4px; font-weight: 600; }
/* Fix with Botty: a failed action, the right-click menu, then Botty's repair. */
.fx { position: relative; }
.fx li.is-failed { background: #3d2426; border-color: #8a3b3f; }
.fx li.is-failed i { color: #f3a3a3; }
.fx li.is-failed::after { content: "Failed"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 600 9px/1 var(--mono); color: #ffd8d8; background: #5a2a2e; padding: 3px 5px; border-radius: 4px; }
.fx li.is-fixed { background: #263d30; border-color: #335a43; }
.fx li.is-fixed::after { content: "Fixed"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 600 9px/1 var(--mono); color: #7ee2a8; background: #1f3d2c; padding: 3px 5px; border-radius: 4px; }
.fx-menu { position: absolute; left: 46%; top: 52%; z-index: 2; min-width: 150px; padding: 4px; list-style: none; margin: 0; background: #2c3138; border: 1px solid #4a525e; border-radius: 7px; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); font-size: 11.5px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.fx-menu li { padding: 5px 9px; border-radius: 4px; color: #c9ced5; }
.fx-menu li.hot { color: #fff; background: #3a2f52; }
.fx-menu li.hot::before { content: "✦ "; color: #c5a3f5; }
.fx.is-menu .fx-menu { opacity: 1; transform: none; }
.fx-say { font: 500 11px/1.4 var(--mono); color: #d3f4df; background: #17382b; padding: 3px 7px; border-radius: 4px; justify-self: start; opacity: 0; transition: opacity .3s; }
.fx.is-said .fx-say { opacity: 1; }
/* Credit budget */
.cb { display: grid; gap: 10px; font-size: 12px; }
.cb-line { color: #9aa3ae; }
.cb-line b { color: #e7eaef; font-weight: 600; }
.cb-meter { height: 8px; border-radius: 4px; background: #2f353d; overflow: hidden; }
.cb-meter i { display: block; height: 100%; width: var(--used, 15%); background: linear-gradient(90deg, #8b6fd0, #c5a3f5); border-radius: 4px; transition: width .8s var(--ease); }
.cb-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cb-row span { font: 500 11px/1 var(--mono); color: #9aa3ae; }
.cb-stop { padding: 6px 14px; font: 600 11.5px/1 var(--sans); color: #e7eaef; background: #3b414b; border: 1px solid #4a525e; border-radius: 5px; }

/* ---------- Plan strip ---------- */
.bplan { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: 8px 8px 0 -1px var(--edge), var(--shadow); }
.bplan h3 { font-size: 19px; }
.bplan p { margin-top: 6px; color: var(--muted); font-size: 15px; max-width: 46em; }
.bplan-actions { flex: none; display: flex; gap: 12px; }


@media (max-width: 1080px) {
    .bd-screen { grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: auto; height: auto; }
    .bd .bc { grid-column: 2; grid-row: 1 / span 2; height: 620px; }
    .bd .wf, .bd .browser { grid-column: 1; }
    .bd .wf { height: 230px; border-right: 0; border-bottom: 1px solid var(--edge); }
    .bd .browser { height: 390px; }
    .bk { grid-template-columns: 1fr; }
    .bplan { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
    .bd-screen { grid-template-columns: minmax(0, 1fr); }
    .bd .bc { grid-column: 1; grid-row: auto; height: 380px; border-top: 1px solid var(--edge); }
    .bd .browser { border-right: 0; }
    .bd .page { zoom: 1.1; }
    .bp button { width: 100%; }
}
:root[data-theme="light"] .bp button[aria-pressed="true"] { box-shadow: 4px 4px 0 var(--edge), 0 0 0 1px var(--c); }
