/*
 * Buildora /app: assistant builder (.ba) and customer dashboard (.bd).
 * Loaded by AppPanelProvider on top of Filament's own CSS. Filament's Tailwind
 * is precompiled, so everything custom lives here.
 */

/* Colours follow the Webuildora landing page (landing.css: ink, teal, coral, warm canvas). */
:root {
    --ba-ink: #0c1020;
    --ba-ink-soft: #4d5159;
    --ba-brand: #147e8b;
    --ba-brand-deep: #0d606a;
    --ba-mist: #e9f1ef;
    --ba-paper: #ffffff;
    --ba-line: #d8d7cd;
    --ba-canvas: #f3f2e9;
    --ba-coral: #f15d43;
    --ba-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --ba-amber: #f5b83d;
    --ba-amber-soft: #fff4dc;
    --ba-leaf: #1e9e6a;
    --ba-leaf-soft: #e3f6ee;
    --ba-danger: #c2410c;
    --ba-radius-lg: 18px;
    --ba-radius: 12px;
    --ba-radius-sm: 10px;
}

.dark {
    --ba-ink: #eceee6;
    --ba-ink-soft: #a9ada3;
    --ba-brand: #4fc1cc;
    --ba-brand-deep: #8ad8df;
    --ba-mist: #11262a;
    --ba-paper: #0f1418;
    --ba-line: #2a3236;
    --ba-coral: #f37a63;
    --ba-amber-soft: #3a2c10;
    --ba-leaf-soft: #0f3326;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ba-ico { width: 1.5rem; height: 1.5rem; flex: none; }
.ba-ico-sm { width: 1rem; height: 1rem; flex: none; }

/* ---------- Shared controls ---------- */

/* The landing page's button, a little softer: coral, ink edge, hard shadow. */
.ba-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 2.75rem; padding: .65rem 1.3rem;
    border: 2px solid #0c1020; border-radius: 6px; cursor: pointer;
    background: var(--ba-coral); color: #0c1020; box-shadow: 3px 3px 0 #0c1020;
    font: inherit; font-weight: 800; font-size: .95rem; text-decoration: none;
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.dark .ba-btn { box-shadow: 3px 3px 0 rgba(0, 0, 0, .7); }
.ba-btn:hover { background: #ff7357; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #0c1020; }
.ba-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #0c1020; }
.ba-btn:focus-visible, .ba-link:focus-visible, .ba-rail-step button:focus-visible, .ba-swatch:focus-visible { outline: 3px solid color-mix(in srgb, var(--ba-brand) 45%, transparent); outline-offset: 2px; }
.ba-btn[disabled] { opacity: .45; cursor: not-allowed; }
.ba-btn-quiet { border-color: var(--ba-line); background: transparent; color: var(--ba-ink); box-shadow: none; }
.ba-btn-quiet:hover { background: var(--ba-mist); border-color: var(--ba-ink); box-shadow: none; transform: none; }
.ba-btn-lg { min-height: 3.25rem; padding: .9rem 1.8rem; font-size: 1.05rem; }
.ba-link { background: none; border: 0; padding: 0; color: var(--ba-brand); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ba-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.ba-error { display: block; margin-top: .35rem; color: var(--ba-danger); font-style: normal; font-size: .85rem; }
.ba-note { margin-top: 1rem; color: var(--ba-ink-soft); font-size: .9rem; }

.ba-meter { display: block; height: 8px; border-radius: 999px; background: var(--ba-line); overflow: hidden; }
.ba-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--ba-brand); transition: width .5s ease; }

.ba-spinner { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; border: 2px solid var(--ba-line); border-top-color: var(--ba-brand); animation: ba-spin .8s linear infinite; }
.ba-spinner-lg { width: 2.5rem; height: 2.5rem; border-width: 3px; }
@keyframes ba-spin { to { transform: rotate(360deg); } }

/* ---------- Builder layout ---------- */

.ba {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 300px;
    gap: 2.5rem;
    align-items: start;
    color: var(--ba-ink);
}

.ba-rail { position: sticky; top: 5.5rem; }
.ba-rail-title { margin: 0 0 1rem; font-size: .85rem; color: var(--ba-ink-soft); }
.ba-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.ba-rail-step button {
    width: 100%; display: flex; align-items: center; gap: .75rem;
    padding: .55rem .6rem; border: 0; border-radius: var(--ba-radius-sm);
    background: transparent; color: var(--ba-ink-soft); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.ba-rail-step button:disabled { cursor: default; opacity: .55; }
.ba-rail-step button:not(:disabled):hover { background: var(--ba-mist); }
.ba-rail-dot {
    display: grid; place-items: center; width: 1.75rem; height: 1.75rem; flex: none;
    border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ba-line); font-size: .8rem; font-variant-numeric: tabular-nums;
}
.ba-rail-step.is-current button { color: var(--ba-ink); background: var(--ba-mist); }
.ba-rail-step.is-current .ba-rail-dot { background: var(--ba-brand); color: #fff; box-shadow: none; }
.ba-rail-step.is-done .ba-rail-dot { background: var(--ba-leaf-soft); color: var(--ba-leaf); box-shadow: none; }

.ba-main { min-width: 0; max-width: 720px; }
.ba-head h1 { margin: 0; font-size: clamp(1.6rem, 2.4vw, 2.15rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.ba-head p { margin: .6rem 0 0; max-width: 60ch; font-size: 1.05rem; line-height: 1.6; color: var(--ba-ink-soft); }
.ba-head { margin-bottom: 2rem; }
.ba-sub { margin: 2rem 0 .75rem; font-size: 1rem; font-weight: 700; }

.ba-form { display: grid; gap: 1.5rem; }
.ba-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ba-form legend, .ba-field > span { display: block; margin-bottom: .55rem; font-weight: 700; font-size: .95rem; }
.ba-field { display: block; }
.ba-form fieldset > .ba-field { margin-top: 1.1rem; }
.ba-field small { display: block; margin-top: .4rem; color: var(--ba-ink-soft); font-size: .85rem; }
.ba-field input, .ba-field textarea, .ba-fact input, .ba-fact textarea {
    width: 100%; padding: .75rem .9rem; border-radius: var(--ba-radius-sm);
    border: 1.5px solid var(--ba-line); background: var(--ba-paper); color: var(--ba-ink); font: inherit; line-height: 1.5;
}
.ba-field input:focus, .ba-field textarea:focus, .ba-fact input:focus, .ba-fact textarea:focus { outline: none; border-color: var(--ba-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ba-brand) 16%, transparent); }
.ba-field input:disabled { opacity: .5; }
.ba-check { display: flex; gap: .6rem; align-items: flex-start; color: var(--ba-ink-soft); font-size: .92rem; margin-top: -.75rem; }
.ba-check input { margin-top: .2rem; accent-color: var(--ba-brand); }
.ba-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }

.ba-niches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.ba-niche, .ba-option {
    display: flex; align-items: center; gap: .65rem; padding: .85rem .9rem;
    border-radius: var(--ba-radius); box-shadow: inset 0 0 0 1.5px var(--ba-line);
    background: var(--ba-paper); cursor: pointer; font-weight: 600; font-size: .92rem; line-height: 1.3;
    transition: box-shadow .15s ease, background-color .15s ease;
}
.ba-niche .ba-ico, .ba-option .ba-ico { color: var(--ba-ink-soft); }
.ba-niche:hover, .ba-option:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ba-brand) 50%, var(--ba-line)); }
.ba-niche.is-on, .ba-option.is-on { background: var(--ba-mist); box-shadow: inset 0 0 0 2px var(--ba-brand); }
.ba-niche.is-on .ba-ico, .ba-option.is-on .ba-ico { color: var(--ba-brand); }
.ba-niche:has(input:focus-visible), .ba-option:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--ba-brand) 45%, transparent); outline-offset: 2px; }
.ba-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.ba-options-2 { grid-template-columns: repeat(2, 1fr); }
.ba-options-3 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.ba-options-4 { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.ba-option-text { flex-direction: column; align-items: flex-start; gap: .2rem; }
.ba-option-text small { font-weight: 500; color: var(--ba-ink-soft); font-size: .82rem; }
.ba-option-switch { margin-top: .6rem; }
.ba-option-switch strong { display: flex; align-items: center; gap: .5rem; }
.ba-switch-state { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--ba-line); color: var(--ba-ink-soft); }
.ba-option-switch.is-on .ba-switch-state { background: var(--ba-brand); color: #fff; }
@media (max-width: 520px) { .ba-options-stack { grid-template-columns: 1fr; } }

/* The learning moment */
.ba-learn { padding: 1.5rem; border-radius: var(--ba-radius-lg); background: var(--ba-mist); }
.ba-learn-train { display: flex; align-items: center; gap: 1.25rem; font-weight: 600; }
.ba-learn-train p { margin: 0; }
.ba-feed { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .1rem; }
.ba-feed li { display: grid; grid-template-columns: 1.5rem 1fr auto; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--ba-line); }
.ba-feed li:last-child { border-bottom: 0; }
.ba-feed-mark { display: grid; place-items: center; }
.ba-feed .is-read .ba-feed-mark { color: var(--ba-leaf); }
.ba-feed .is-skipped { color: var(--ba-ink-soft); }
.ba-feed .is-read { animation: ba-arrive .35s ease both; }
.ba-feed-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ba-feed-meta { font-size: .85rem; color: var(--ba-ink-soft); font-variant-numeric: tabular-nums; }
@keyframes ba-arrive { from { background: var(--ba-amber-soft); } to { background: transparent; } }

.ba-win { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.25rem; padding: .55rem .9rem; border-radius: 999px; background: var(--ba-amber-soft); font-weight: 700; font-size: .92rem; }
.ba-win .ba-ico-sm { color: #b7791f; }

.ba-facts { display: grid; gap: .6rem; }
.ba-fact { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .85rem; row-gap: .35rem; align-items: start; padding: .75rem .9rem; border-radius: var(--ba-radius); background: var(--ba-paper); box-shadow: inset 0 0 0 1.5px var(--ba-line); }
.ba-fact .ba-fact-label { padding: .35rem .5rem; border-color: transparent; background: transparent; font-weight: 800; }
.ba-fact .ba-fact-label:hover { border-color: var(--ba-line); }
.ba-fact .ba-fact-value { grid-column: 2; }
.ba-fact .ba-toggle { margin-top: .4rem; }
.ba-fact textarea { resize: vertical; min-height: 2.75rem; }
.ba-fact.is-off { opacity: .5; }
.ba-toggle { position: relative; display: inline-block; width: 2.5rem; height: 1.5rem; margin-top: .65rem; }
.ba-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.ba-toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--ba-line); transition: background-color .15s ease; }
.ba-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 2px rgba(15, 42, 61, .25); }
.ba-toggle input:checked + span { background: var(--ba-leaf); }
.ba-toggle input:checked + span::after { transform: translateX(16px); }
.ba-toggle input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--ba-brand) 45%, transparent); outline-offset: 2px; }
.ba-add { display: inline-flex; align-items: center; gap: .4rem; justify-self: start; padding: .5rem .2rem; border: 0; background: none; color: var(--ba-brand); font: inherit; font-weight: 700; cursor: pointer; }

.ba-faqs { display: grid; gap: .5rem; }
.ba-faq { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; border-radius: var(--ba-radius); background: var(--ba-mist); cursor: pointer; line-height: 1.5; }
.ba-faq input { margin-top: .3rem; accent-color: var(--ba-leaf); }
.ba-faq strong { display: block; }
.ba-faq.is-off { opacity: .5; }

.ba-swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.ba-swatch { position: relative; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.ba-swatch.is-on { box-shadow: 0 0 0 3px var(--ba-paper), 0 0 0 5px var(--ba-ink); }
.ba-swatch-custom { background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #0ea5e9, #8b5cf6, #f43f5e); overflow: hidden; }
.ba-swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.ba-try ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ba-try button:not(.ba-link) { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 0; border-radius: var(--ba-radius); background: var(--ba-mist); color: var(--ba-ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.ba-try small { color: var(--ba-leaf); font-weight: 700; }

.ba-snippet { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem 1rem 1rem 1.25rem; border-radius: var(--ba-radius); background: #0f2a3d; color: #d6ecf8; }
.ba-snippet code { flex: 1 1 280px; font-size: .85rem; line-height: 1.5; word-break: break-all; }
.ba-guides { margin-top: 1.25rem; border-top: 1px solid var(--ba-line); }
.ba-guide { border-bottom: 1px solid var(--ba-line); }
.ba-guide summary { padding: .9rem .2rem; font-weight: 700; cursor: pointer; }
/* Optional Look-step extras (per-page greeting, pages without the chat), folded by default. */
.ba-more summary { padding: .35rem 0; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ba-brand); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ba-more summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--ba-brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.ba-more[open] summary { margin-bottom: .35rem; }
.ba-guide p { margin: 0 0 1rem; color: var(--ba-ink-soft); line-height: 1.6; max-width: 65ch; }
.ba-check-install { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding: 1.1rem 1.25rem; border-radius: var(--ba-radius); background: var(--ba-mist); }
.ba-check-install strong, .ba-check-install span { display: block; }
.ba-check-install span { color: var(--ba-ink-soft); font-size: .9rem; margin-top: .2rem; }
.ba-check-install.is-found { background: var(--ba-leaf-soft); }
.ba-check-install > div { flex: 1 1 260px; }
.ba-check-install .ba-field { margin-top: .7rem; max-width: 26rem; }
.ba-sites { display: grid; gap: .6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.ba-sites li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-radius: var(--ba-radius); background: var(--ba-mist); }
.ba-sites li small { color: var(--ba-ink-soft); }
.ba-sites-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-top: 1.25rem; }
.ba-sites-add .ba-field { flex: 1 1 260px; }
.ba-check-install.is-found strong { color: var(--ba-leaf); }
.ba-check-install.is-missing { background: var(--ba-amber-soft); }

.ba-callout { padding: 2rem; border-radius: var(--ba-radius-lg); background: var(--ba-mist); }
.ba-callout h2 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.ba-callout p { margin: .5rem 0 0; color: var(--ba-ink-soft); }

/* Live preview */
.ba-preview { position: sticky; top: 5.5rem; }
.ba-preview-label { margin: 0 0 .75rem; font-size: .85rem; color: var(--ba-ink-soft); }
.ba-phone { position: relative; padding: 1.25rem 1.25rem 4.75rem; border-radius: 34px; background: linear-gradient(160deg, var(--ba-mist), color-mix(in srgb, var(--ba-accent) 14%, var(--ba-mist))); min-height: 460px; }
.ba-chat { border-radius: 20px; background: #fff; color: #0f2a3d; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(15, 42, 61, .35); }
.ba-chat-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; background: var(--ba-accent); color: #fff; }
.ba-chat-head strong { display: block; font-size: .95rem; }
.ba-chat-head small { display: flex; align-items: center; gap: .35rem; font-size: .78rem; opacity: .9; }
.ba-online { width: .5rem; height: .5rem; border-radius: 50%; background: #6ee7b7; display: inline-block; }
.ba-avatar { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .22); color: #fff; font-weight: 800; }
.bd .ba-avatar { width: 2.75rem; height: 2.75rem; font-size: 1.05rem; }
.ba-chat-body { display: grid; gap: .55rem; padding: 1rem; min-height: 230px; align-content: start; background: #f6fafc; }
.ba-msg { margin: 0; max-width: 85%; padding: .6rem .85rem; border-radius: 16px; font-size: .88rem; line-height: 1.45; }
.ba-msg-bot { background: #fff; box-shadow: 0 1px 2px rgba(15, 42, 61, .08); border-bottom-left-radius: 5px; }
.ba-msg-user { justify-self: end; background: var(--ba-accent); color: #fff; border-bottom-right-radius: 5px; }
.ba-typing { display: inline-flex; gap: .25rem; width: max-content; }
.ba-typing i { width: .4rem; height: .4rem; border-radius: 50%; background: #9db4c3; animation: ba-dot 1.2s infinite ease-in-out; }
.ba-typing i:nth-child(2) { animation-delay: .15s; }
.ba-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ba-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ba-preset-dark .ba-chat, .ba-preset-dark .ba-chat-body { background: #12202b; color: #e6f1f8; }
.ba-preset-dark .ba-msg-bot { background: #1d3140; color: #e6f1f8; }
.ba-preset-minimal .ba-chat-head { background: #fff; color: #0f2a3d; border-bottom: 1px solid #e3edf3; }
.ba-preset-minimal .ba-avatar { background: var(--ba-accent); }
.ba-preset-rounded .ba-chat { border-radius: 28px; }
.ba-preset-rounded .ba-msg { border-radius: 20px; }
.ba-launcher { position: absolute; bottom: 1.1rem; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; background: var(--ba-accent); color: #fff; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--ba-accent) 70%, transparent); }
.ba-launcher-right { right: 1.25rem; }
.ba-launcher-left { left: 1.25rem; }
.ba-launcher-circle { border-radius: 50%; }
.ba-launcher-rounded_square { border-radius: 16px; }
.ba-launcher-pill { width: 4.5rem; border-radius: 999px; }

/* ---------- Dashboard ---------- */

.bd { display: grid; gap: 2.25rem; color: var(--ba-ink); max-width: 1100px; }
.bd-hero { position: relative; padding: clamp(1.75rem, 4vw, 3rem); border-radius: var(--ba-radius-lg); background: var(--ba-mist); overflow: hidden; }
.bd-hero h1 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; max-width: 18ch; }
.bd-hello { margin: 0 0 .7rem; color: var(--ba-brand-deep); font-family: var(--ba-mono); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.bd-lede { margin: 1rem 0 0; font-size: 1.1rem; line-height: 1.6; color: var(--ba-ink-soft); max-width: 52ch; }
.bd-hero .ba-btn { margin-top: 1.75rem; }

.bd-hero-empty { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.bd-promises { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .5rem; font-weight: 600; }
.bd-promises li { display: flex; align-items: center; gap: .6rem; }
.bd-promises .ba-ico-sm { color: var(--ba-leaf); }
.bd-hero-art { --ba-accent: var(--ba-brand); display: grid; gap: .6rem; padding: 1.5rem; border-radius: 24px; background: #f6fafc; color: #0f2a3d; box-shadow: 0 24px 48px -24px rgba(15, 42, 61, .4); transform: rotate(1.5deg); }
.bd-hero-art .ba-msg { font-size: .95rem; }
.bd-hero-art small { color: #4b6475; font-size: .8rem; text-align: right; }

.bd-hero-progress { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.bd-ring { --pct: 0; display: grid; place-items: center; width: clamp(130px, 16vw, 170px); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--ba-amber) calc(var(--pct) * 1%), var(--ba-line) 0); }
.bd-ring span { display: flex; align-items: center; justify-content: center; width: 78%; aspect-ratio: 1; border-radius: 50%; background: var(--ba-mist); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bd-ring small { font-size: .45em; }
.bd-checklist { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .45rem; }
.bd-checklist li { display: flex; align-items: center; gap: .65rem; color: var(--ba-ink-soft); }
.bd-checklist li.is-done { color: var(--ba-ink); }
.bd-checklist li.is-next { color: var(--ba-ink); font-weight: 700; }
.bd-tick { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ba-line); flex: none; }
.is-done .bd-tick { background: var(--ba-leaf); color: #fff; box-shadow: none; }
.is-next .bd-tick { box-shadow: inset 0 0 0 2px var(--ba-amber); }

.bd-activity { display: grid; gap: 1.25rem; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--ba-line); border-radius: var(--ba-radius-lg); background: var(--ba-paper); }
.bd-activity-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem 1.25rem; }
.bd-activity-header h1, .bd-activity-header h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.15; font-weight: 800; }
.bd-activity-header p { margin: .3rem 0 0; font-size: .9rem; color: var(--ba-ink-soft); overflow-wrap: anywhere; }
.bd-activity-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .75rem; margin: 0; }
.bd-activity-stats > div { padding: .85rem 1rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-paper); }
.bd-activity-stats > .bd-activity-primary { background: var(--ba-mist); border-color: var(--ba-mist); }
.bd-activity-stats dt { font-size: .85rem; line-height: 1.3; color: var(--ba-ink-soft); }
.bd-activity-stats dd { margin: .35rem 0 0; font-size: clamp(1.65rem, 5vw, 2.15rem); line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bd-activity-primary dd { color: var(--ba-brand-deep); }

.bd-list header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.bd-list h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.bd-bot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--ba-line); }
.bd-bot h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 800; }
.bd-bot p { margin: .2rem 0 0; color: var(--ba-ink-soft); font-size: .9rem; }
.bd-bot-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.bd-chip { padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.bd-chip-live { background: var(--ba-leaf-soft); color: var(--ba-leaf); }
.bd-chip-setup { background: var(--ba-amber-soft); color: #9a6212; }
.bd-chip-paused { background: var(--ba-mist); color: var(--ba-ink-soft); }
.dark .bd-chip-setup { color: var(--ba-amber); }
.bd-usage { display: grid; gap: .3rem; margin-top: .6rem; max-width: 340px; }
.bd-usage small { color: var(--ba-ink-soft); font-size: .8rem; }

.bd-trial { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--ba-radius); box-shadow: inset 0 0 0 1.5px var(--ba-line); }
.bd-trial p { margin: 0; max-width: 60ch; line-height: 1.5; }

/* ---------- Support view banner ---------- */

.bd-viewing-as { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; background: var(--ba-amber); color: #2b1d00; font-size: .9rem; font-weight: 600; }
.bd-viewing-as form { margin: 0; }
.bd-viewing-as button { border: 0; border-radius: 999px; padding: .35rem .9rem; background: #2b1d00; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.bd-bots-paused { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem 1rem; margin: 0 0 1rem; padding: .75rem 1rem; border-radius: var(--ba-radius); background: var(--ba-danger); color: #fff; font-size: .95rem; font-weight: 600; }
.bd-bots-paused a { border-radius: 999px; padding: .35rem .9rem; background: #fff; color: var(--ba-danger); font-weight: 700; text-decoration: none; }

/* ---------- Conversations (.bc) ---------- */

.bc { --ba-accent: var(--ba-brand); }
.bc-filter select { width: min(100%, 320px); padding: .65rem .9rem; border-radius: var(--ba-radius-sm); border: 1.5px solid var(--ba-line); background: var(--ba-paper); color: var(--ba-ink); font: inherit; }
.bc-layout { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.bc-list { display: grid; gap: .5rem; }
.bc-item { display: grid; gap: .35rem; width: 100%; text-align: left; padding: .9rem 1rem; border: 0; border-radius: var(--ba-radius); background: transparent; box-shadow: inset 0 0 0 1.5px var(--ba-line); color: var(--ba-ink); font: inherit; cursor: pointer; }
.bc-item:hover, .bc-item.is-open { background: var(--ba-mist); }
.bc-item.is-open { box-shadow: inset 0 0 0 2px var(--ba-brand); }
.bc-item .bd-chip { justify-self: start; }
.bc-item-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.bc-item-head strong { overflow-wrap: anywhere; }
.bc-item time, .bc-item small { color: var(--ba-ink-soft); font-size: .8rem; white-space: nowrap; }
.bc-preview { color: var(--ba-ink-soft); font-size: .88rem; line-height: 1.4; }
.bc-thread { position: sticky; top: 5.5rem; border-radius: var(--ba-radius-lg); box-shadow: inset 0 0 0 1.5px var(--ba-line); overflow: hidden; }
.bc-thread > .ba-note { padding: 2rem; margin: 0; }
.bc-thread header { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--ba-line); }
.bc-thread h2 { margin: 0; font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
.bc-thread header p { margin: .2rem 0 0; color: var(--ba-ink-soft); font-size: .85rem; }
.bc-messages { max-height: 65vh; overflow-y: auto; }
.bc-messages .ba-msg { white-space: pre-line; }
.dark .bc-messages { background: var(--ba-mist); }
.dark .bc-messages .ba-msg-bot { background: var(--ba-paper); color: var(--ba-ink); }

/* ---------- Website leads ---------- */

.b-leads { gap: 1.25rem; }
.b-leads > .ba-note { margin: 0; }
.b-leads-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.b-lead-card { display: grid; gap: .9rem; padding: clamp(1rem, 3vw, 1.35rem); border: 1.5px solid var(--ba-line); border-radius: var(--ba-radius-lg); background: var(--ba-paper); }
.b-lead-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1rem; }
.b-lead-header h2 { margin: 0; font-size: 1.1rem; font-weight: 800; overflow-wrap: anywhere; }
.b-lead-header p { margin: .2rem 0 0; color: var(--ba-ink-soft); font-size: .86rem; }
.b-lead-score { max-width: 100%; padding: .45rem .7rem; border-radius: var(--ba-radius-sm); background: var(--ba-mist); color: var(--ba-ink); font-size: .85rem; }
.b-lead-score summary { cursor: pointer; }
.b-lead-score strong { margin-inline-start: .35rem; font-variant-numeric: tabular-nums; }
.b-lead-score ul { margin: .45rem 0 0; padding-inline-start: 1.25rem; list-style: disc; color: var(--ba-ink-soft); }
.b-lead-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .65rem 1rem; margin: 0; }
.b-lead-contact:empty { display: none; }
.b-lead-contact dt { color: var(--ba-ink-soft); font-size: .8rem; }
.b-lead-contact dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.b-lead-contact a { color: var(--ba-brand-deep); text-decoration: underline; text-underline-offset: 2px; }
.b-lead-excerpt { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.b-lead-card footer { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.b-lead-card .ba-note { margin: 0; }

/* ---------- Account (.bacc) ---------- */

.bacc section { padding: 1.5rem; border-radius: var(--ba-radius-lg); box-shadow: inset 0 0 0 1.5px var(--ba-line); }
.bacc h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.bacc section > p { margin: .5rem 0 0; color: var(--ba-ink-soft); line-height: 1.55; max-width: 65ch; }
.bacc dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.5rem; margin: 1rem 0 0; }
.bacc dt { color: var(--ba-ink-soft); }
.bacc dd { margin: 0; overflow-wrap: anywhere; }
.bacc .ba-form { display: grid; gap: 1rem; max-width: 420px; margin-top: 1.25rem; }
.bacc-danger { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ba-danger) 45%, var(--ba-line)) !important; }
.bacc-danger .ba-btn { background: var(--ba-danger); }
.bacc-danger h3 { margin: 1.25rem 0 .5rem; font-size: 1rem; font-weight: 700; }
.bacc-kept { display: grid; gap: .55rem; margin: 0; padding-left: 1.1rem; list-style: disc; max-width: 75ch; color: var(--ba-ink-soft); line-height: 1.5; }
.bacc-kept strong { color: var(--ba-ink); }
.bd-bot-actions .ba-link-danger { color: var(--ba-danger); font-size: .9rem; }

/* ---------- Help (.bhelp) ---------- */

.bhelp { max-width: 820px; }
.bhelp h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.bhelp-contact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 1.5rem; padding: 1.5rem; border-radius: var(--ba-radius-lg); background: var(--ba-mist); }
.bhelp-contact p { margin: .4rem 0 0; color: var(--ba-ink-soft); line-height: 1.55; max-width: 52ch; }
.bhelp-contact .ba-btn { overflow-wrap: anywhere; }
.bhelp-faq { display: grid; gap: .75rem; }
.bhelp-faq h2 { margin-bottom: .25rem; }
.bhelp-faq details { padding: 0 1.25rem; border-radius: var(--ba-radius); box-shadow: inset 0 0 0 1.5px var(--ba-line); }
.bhelp-faq details[open] { box-shadow: inset 0 0 0 2px var(--ba-brand); }
.bhelp-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.05rem 0; font-weight: 700; cursor: pointer; list-style: none; }
.bhelp-faq summary::-webkit-details-marker { display: none; }
.bhelp-faq summary::after { content: "+"; flex: none; font-size: 1.35rem; font-weight: 600; line-height: 1; color: var(--ba-brand); }
.bhelp-faq details[open] summary::after { content: "\2212"; }
.bhelp-faq summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--ba-brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.bhelp-faq details p { margin: 0 0 1rem; color: var(--ba-ink-soft); line-height: 1.6; max-width: 68ch; }
.bhelp-faq details p strong { color: var(--ba-ink); }
.bhelp-more { margin: 0; color: var(--ba-ink-soft); font-size: .9rem; }

/* ---------- Refer a friend (.bref) ---------- */

.bref { display: grid; gap: 1.5rem; max-width: 820px; }
.bref h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.bref-hero { padding: 1.5rem; border-radius: var(--ba-radius-lg); background: var(--ba-mist); }
.bref-hero > p { margin: .5rem 0 0; color: var(--ba-ink-soft); line-height: 1.6; max-width: 62ch; }
.bref-link { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.bref-link input { flex: 1 1 16rem; min-width: 0; padding: .75rem .9rem; border: 0; border-radius: var(--ba-radius); box-shadow: inset 0 0 0 1.5px var(--ba-line); background: transparent; color: inherit; font: inherit; font-weight: 600; }
.bref-link input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ba-brand); }
.bref-share { margin: .8rem 0 0; color: var(--ba-ink-soft); }
.bref-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.bref-stats > div { padding: 1rem 1.1rem; border-radius: var(--ba-radius); box-shadow: inset 0 0 0 1.5px var(--ba-line); color: var(--ba-ink-soft); font-size: .9rem; }
.bref-num { display: block; margin-bottom: .2rem; color: var(--ba-ink); font-size: 1.5rem; font-weight: 800; overflow-wrap: anywhere; }
.bref-list ul { margin: .75rem 0 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.bref-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .7rem .9rem; border-radius: var(--ba-radius); background: var(--ba-mist); }
.bref-list li span { color: var(--ba-ink-soft); }
@media (max-width: 640px) { .bref-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bref-invited { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--ba-radius); background: var(--ba-mist); box-shadow: inset 0 0 0 1.5px var(--ba-brand); font-weight: 600; line-height: 1.5; }

@media (max-width: 860px) {
    .bc-layout { grid-template-columns: 1fr; }
    .bc-thread { position: static; }
}

/* ---------- Responsive and motion ---------- */

@media (max-width: 1280px) {
    .ba { grid-template-columns: 190px minmax(0, 1fr); }
    .ba-preview { grid-column: 2; position: static; max-width: 380px; }
}
@media (max-width: 860px) {
    .ba { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .ba-rail { position: static; }
    .ba-rail ol { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: .25rem; }
    .ba-rail-step button span:last-child { display: none; }
    .ba-rail-step.is-current button span:last-child { display: inline; }
    .ba-preview { grid-column: 1; }
    .bd-hero-empty, .bd-hero-progress { grid-template-columns: minmax(0, 1fr); }
    .bd-hero-art { transform: none; }
    .bd-bot { grid-template-columns: auto minmax(0, 1fr); }
    .bd-bot-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .ba-spinner, .ba-typing i, .ba-feed .is-read { animation: none; }
    .ba-meter > span, .ba-btn { transition: none; }
}

/* ---------- Webuildora assistant studio ---------- */

.fi-main:has(.ba-stage) {
    --ba-site-ink: #0c1020;
    --ba-site-teal: #147e8b;
    --ba-site-coral: #f15d43;
    --ba-site-canvas: #f3f2e9;
    --ba-site-paper: #fbfaf4;
    --ba-site-line: #cacbc2;
    background:
        linear-gradient(rgba(12, 16, 32, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12, 16, 32, .035) 1px, transparent 1px),
        var(--ba-site-canvas);
    background-size: 42px 42px;
}
.fi-main:has(.ba-stage) .fi-page { color: var(--ba-site-ink); }
.fi-main:has(.ba-stage) .fi-page-header { display: none; }
.fi-main:has(.ba-stage) .fi-page-content { gap: 0; }

.ba-stage {
    --ba-ink: var(--ba-site-ink);
    --ba-ink-soft: #555b65;
    --ba-brand: var(--ba-site-teal);
    --ba-brand-deep: #0c6570;
    --ba-mist: #e6ebe5;
    --ba-paper: var(--ba-site-paper);
    --ba-line: var(--ba-site-line);
    position: relative;
    /* 100%: as a grid item it would otherwise grow to its content (about 1,020px) and clip on laptops. */
    max-width: min(1560px, 100%);
    margin: 0 auto;
    border: 1px solid rgba(12, 16, 32, .18);
    background: rgba(251, 250, 244, .94);
    box-shadow: 0 32px 80px rgba(12, 16, 32, .08);
    overflow: hidden;
}
.ba-stage::before {
    content: "";
    position: absolute;
    z-index: 0;
    width: 420px;
    height: 420px;
    top: -260px;
    right: 12%;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ba-site-teal) 14%, transparent);
    filter: blur(2px);
    pointer-events: none;
}
.ba-studio-bar,
.ba-progress,
.ba,
.ba-assurance { position: relative; z-index: 1; }

.ba-studio-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 76px;
    padding: 1rem clamp(1.25rem, 2.5vw, 2.5rem);
    border-bottom: 1px solid rgba(12, 16, 32, .18);
}
.ba-studio-brand { display: flex; align-items: center; gap: .8rem; }
.ba-studio-logo { display: block; width: 132px; height: auto; }
.ba-studio-brand small,
.ba-studio-promise,
.ba-step-label,
.ba-progress,
.ba-preview-heading,
.ba-rail-title span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-transform: uppercase;
    letter-spacing: .14em;
}
.ba-studio-brand small { padding-left: .8rem; border-left: 1px solid var(--ba-site-line); color: var(--ba-ink-soft); font-size: .58rem; white-space: nowrap; }
.ba-studio-promise { display: flex; gap: 1.25rem; color: var(--ba-ink-soft); font-size: .62rem; }
.ba-studio-promise span { display: flex; align-items: center; gap: .45rem; }
.ba-status-dot { display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: #24a46d; box-shadow: 0 0 0 4px rgba(36, 164, 109, .12); }

.ba-progress {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: .7rem clamp(1.25rem, 2.5vw, 2.5rem);
    color: var(--ba-ink-soft);
    border-bottom: 1px solid rgba(12, 16, 32, .12);
    background: rgba(243, 242, 233, .66);
    font-size: .62rem;
}
.ba-progress-copy { display: flex; gap: .65rem; align-items: baseline; white-space: nowrap; }
.ba-progress-copy strong { color: var(--ba-site-teal); font-size: .78rem; }
.ba-progress-track { height: 3px; background: rgba(12, 16, 32, .13); overflow: hidden; }
.ba-progress-track span { display: block; height: 100%; background: var(--ba-site-coral); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.ba-progress p { margin: 0; white-space: nowrap; }

.ba-stage .ba {
    grid-template-columns: 220px minmax(420px, 1fr) 350px;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: clamp(1.5rem, 3.5vw, 3.5rem) clamp(1.25rem, 3vw, 3rem) clamp(2rem, 4vw, 4rem);
}
.ba-stage .ba-rail { top: 2rem; }
.ba-stage .ba-rail-title { margin: 0 0 1.3rem; color: var(--ba-ink-soft); font-size: .78rem; line-height: 1.55; }
.ba-stage .ba-rail-title span { display: block; margin-bottom: .45rem; color: var(--ba-site-teal); font-size: .6rem; }
.ba-stage .ba-rail ol { gap: 0; border-top: 1px solid var(--ba-site-line); }
.ba-stage .ba-rail-step { position: relative; border-bottom: 1px solid var(--ba-site-line); }
.ba-stage .ba-rail-step button {
    gap: .8rem;
    min-height: 66px;
    padding: .65rem .35rem;
    border-radius: 0;
    color: #757981;
    transition: color .2s ease, padding-left .2s ease;
}
.ba-stage .ba-rail-step button > span:last-child { display: grid; gap: .15rem; }
.ba-stage .ba-rail-step button strong { font-size: .87rem; font-weight: 750; }
.ba-stage .ba-rail-step button small { font-size: .68rem; font-weight: 500; }
.ba-stage .ba-rail-step button:not(:disabled):hover { padding-left: .65rem; background: transparent; color: var(--ba-site-teal); }
.ba-stage .ba-rail-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 0;
    box-shadow: none;
    color: #777b80;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .68rem;
}
.ba-stage .ba-rail-step.is-current::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 3px; background: var(--ba-site-coral); }
.ba-stage .ba-rail-step.is-current button { padding-left: .65rem; color: var(--ba-site-ink); background: transparent; }
.ba-stage .ba-rail-step.is-current .ba-rail-dot { color: var(--ba-site-coral); background: transparent; }
.ba-stage .ba-rail-step.is-done .ba-rail-dot { color: var(--ba-site-teal); background: transparent; }

.ba-stage .ba-main { max-width: 760px; }
.ba-step-label { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; color: var(--ba-site-teal); font-size: .64rem; }
.ba-step-label > span { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--ba-site-teal); }
.ba-step-label p { margin: 0; }
.ba-stage .ba-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: 1.5rem; border-bottom: 1px solid var(--ba-site-line); }
.ba-stage .ba-head h1 { max-width: 18ch; color: var(--ba-site-ink); font-size: clamp(2.25rem, 4vw, 4.4rem); line-height: .98; letter-spacing: -.055em; font-weight: 780; }
.ba-stage .ba-head h1 em { display: block; color: var(--ba-site-teal); font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
.ba-stage .ba-head p { max-width: 59ch; margin-top: 1rem; color: #414650; font-size: 1rem; line-height: 1.65; }
.ba-stage .ba-form { gap: 1.15rem; }
.ba-form-block { padding: 1.15rem; border: 1px solid var(--ba-site-line) !important; background: rgba(255,255,255,.38); }
.ba-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ba-stage .ba-form legend,
.ba-stage .ba-field > span { margin-bottom: .45rem; color: var(--ba-site-ink); font-size: .84rem; }
.ba-field-intro { margin: -.1rem 0 1rem; color: var(--ba-ink-soft); font-size: .78rem; line-height: 1.5; }

.ba-stage .ba-niches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.ba-stage .ba-niche,
.ba-stage .ba-option {
    position: relative;
    min-height: 68px;
    padding: .65rem .75rem;
    border-radius: 0;
    box-shadow: inset 0 0 0 1px var(--ba-site-line);
    background: rgba(251,250,244,.72);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.ba-stage .ba-niche:hover,
.ba-stage .ba-option:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--ba-site-ink), 0 9px 18px rgba(12,16,32,.07); }
.ba-stage .ba-niche.is-on,
.ba-stage .ba-option.is-on { background: #e7efea; box-shadow: inset 0 0 0 2px var(--ba-site-teal); }
.ba-niche-icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; flex: none; border: 1px solid var(--ba-site-line); background: var(--ba-site-paper); }
.ba-niche-copy { display: grid; gap: .13rem; min-width: 0; }
.ba-niche-copy strong { font-size: .8rem; line-height: 1.25; }
.ba-niche-copy small { color: var(--ba-ink-soft); font-size: .64rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.ba-choice-tick { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-left: auto; border: 1px solid var(--ba-site-line); color: transparent; }
.ba-niche.is-on .ba-choice-tick { border-color: var(--ba-site-teal); background: var(--ba-site-teal); color: white; }
.ba-niche.is-on .ba-niche-copy small { color: var(--ba-site-teal); }

.ba-stage .ba-field input,
.ba-stage .ba-field textarea,
.ba-stage .ba-fact input,
.ba-stage .ba-fact textarea {
    border: 1px solid var(--ba-site-line);
    border-radius: 0;
    background: rgba(251,250,244,.88);
    color: var(--ba-site-ink);
}
.ba-stage .ba-field input:focus,
.ba-stage .ba-field textarea:focus,
.ba-stage .ba-fact input:focus,
.ba-stage .ba-fact textarea:focus { border-color: var(--ba-site-teal); box-shadow: 0 0 0 3px rgba(20,126,139,.13); }
.ba-stage .ba-field small { color: var(--ba-ink-soft); font-size: .73rem; line-height: 1.45; }
.ba-stage .ba-check { margin: .1rem 0 0; color: #414650; }
.ba-stage .ba-check input { accent-color: var(--ba-site-teal); }
.ba-stage .ba-actions { align-items: center; }
.ba-stage .ba-btn {
    min-height: 3.1rem;
    padding: .8rem 1.25rem;
    border: 1px solid var(--ba-site-ink);
    border-radius: 0;
    background: var(--ba-site-coral);
    color: var(--ba-site-ink);
    box-shadow: 4px 4px 0 var(--ba-site-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.ba-stage .ba-btn:hover { background: #ff7357; transform: translate(-1px,-1px); box-shadow: 6px 6px 0 var(--ba-site-ink); }
.ba-stage .ba-btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ba-site-ink); }
.ba-stage .ba-btn-quiet { background: transparent; box-shadow: none; }
.ba-btn-arrow b { margin-left: .5rem; font-size: 1rem; }
.ba-action-note { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--ba-ink-soft); font-size: .73rem; }

.ba-stage .ba-preview { top: 2rem; }
.ba-preview-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; font-size: .61rem; }
.ba-preview-heading p { display: flex; align-items: center; gap: .55rem; margin: 0; color: var(--ba-site-ink); }
.ba-preview-heading small { color: var(--ba-ink-soft); font-size: .56rem; }
.ba-stage .ba-phone {
    min-height: 520px;
    padding: 0 1rem 4.6rem;
    border: 1px solid var(--ba-site-ink);
    border-radius: 0;
    background: #eef0e9;
    box-shadow: 10px 10px 0 rgba(12,16,32,.12);
    overflow: hidden;
}
.ba-browser-chrome { display: flex; align-items: center; gap: .3rem; height: 34px; margin: 0 -1rem 1rem; padding: 0 .75rem; border-bottom: 1px solid rgba(12,16,32,.2); background: var(--ba-site-paper); }
.ba-browser-chrome i { width: .38rem; height: .38rem; border-radius: 50%; background: #aeb0aa; }
.ba-browser-chrome i:first-child { background: var(--ba-site-coral); }
.ba-browser-chrome span { margin-left: .4rem; color: #777b80; font-size: .56rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ba-site-ghost { position: absolute; inset: 55px 1.3rem auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .35rem; opacity: .72; }
.ba-site-ghost span { height: 3px; background: #bec4bd; }
.ba-site-ghost span:first-child { grid-column: span 2; background: var(--ba-site-teal); }
.ba-site-ghost b { grid-column: 1 / -1; margin-top: 1.1rem; max-width: 12ch; color: var(--ba-site-ink); font-family: Georgia, 'Times New Roman', serif; font-size: 1.5rem; font-style: italic; font-weight: 400; line-height: 1; }
.ba-site-ghost i { height: 50px; margin-top: .6rem; border: 1px solid #c5c9c3; background: rgba(251,250,244,.7); }
.ba-stage .ba-chat { position: absolute; z-index: 2; right: 1rem; bottom: 4.8rem; left: 2.8rem; border: 1px solid rgba(12,16,32,.2); border-radius: 0; box-shadow: 0 22px 50px rgba(12,16,32,.2); transform: translateY(0); animation: ba-preview-arrive .55s cubic-bezier(.2,.8,.2,1) both; }
.ba-stage .ba-chat-head { padding: .78rem .9rem; }
.ba-stage .ba-chat-body { min-height: 195px; padding: .85rem; background: #f5f6f2; }
.ba-stage .ba-msg { border-radius: 9px; font-size: .78rem; }
.ba-stage .ba-chat-compose { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: .55rem .7rem .55rem .85rem; border-top: 1px solid #e0e3de; color: #8b8f91; background: #fff; font-size: .7rem; }
.ba-stage .ba-chat-compose b { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%; color: #fff; background: var(--ba-accent); }
.ba-stage .ba-launcher { z-index: 3; border: 1px solid rgba(12,16,32,.2); }
.ba-preview-foot { margin: 1rem 0 0; color: var(--ba-ink-soft); font-size: .72rem; line-height: 1.5; }
.ba-preview-foot strong { color: var(--ba-site-ink); }
@keyframes ba-preview-arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.ba-assurance { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 2rem; padding: 1rem 1.5rem; border-top: 1px solid rgba(12,16,32,.15); background: var(--ba-site-ink); color: #f1f0e8; font-size: .7rem; }
.ba-assurance span { display: flex; align-items: center; gap: .45rem; }
.ba-assurance .ba-ico-sm { color: #65b6bc; }

@media (max-width: 1320px) {
    .ba-stage .ba { grid-template-columns: 190px minmax(390px, 1fr) 310px; gap: 1.5rem; }
}
@media (max-width: 1100px) {
    .ba-stage .ba { grid-template-columns: minmax(0, 1fr) 310px; }
    .ba-stage .ba-rail { grid-column: 1 / -1; position: static; }
    .ba-stage .ba-rail-title { display: none; }
    .ba-stage .ba-rail ol { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--ba-site-line); }
    .ba-stage .ba-rail-step { border-bottom: 0; }
    .ba-stage .ba-rail-step button { justify-content: center; min-height: 54px; }
    .ba-stage .ba-rail-step button > span:last-child small { display: none; }
    .ba-stage .ba-preview { grid-column: 2; position: sticky; }
}
@media (max-width: 780px) {
    .fi-main:has(.ba-stage) { background-size: 30px 30px; }
    .ba-stage { margin: -.75rem; max-width: calc(100% + 1.5rem); border-right: 0; border-left: 0; }
    .ba-studio-promise span:last-child { display: none; }
    .ba-studio-logo { width: 112px; }
    .ba-studio-brand small { display: none; }
    .ba-progress { grid-template-columns: auto 1fr; }
    .ba-progress p { display: none; }
    .ba-stage .ba { grid-template-columns: minmax(0, 1fr); padding-top: 1.25rem; }
    .ba-stage .ba-rail { overflow: hidden; }
    .ba-stage .ba-rail ol { grid-template-columns: repeat(6, minmax(42px, 1fr)); overflow: visible; }
    .ba-stage .ba-rail-step button { display: grid; justify-items: center; gap: .25rem; padding: .5rem .1rem !important; }
    .ba-stage .ba-rail-step button > span:last-child { display: none; }
    .ba-stage .ba-rail-step.is-current button > span:last-child { display: grid; position: absolute; top: 100%; left: 0; }
    .ba-stage .ba-rail-step.is-current button > span:last-child strong { display: none; }
    .ba-stage .ba-rail-step.is-current::before { top: auto; right: 0; bottom: -1px; width: auto; height: 3px; }
    .ba-stage .ba-main { max-width: none; }
    .ba-stage .ba-head h1 { font-size: clamp(2.15rem, 11vw, 3.4rem); }
    .ba-stage .ba-niches, .ba-form-grid { grid-template-columns: 1fr; }
    .ba-stage .ba-preview { grid-column: 1; position: static; max-width: none; }
    .ba-stage .ba-phone { min-height: 490px; }
    .ba-action-note { flex-basis: 100%; }
    .ba-assurance { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .ba-stage *, .ba-stage *::before, .ba-stage *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- WhatsApp (.bwa), on top of .bacc ---------- */

.bwa-on { display: inline-block; margin-right: .5rem; padding: .15rem .6rem; border-radius: 999px; background: var(--ba-leaf-soft); color: var(--ba-leaf); font-size: .8rem; font-weight: 700; }
.bwa-soon { padding: .8rem 1rem; border-radius: var(--ba-radius-sm); background: var(--ba-amber-soft); color: var(--ba-ink) !important; }


/* ---------- Look step: style gallery, avatar and the widget preview (.wx mirrors widget-embed.js) ---------- */

.ba-style-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .7rem; }
.ba-style-card { display: grid; gap: .3rem; padding: .7rem; border: 0; border-radius: var(--ba-radius); background: var(--ba-paper); box-shadow: inset 0 0 0 1.5px var(--ba-line); color: var(--ba-ink); font: inherit; text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.ba-style-card:hover { transform: translateY(-2px); }
.ba-style-card.is-on { box-shadow: inset 0 0 0 2px var(--ba-brand); background: var(--ba-mist); }
.ba-style-card strong { font-size: .9rem; }
.ba-style-card small { color: var(--ba-ink-soft); font-size: .75rem; line-height: 1.35; }
.ba-style-mini { display: grid; grid-template-rows: 46px 1fr; height: 104px; margin-bottom: .3rem; border-radius: 12px; overflow: hidden; background: #f5f5f1; box-shadow: 0 6px 16px rgba(11,16,32,.12); }
.ba-style-mini i { display: block; }
.ba-style-mini-head { display: grid; align-content: center; gap: 5px; padding: 0 12px; background: #0b1020; border-top: 3px solid var(--wx-brand); }
.ba-style-mini-head b { display: block; height: 5px; width: 60%; border-radius: 3px; background: rgba(255,255,255,.85); }
.ba-style-mini-head b + b { width: 38%; background: rgba(255,255,255,.45); }
.ba-style-mini-card { margin: 8px; padding: 7px; border-radius: 8px; background: #fff; box-shadow: 0 3px 8px rgba(11,16,32,.08); }
.ba-style-mini-card b { display: block; height: 4px; width: 70%; margin-bottom: 4px; border-radius: 2px; background: #c9ccd2; }
.ba-style-mini-card em { display: block; height: 9px; width: 55%; margin-top: 5px; border-radius: 3px; background: var(--wx-brand); }
.ba-style-mini.wx-h-brand .ba-style-mini-head { background: var(--wx-brand); border-top-color: var(--wx-brand); }
.ba-style-mini.wx-h-light .ba-style-mini-head { background: #fff; border-bottom: 1px solid #e6e8ec; }
.ba-style-mini.wx-h-light .ba-style-mini-head b { background: #0b1020; }
.ba-style-mini.wx-h-light .ba-style-mini-head b + b { background: #a3a9b4; }
.ba-style-mini.wx-t-dark { background: #10141f; }
.ba-style-mini.wx-t-dark .ba-style-mini-card { background: #171c29; }
.ba-style-mini.wx-t-dark .ba-style-mini-card b { background: #3a4152; }

.ba-avatar-row { display: flex; align-items: center; gap: 1rem; }
.ba-avatar-row > div { display: grid; gap: .4rem; justify-items: start; }
.ba-avatar-img, .ba-avatar-lg { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.ba-avatar-lg { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.3rem; }
.ba-upload { cursor: pointer; }
.ba-look .ba-note { margin-top: 0; font-size: .8rem; }
.ba-topics { margin-top: .75rem; }
.wx-f-system { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.wx-f-rounded { font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", system-ui, sans-serif; }
.wx-f-serif { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }

.ba-stage .wx { position: absolute; z-index: 2; bottom: 4.8rem; width: min(270px, calc(100% - 2rem)); display: grid; grid-template-rows: auto 1fr auto; border-radius: 20px; overflow: hidden; background: #f5f5f1; color: #0b1020; box-shadow: 0 22px 50px rgba(12,16,32,.26); animation: ba-preview-arrive .45s cubic-bezier(.2,.8,.2,1) both; }
.ba-stage .wx.wx-side-right { right: 1rem; }
.ba-stage .wx.wx-side-left { left: 1rem; }
.ba-stage .wx.wx-s-compact { width: min(240px, calc(100% - 2rem)); }
.ba-stage .wx.wx-s-large { width: calc(100% - 2rem); }
.wx-head { position: relative; padding: 1rem 1rem 1.1rem; text-align: center; background: #0b1020; color: #fff; border-top: 3px solid var(--wx-brand); }
.wx-close { position: absolute; top: .55rem; right: .6rem; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.16); font-size: .8rem; line-height: 1; }
.wx-kicker { display: flex; justify-content: center; align-items: center; gap: .4rem; margin: 0; color: rgba(255,255,255,.6); font-size: .55rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.wx-kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--wx-brand); }
.wx-title { margin: .45rem 0 .25rem; font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.wx-text { margin: 0 auto; max-width: 22ch; color: rgba(255,255,255,.72); font-size: .66rem; line-height: 1.45; }
.wx-face { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-top: .55rem; border-radius: 50%; background: #fff; color: var(--wx-brand); font-size: .75rem; font-weight: 800; overflow: hidden; }
.wx-face img { width: 100%; height: 100%; object-fit: cover; }
.wx-body { padding: .7rem; }
.wx-card { padding: .8rem; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(11,16,32,.08); }
.wx-card strong { display: block; font-size: .78rem; }
.wx-card p { margin: .3rem 0 .55rem; color: #667085; font-size: .62rem; line-height: 1.45; }
.wx-topics { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.wx-topics span { padding: .2rem .45rem; border-radius: 999px; background: #f5f5f1; border: 1px solid rgba(11,16,32,.1); color: #475467; font-size: .55rem; font-weight: 650; }
.wx-starters { display: grid; gap: .3rem; margin-bottom: .6rem; }
.wx-starter { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .36rem .55rem; border-radius: 8px; background: #f5f5f1; border: 1px solid rgba(11,16,32,.14); color: #0b1020; font-size: .58rem; font-weight: 650; line-height: 1.3; }
.wx-starter b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-starter i { font-style: normal; color: #475467; flex: none; }
.wx.wx-t-dark .wx-starter { background: #10141f; border-color: rgba(255,255,255,.14); color: #f8fafc; }
.wx.wx-t-dark .wx-starter i { color: #cbd5e1; }
.wx.wx-c-soft .wx-starter { border-radius: 6px; }
.wx.wx-c-sharp .wx-starter { border-radius: 3px; }
.wx-start { display: block; padding: .5rem; border-radius: 9px; background: #0b1020; color: #fff; font-size: .66rem; font-weight: 700; text-align: center; }
.wx-foot { margin: 0; padding: .35rem; border-top: 1px solid rgba(11,16,32,.08); background: #fff; color: #98a2b3; font-size: .5rem; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.wx.wx-h-brand .wx-head { background: var(--wx-brand); }
.wx.wx-h-brand .wx-kicker { color: rgba(255,255,255,.82); }
.wx.wx-h-brand .wx-kicker i { background: #fff; }
.wx.wx-h-light .wx-head { background: #fff; color: #0b1020; border-bottom: 1px solid rgba(11,16,32,.08); }
.wx.wx-h-light .wx-kicker { color: #667085; }
.wx.wx-h-light .wx-text { color: #475467; }
.wx.wx-h-light .wx-close { background: rgba(11,16,32,.07); }
.wx.wx-h-light .wx-face { background: var(--wx-brand); color: #fff; }
.wx.wx-t-dark { background: #10141f; color: #f8fafc; }
.wx.wx-t-dark .wx-card { background: #171c29; }
.wx.wx-t-dark .wx-card p, .wx.wx-t-dark .wx-topics span { color: #98a2b3; }
.wx.wx-t-dark .wx-topics span { background: #10141f; border-color: rgba(255,255,255,.09); }
.wx.wx-t-dark .wx-start { background: var(--wx-brand); }
.wx.wx-t-dark .wx-foot { background: #171c29; border-top-color: rgba(255,255,255,.08); }
.wx.wx-c-soft { border-radius: 12px; }
.wx.wx-c-soft .wx-card { border-radius: 9px; }
.wx.wx-c-soft .wx-start { border-radius: 7px; }
.wx.wx-c-sharp { border-radius: 4px; }
.wx.wx-c-sharp .wx-card, .wx.wx-c-sharp .wx-start, .wx.wx-c-sharp .wx-topics span { border-radius: 3px; }
.wx.wx-f-rounded *, .wx.wx-f-rounded { font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", system-ui, sans-serif; }
.wx.wx-f-serif .wx-title, .wx.wx-f-serif .wx-card strong { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; letter-spacing: 0; }

.ba-stage .wx-launcher { position: absolute; z-index: 3; bottom: 1.1rem; display: flex; align-items: center; gap: .55rem; height: 3.1rem; padding: 0 .55rem 0 1rem; border-radius: 16px; background: #0b1020; color: #fff; box-shadow: 0 12px 26px rgba(11,16,32,.3); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.ba-stage .wx-launcher-right { right: 1rem; }
.ba-stage .wx-launcher-left { left: 1rem; }
.ba-stage .wx-launcher-icon { width: 3.1rem; padding: 0; justify-content: center; }
.ba-stage .wx-launcher-circle, .ba-stage .wx-launcher-pill { border-radius: 999px; }
.ba-stage .wx-launcher img { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; background: #fff; }
.ba-stage .wx-launcher .ba-ico { width: 1.4rem; height: 1.4rem; color: var(--wx-brand); }
/* Shown above the open chat window so the owner sees the bubble they wrote. */
.ba-stage .wx-teaser { position: absolute; z-index: 3; top: 3rem; max-width: 70%; margin: 0; padding: .55rem .75rem; border-radius: 12px; background: #fff; color: #0b1020; box-shadow: 0 10px 24px rgba(11,16,32,.2); font-size: .66rem; line-height: 1.4; }
.ba-stage .wx-teaser-right { right: 1rem; }
.ba-stage .wx-teaser-left { left: 1rem; }
.wx.wx-h-brand.wx-tone-light .wx-head { color: #0b1020; }
.wx.wx-h-brand.wx-tone-light .wx-kicker, .wx.wx-h-brand.wx-tone-light .wx-text { color: rgba(11,16,32,.72); }
.wx.wx-h-brand.wx-tone-light .wx-kicker i { background: #0b1020; }
.wx.wx-h-brand.wx-tone-light .wx-close { background: rgba(11,16,32,.12); }

/* Owner replies in /app Conversations ("hand-over to your team") */
.bc-msg-owner { background: color-mix(in srgb, var(--ba-brand) 12%, #fff) !important; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ba-brand) 35%, transparent) !important; }
.bc-msg-owner small { display: block; margin-bottom: .2rem; color: var(--ba-brand); font-size: .7rem; font-weight: 700; }
.bc-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: end; padding: .9rem 1rem; border-top: 1px solid var(--ba-line); }
.bc-reply textarea { resize: vertical; min-height: 2.75rem; }
.bc-paused { grid-column: 1 / -1; margin: 0; padding: .55rem .75rem; border-radius: var(--ba-radius-sm); background: var(--ba-amber-soft); color: var(--ba-ink); font-size: .85rem; }
.bc-reply-note { margin: 0; padding: .9rem 1rem; border-top: 1px solid var(--ba-line); }

/* ---------- Webuildora look for the /app frame ---------- */

html:not(.dark) .fi-panel-app.fi-body,
html:not(.dark) .fi-panel-app .fi-topbar,
html:not(.dark) .fi-panel-app .fi-topbar-ctn { background-color: var(--ba-canvas); }
html:not(.dark) .fi-panel-app .fi-topbar { box-shadow: 0 1px 0 rgba(12, 16, 32, .14); }
.fi-panel-app .fi-header-heading,
.fi-panel-app .bd h1, .fi-panel-app .bd h2 { color: var(--ba-ink); letter-spacing: -.03em; }
.bd-version { display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .25rem .55rem; border: 1px solid var(--ba-line); border-radius: 4px; color: var(--ba-ink-soft); font-family: var(--ba-mono); font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.bd-version b { color: var(--ba-brand-deep); font-weight: 700; }
.fi-sidebar-nav .bd-version { margin: 1.25rem .75rem 0; }

/* Referral card on the dashboard home */
.bd-refer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 1.5rem; padding: 1.25rem 1.5rem; border-radius: var(--ba-radius); background: var(--ba-mist); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ba-brand) 30%, transparent); }
.bd-refer p { margin: 0; max-width: 62ch; line-height: 1.5; color: var(--ba-ink-soft); }
.bd-refer strong { display: block; margin-bottom: .2rem; color: var(--ba-ink); font-size: 1.05rem; }

/* ---------- Billing, install code, test chat, My ads inside /app (.bcp) ----------
 * These pages keep their cp-* markup; here it takes the /app look. The --cb-* names
 * are what their own inline and pushed styles use. */

.bcp {
    --cb-bg: transparent; --cb-panel: var(--ba-paper); --cb-panel-2: var(--ba-mist);
    --cb-text: var(--ba-ink); --cb-muted: var(--ba-ink-soft);
    --cb-border: var(--ba-line); --cb-border-firm: color-mix(in srgb, var(--ba-ink) 28%, var(--ba-line));
    --cb-accent: var(--ba-brand); --cb-accent-dark: var(--ba-brand-deep); --cb-accent-soft: var(--ba-mist); --cb-accent-ink: var(--ba-brand-deep);
    --cb-danger: #b42318; --cb-danger-soft: #fdecea; --cb-warning: #8a5a00; --cb-warning-soft: #fdf3dc;
    --cb-success: #0f7a55; --cb-success-soft: #e2f4ec;
    --cb-shadow: none; --cb-shadow-lg: none; --cb-radius: var(--ba-radius);
    --cp-panel: var(--ba-paper); --cp-border: var(--ba-line); --cp-muted: var(--ba-ink-soft); --cp-text: var(--ba-ink); --cp-accent: var(--ba-brand);
    color: var(--ba-ink);
}
.dark .bcp { --cb-danger: #f3978d; --cb-danger-soft: #3a1714; --cb-warning: #e8b960; --cb-warning-soft: #2e2410; --cb-success: #6fd0a8; --cb-success-soft: #0f2c22; }
.bcp .fi-page-content { display: block; max-width: 1100px; }
.bcp h1, .bcp h2, .bcp h3 { margin: 0; color: var(--ba-ink); letter-spacing: -.02em; line-height: 1.2; }
.bcp a { color: inherit; }
.bcp code, .bcp .cp-code { font-family: var(--ba-mono); }

.bcp .cp-topbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem 1.25rem; margin: 0 0 1.75rem; }
.bcp .cp-title h1 { font-size: 1.875rem; font-weight: 800; letter-spacing: -.03em; }
.bcp .cp-title p { margin: .5rem 0 0; max-width: 70ch; color: var(--ba-ink-soft); line-height: 1.5; }
.bcp .cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

.bcp .cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.6rem; padding: .55rem 1.1rem; border: 2px solid var(--ba-line); border-radius: 6px; background: transparent; color: var(--ba-ink); font: inherit; font-weight: 700; font-size: .92rem; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.bcp .cp-btn:hover { background: var(--ba-mist); border-color: var(--ba-ink); }
.bcp .cp-btn-primary { border-color: #0c1020; background: var(--ba-coral); color: #0c1020; box-shadow: 3px 3px 0 #0c1020; }
.dark .bcp .cp-btn-primary { box-shadow: 3px 3px 0 rgba(0, 0, 0, .7); }
.bcp .cp-btn-primary:hover { background: #ff7357; border-color: #0c1020; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #0c1020; }
.bcp .cp-btn[disabled], .bcp .cp-btn.is-disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.bcp .cp-btn-sm { min-height: 2rem; padding: .3rem .75rem; font-size: .82rem; }

.bcp .cp-card, .bcp .cp-panel, .bcp .cp-form { margin: 0 0 1.25rem; padding: 1.5rem; border: 0; border-radius: var(--ba-radius-lg); background: var(--ba-paper); box-shadow: inset 0 0 0 1.5px var(--ba-line); }
.bcp .cp-card .cp-form { margin: 0; padding: 0; background: transparent; box-shadow: none; }
.bcp .cp-card h2 { font-size: 1.15rem; font-weight: 800; }
.bcp .cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0 0 1.25rem; }
.bcp .cp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bcp .cp-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.bcp .cp-stat { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem 1.25rem; border-radius: var(--ba-radius); background: var(--ba-mist); }
.bcp .cp-stat span { color: var(--ba-brand-deep); font-family: var(--ba-mono); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.bcp .cp-stat strong { color: var(--ba-ink); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bcp .cp-empty { padding: 1.75rem 1.25rem; border: 1.5px dashed var(--ba-line); border-radius: var(--ba-radius); color: var(--ba-ink-soft); text-align: center; }

.bcp .cp-field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; margin: 0 0 1rem; }
.bcp .cp-field > label { font-size: .85rem; font-weight: 700; color: var(--ba-ink); }
.bcp .cp-field small { color: var(--ba-ink-soft); font-size: .8rem; line-height: 1.5; }
.bcp .cp-input, .bcp .cp-select, .bcp .cp-textarea { width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--ba-line); border-radius: var(--ba-radius-sm); background: var(--ba-paper); color: var(--ba-ink); font: inherit; font-size: .95rem; }
.bcp .cp-input:focus, .bcp .cp-select:focus, .bcp .cp-textarea:focus { outline: none; border-color: var(--ba-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ba-brand) 20%, transparent); }
.bcp .cp-textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.bcp .cp-select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234d5159' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; }
.bcp .cp-input[type="color"] { height: 2.75rem; padding: .25rem; cursor: pointer; }
.bcp .cp-code { margin-top: .9rem; display: block; width: 100%; min-height: 92px; padding: .8rem .9rem; border: 0; border-radius: var(--ba-radius-sm); background: #0c1020; color: #e8ecef; font-size: .8rem; line-height: 1.6; white-space: pre-wrap; word-break: break-all; resize: vertical; }

.bcp .cp-table-wrap { overflow: auto; border-radius: var(--ba-radius); box-shadow: inset 0 0 0 1.5px var(--ba-line); }
.bcp .cp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bcp .cp-table th { padding: .7rem .9rem; border-bottom: 1.5px solid var(--ba-line); color: var(--ba-ink-soft); font-family: var(--ba-mono); font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.bcp .cp-table td { padding: .75rem .9rem; border-bottom: 1px solid var(--ba-line); vertical-align: top; }
.bcp .cp-table tbody tr:last-child td { border-bottom: 0; }

.bcp .cp-badge { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 4px; background: var(--cb-success-soft); color: var(--cb-success); font-family: var(--ba-mono); font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.bcp .cp-badge-off { background: var(--ba-mist); color: var(--ba-ink-soft); }
.bcp .cp-alert { margin: 0 0 1.25rem; padding: .9rem 1.1rem; border-radius: var(--ba-radius); background: var(--ba-mist); color: var(--ba-ink); line-height: 1.5; box-shadow: inset 3px 0 0 var(--ba-brand); }
.bcp .cp-alert-success { background: var(--cb-success-soft); color: var(--cb-success); box-shadow: inset 3px 0 0 var(--cb-success); }
.bcp .cp-alert-warning { background: var(--cb-warning-soft); color: var(--cb-warning); box-shadow: inset 3px 0 0 var(--cb-warning); }
.bcp .cp-alert-error { background: var(--cb-danger-soft); color: var(--cb-danger); box-shadow: inset 3px 0 0 var(--cb-danger); }
.bcp .cp-muted { color: var(--ba-ink-soft); }
.bcp .cp-text { color: var(--ba-ink); }
.bcp .cp-accent { color: var(--ba-brand); }
.bcp .cp-border { border-color: var(--ba-line) !important; }

/* Test chat */
.bcp .cp-chat-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.bcp .cp-chat-thread, .bcp .cp-chat-details { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--ba-radius-lg); background: var(--ba-paper); box-shadow: inset 0 0 0 1.5px var(--ba-line); }
.bcp .cp-chat-thread { min-height: 460px; }
.bcp .cp-chat-head, .bcp .cp-chat-details-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.1rem; border-bottom: 1.5px solid var(--ba-line); font-weight: 800; }
.bcp .cp-chat-messages { flex: 1; display: flex; flex-direction: column; gap: .75rem; max-height: 58vh; overflow-y: auto; padding: 1.1rem; }
.bcp .cp-chat-message { display: flex; flex-direction: column; gap: .25rem; max-width: 78%; }
.bcp .cp-chat-message.is-me { margin-left: auto; align-self: flex-end; align-items: flex-end; text-align: right; }
.bcp .cp-chat-message.is-me .cp-chat-bubble { text-align: left; }
.bcp .cp-chat-bubble { padding: .65rem .85rem; border-radius: 14px; background: var(--ba-mist); font-size: .92rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.bcp .cp-chat-message.is-me .cp-chat-bubble { background: var(--ba-brand); color: #fff; }
.bcp .cp-chat-messages { background: transparent; }
.bcp .cp-chat-time, .bcp .cp-chat-label { color: var(--ba-ink-soft); font-size: .72rem; }
.bcp .cp-chat-label { font-weight: 700; }
.bcp .cp-chat-composer { display: flex; align-items: flex-end; gap: .6rem; padding: .9rem 1.1rem; border-top: 1.5px solid var(--ba-line); }
.bcp .cp-chat-composer .cp-textarea { min-height: 54px; }
.bcp .cp-chat-empty { padding: 2.5rem 1.25rem; color: var(--ba-ink-soft); text-align: center; }
.bcp .cp-chat-inline-alert { margin: .75rem 1.1rem 0; }
.bcp .cp-chat-detail-row { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem 1.1rem; border-bottom: 1px solid var(--ba-line); font-size: .88rem; }
.bcp .cp-chat-detail-row:last-child { border-bottom: 0; }
.bcp .cp-chat-detail-row span:first-child { color: var(--ba-ink-soft); }

@media (max-width: 900px) { .bcp .cp-chat-shell { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
    .bcp .cp-grid { grid-template-columns: 1fr 1fr; }
    .bcp .cp-grid.cp-grid-3 { grid-template-columns: 1fr; }
    .bcp .cp-title h1 { font-size: 1.5rem; }
    .bcp .cp-card, .bcp .cp-form { padding: 1.15rem; }
}

/* Filament's own primary buttons in /app (sign in, sign up, password reset, confirm dialogs): the same coral button. */
.fi-panel-app .fi-btn.fi-color-primary:not(.fi-outlined) { border: 2px solid #0c1020; border-radius: 6px; background-color: var(--ba-coral); color: #0c1020; box-shadow: 3px 3px 0 #0c1020; font-weight: 800; }
.fi-panel-app .fi-btn.fi-color-primary:not(.fi-outlined):hover { background-color: #ff7357; color: #0c1020; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #0c1020; }
.dark .fi-panel-app .fi-btn.fi-color-primary:not(.fi-outlined), .fi-panel-app.dark .fi-btn.fi-color-primary:not(.fi-outlined) { box-shadow: 3px 3px 0 rgba(0, 0, 0, .7); }


/* Assistant customisation uses the same control and preview styles as the builder. */
.ca-page { padding: clamp(1rem, 2.8vw, 2rem); }
.ca-header { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.ca-header h2 { font-size: clamp(1.45rem, 4vw, 2rem); font-weight: 800; margin-top: .2rem; }
.ca-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.2rem; }
.ca-nav [aria-current] { background: var(--ba-ink, #10203b); color: #fff; }
.ca-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .76fr); gap: 1.4rem; align-items: start; }
.ca-panel { background: #fff; color: #18213a; border: 1px solid #dfe3eb; border-radius: 1rem; padding: clamp(1rem, 3vw, 1.6rem); min-width: 0; }
.ca-panel h3 { margin: 0 0 1rem; font-size: 1.2rem; font-weight: 750; }
.ca-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.ca-field { margin: 0; min-width: 0; }
.ca-check { display: flex; align-items: center; gap: .4rem; min-height: 1.65rem; }
.ca-check input { accent-color: #e76555; flex-shrink: 0; }
.ca-error, .ca-warning { grid-column: 1 / -1; font-size: .85rem; color: #8e2c1e; }
.ca-panel .ba-actions { flex-wrap: wrap; justify-content: flex-start; margin-top: 1rem; }
.ca-install { margin-top: 1.5rem; scroll-margin-top: 5rem; }
.ca-install textarea { display: block; width: 100%; margin: .75rem 0; padding: .75rem; border: 1px solid #dfe3eb; border-radius: .5rem; font-family: monospace; }
.ca-page .ba-preview { grid-column: auto; position: sticky; top: 5rem; align-self: start; min-width: 0; }
.ca-page .ba-preview .ba-phone { min-height: 470px; }
.ca-page .ba-field select { width: 100%; min-width: 0; border: 1px solid var(--ba-site-line); border-radius: .35rem; padding: .75rem; background: #f8f7f0; }
.ca-page .ba-field label { display: block; margin-bottom: .3rem; font-weight: 650; }
.ca-page .ca-field input[type="file"] { font-size: .8rem; padding: .45rem; }
.ca-page .ca-nav .ba-btn { min-height: 2.6rem; padding: .45rem .7rem; }
.ca-page .wx-launcher { background: var(--wx-launcher-bg); color: var(--wx-launcher-text); }
.ca-page .wx-sample { white-space: pre-line; }
.ba-chat-body .ba-msg { white-space: pre-line; }
.ca-page .wx-launcher .sb-icon { width: 1.35rem; height: 1.35rem; display: grid; place-items: center; }
.ca-page .wx { max-height: calc(100% - 7rem); }
.ca-page .wx-body { min-height: 0; overflow: auto; }
.ca-page .wx-sample { margin-top: .4rem; padding: .35rem .5rem; border: 1px solid currentColor; border-radius: .45rem; }
.ba-stage .wx-h-brand .wx-head, .ba-stage .wx-launcher { color: var(--wx-on-brand, white); }
.ba-stage .wx-h-brand .wx-head :is(.wx-title, .wx-kicker, .wx-text, .wx-close) { color: inherit; }
.ba-stage .wx-launcher-text { min-width: 0; padding: .45rem .75rem; border-radius: 99px; }
.ba-stage .wx-launcher .wb-launch-glyph { font-size: 1.15rem; }
.ba-stage .ba-preset-compact .wx-card { padding: .45rem; }
.ba-stage .ba-preset-rounded .wx { border-radius: 32px; }
.ba-stage .ba-preset-minimal .wx, .ba-stage .ba-preset-minimal .wx-card { box-shadow: none; border: 1px solid #b7bdca; }
.ca-page :is(.wx-side-left, .wx-launcher-left, .wx-teaser-left) { left: var(--wx-side); }
.ca-page :is(.wx-side-right, .wx-launcher-right, .wx-teaser-right) { right: var(--wx-side); }
.ca-page .wx-launcher { bottom: var(--wx-bottom); }
.ca-page .wx { bottom: calc(var(--wx-bottom) + 3.75rem); }
.ca-page .wx-teaser { bottom: calc(var(--wx-bottom) + 3.1rem); }
@media (prefers-color-scheme: dark) {
    .ba-stage .wx-t-auto { background: #0d1422; color: #edf0f6; }
    .ba-stage .wx-t-auto .wx-card { background: #171f30; color: #edf0f6; border-color: #323f54; }
    .ba-stage .wx-t-auto :is(.wx-card p, .wx-foot, .wx-starter) { color: #d6e0ef; }
}
@media (max-width: 900px) {
    .ca-layout { grid-template-columns: minmax(0, 1fr); }
    .ca-page .ba-preview { position: static; }
}
@media (max-width: 600px) {
    .ca-fields { grid-template-columns: minmax(0, 1fr); }
    .ca-page .ba-preview [data-preview-mobile="sheet"] .wx { inset: 2.3rem 0 0; width: 100%; max-height: none; border-radius: 0; }
    .ca-page .ba-preview [data-preview-mobile="sheet"] .wx-launcher { display: none; }
    .ca-page .ba-preview [data-preview-mobile="sheet"] .wx-teaser { z-index: 3; }
    .ca-page .ba-preview [data-preview-mobile="hidden"] :is(.wx, .wx-launcher, .wx-teaser) { display: none; }
}

.ca-details { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0 0 1rem; font-size: .82rem; }
.ca-details div { display: flex; gap: .4rem; }
.ca-details dt { color: var(--ba-ink-soft); }
.ca-details dd { margin: 0; font-weight: 750; }
