:root {
    --bg: #101018;
    --panel: #1b1b25;
    --panel-2: #262637;
    --panel-3: #11111a;
    --border: #36364a;
    --text: #f4f4f7;
    --muted: #aaaaba;
    --accent: #8dd6ff;
    --bc-left-rail-width: 23rem;
    --bc-right-rail-width: 21rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: rgba(18, 18, 28, 0.96);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 50;
}

.site-header-leading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.site-header-leading .bc-file-menu--header + .bc-file-menu--header {
    margin-left: 0.15rem;
}

.bc-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    flex-shrink: 0;
}

.site-header-leading .bc-menu-bar-trigger {
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: var(--text);
    min-height: 2rem;
    padding: 0.3rem 0.55rem;
    font: inherit;
    cursor: pointer;
    box-shadow: none;
}

.site-header-leading .bc-menu-bar-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.site-header-leading .bc-menu-bar-trigger[aria-expanded='true'] {
    background: rgba(255, 255, 255, 0.12);
}

.site-header-leading .bc-menu-bar-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.site-header-leading .bc-header-tool-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.site-header-leading .bc-header-tool-btn {
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.site-header-leading .bc-header-tool-btn:hover:not(:disabled) {
    background: #32324a;
}

.site-header-leading .bc-header-tool-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.brand {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-nav a,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24rem;
    gap: 1rem;
    padding: 1rem;
}

.panel,
.card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    padding: 1rem;
}

.lede,
.status {
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(16rem, 1fr));
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    color: var(--muted);
}

input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #101019;
    color: var(--text);
    font: inherit;
    padding: 0.65rem;
}

.queue {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.2rem;
    color: var(--muted);
}

.document-page {
    padding: 1rem;
}

.document-page > .panel {
    max-width: 72rem;
}

.landing-page {
    min-height: calc(100vh - 62px);
    display: grid;
    align-items: start;
    padding: 6rem 2rem 2rem;
}

.landing-hero {
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: 1.75rem;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--accent);
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.landing-hero h1 {
    margin: 0 0 0.85rem;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.mockup-hero {
    background:
        radial-gradient(circle at top left, rgba(141, 214, 255, 0.12), transparent 28rem),
        var(--panel);
}

.version-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(16rem, 1fr));
    gap: 1rem;
    margin-top: 1.6rem;
}

.mockups-version-stack {
    grid-template-columns: 1fr;
    max-width: 44rem;
}

.version-card {
    display: grid;
    gap: 0.5rem;
    min-height: 8.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #11111a;
    color: var(--text);
    text-decoration: none;
}

.version-card:hover,
.version-card:focus {
    border-color: var(--accent);
    outline: none;
}

.version-card.primary-card {
    border-color: var(--accent);
    background: rgba(141, 214, 255, 0.12);
}

.version-card span {
    color: #d7d7e7;
}

.version-card strong {
    color: var(--accent);
    font-size: 1.25rem;
}

.version-card small {
    color: #d7d7e7;
    font-size: 0.92rem;
    line-height: 1.35;
}

code {
    padding: 0.1rem 0.28rem;
    border-radius: 6px;
    background: var(--panel-3);
    color: #d7ecff;
}

pre {
    max-height: 70vh;
    overflow: auto;
    padding: 1rem;
    border-radius: 12px;
    background: #0b0b12;
    color: #bfdbfe;
}

.mockup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.mockup-card {
    display: grid;
    gap: 0.75rem;
    min-height: 9rem;
    padding: 1.25rem;
    border: 1px solid #565674;
    border-radius: 20px;
    background: linear-gradient(145deg, #2b2b3d, #20202e);
    color: var(--text);
    text-decoration: none;
}

.mockup-card:focus,
.mockup-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(141, 214, 255, 0.15);
    outline: none;
}

.mockup-card strong {
    color: #ffffff;
    font-size: 1.05rem;
}

.mockup-card span {
    color: #d7d7e7;
    line-height: 1.45;
}

.bc-shell {
    display: grid;
    grid-template-columns: var(--bc-left-rail-width) 0.4rem minmax(32rem, 1fr) 0.4rem var(--bc-right-rail-width);
    gap: 0;
    height: calc(100vh - 62px);
    min-width: 76rem;
    overflow: hidden;
    background: #2e2e33;
    color: #f7f7f8;
}

.bc-rail-resizer {
    position: relative;
    z-index: 2;
    cursor: col-resize;
    background: #3f4046;
}

.bc-rail-resizer::before {
    content: "";
    position: absolute;
    inset: 0.5rem 0.13rem;
    border-radius: 999px;
    background: rgba(141, 214, 255, 0.2);
    opacity: 0;
    transition: opacity 120ms ease;
}

.bc-rail-resizer:hover::before,
.bc-rail-resizer.active::before {
    opacity: 1;
}

.bc-rail {
    min-width: 0;
    overflow: auto;
    border-right: 1px solid #55565d;
    background: #56575d;
}

.bc-left-rail {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.bc-left-rail > .bc-tabbar {
    flex-shrink: 0;
}

.bc-left-rail > .bc-tab-panel:not([hidden]) {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
}

.bc-left-rail > .bc-panel-ai.bc-tab-panel:not([hidden]) {
    overflow: hidden;
}

.bc-right-rail {
    border-right: 0;
    border-left: 1px solid #55565d;
}

.bc-right-rail.bc-right-rail-split {
    overflow: hidden;
}

.bc-right-rail-split {
    --bc-right-split-top: 32vh;
    display: grid;
    grid-template-rows: minmax(8rem, var(--bc-right-split-top)) 6px minmax(0, 1fr);
    overflow: hidden;
    padding: 0;
}

.bc-right-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bc-right-panel-top {
    border-bottom: 0;
}

.bc-right-panel-bottom {
    border-bottom: 0;
}

.bc-right-top-body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.65rem 0.75rem;
}

.bc-right-rail-split .bc-tab-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
}

.bc-right-rail-split .bc-tab-panel[hidden],
.bc-left-rail .bc-tab-panel[hidden] {
    display: none !important;
}

.bc-right-tab-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0.65rem 0.75rem;
}

.bc-right-top-body .bc-right-tab-body {
    flex: 0 0 auto;
    overflow: visible;
    padding: 0;
    min-height: min-content;
}

.bc-rail-resizer--row {
    cursor: row-resize;
    min-height: 6px;
    height: 6px;
    background: #3f4046;
    border: 0;
    border-top: 1px solid #55565d;
    border-bottom: 1px solid #55565d;
}

.bc-rail-resizer--row::before {
    inset: 0.15rem 1.25rem;
}

.bc-rail-resizer--row:hover::before,
.bc-rail-resizer--row.active::before {
    opacity: 1;
}

.bc-right-tab-body h1 {
    margin-top: 0;
}

.bc-info-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #e8e8ec;
}

.bc-info-active-job-wrap:empty {
    display: none;
}

.bc-info-section-title {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c8c8d4;
}

.bc-info-headline {
    margin: 0.15rem 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: #dfe0e8;
}

.bc-info-active-job-idline {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    color: #d0d0dc;
}

.bc-info-active-job-idline code {
    font-size: 0.82rem;
}

.bc-info-active-job-body {
    margin: 0.35rem 0 0;
    color: #c8c8d4;
}

.bc-info-active-job-error {
    margin: 0.5rem 0 0;
    padding: 0.5rem;
    max-height: 10rem;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.35;
    background: rgba(40, 20, 20, 0.5);
    border: 1px solid #6b3a3a;
    border-radius: 6px;
    color: #f0c0c0;
}

.bc-info-active-job-meta {
    margin-top: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid #4a4a58;
}

.bc-info-active-job-meta p {
    margin: 0.25rem 0;
}

.bc-info-label {
    display: inline-block;
    min-width: 5.5rem;
    margin-right: 0.35rem;
    color: #a8a8b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bc-message-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bc-message-row {
    margin-bottom: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #5a5b62;
    border-radius: 8px;
    background: rgba(15, 15, 22, 0.55);
}

.bc-message-row--success {
    border-color: #3d6b55;
}

.bc-message-row--error {
    border-color: #8b3a3a;
}

.bc-message-row--warning {
    border-color: #8b6b2a;
}

.bc-message-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.bc-message-level {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b8b8c8;
}

.bc-message-dismiss {
    border: none;
    background: transparent;
    color: #d0d0d8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.bc-message-dismiss:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.bc-message-title {
    display: block;
    margin: 0.15rem 0;
    color: #f7f7f8;
    font-size: 0.95rem;
}

.bc-message-body {
    margin: 0.25rem 0 0.35rem;
    color: #d4d4dc;
    font-size: 0.82rem;
    white-space: pre-wrap;
}

.bc-message-time {
    font-size: 0.72rem;
    color: #9a9aa8;
}

.bc-runner-log-hint {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
}

.bc-runner-log-actions {
    margin-bottom: 0.45rem;
}

.bc-runner-log-open {
    font-size: 0.85rem;
    color: #8dd6ff;
}

.bc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.55);
}

.bc-modal-backdrop[hidden] {
    display: none !important;
}

.bc-modal-dialog {
    position: relative;
    width: min(32rem, 100%);
    max-height: min(80vh, 36rem);
    overflow: auto;
    padding: 1.25rem 1.35rem 1rem;
    border-radius: 14px;
    border: 1px solid #686970;
    background: #2a2b32;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.bc-modal-dialog[data-level='error'] {
    border-color: #a85a5a;
}

.bc-modal-dialog[data-level='success'] {
    border-color: #4a8b6a;
}

.bc-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: none;
    background: transparent;
    color: #e8e8ec;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
}

.bc-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bc-modal-title {
    margin: 0 2rem 0.75rem 0;
    font-size: 1.15rem;
    color: #fff;
}

.bc-modal-body {
    color: #d8d8e0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.bc-modal-body .bc-preview-modal-image {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #4a4b55;
    margin-bottom: 0.75rem;
}

.bc-modal-open-tab,
.bc-modal-body .bc-modal-open-tab {
    display: inline-block;
    margin-top: 0.35rem;
    color: #8dd6ff;
    font-size: 0.88rem;
}

.bc-modal-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bc-linkish {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #8dd6ff;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bc-linkish:hover {
    color: #b8e6ff;
}

.artifact-row-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.45rem;
}

.artifact-row-wrap strong {
    min-width: 6rem;
}

.artifact-inline-preview,
.artifact-open-tab {
    font-size: 0.85rem;
}

.bc-tree-kind-chip {
    flex: 0 0 auto;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9a9aa8;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #5a5b66;
}

.bc-tree-label-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-tree-surface {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.bc-tree-surface--project {
    border: 1px solid #5a5b62;
    border-left: 4px solid #8dd6ff;
    border-radius: 6px;
    background: #3a3d52;
}

.bc-tree-surface--project:hover {
    border-color: #8dd6ff;
}

.bc-tree-surface--scene {
    border: 1px solid rgba(141, 214, 255, 0.22);
    border-left: 4px solid #6ab8e0;
    border-radius: 4px;
    background: rgba(141, 214, 255, 0.06);
}

.bc-tree-surface--scene:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

.bc-tree-surface--shot {
    border: 1px solid rgba(245, 182, 66, 0.22);
    border-left: 4px solid #c9a24a;
    border-radius: 4px;
    background: rgba(245, 182, 66, 0.07);
}

.bc-tree-surface--shot:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.bc-tree-surface--selected {
    outline: 2px solid rgba(141, 214, 255, 0.95);
    outline-offset: 1px;
    box-shadow: inset 0 0 0 1px rgba(141, 214, 255, 0.35);
}

button.bc-tree-project-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0.35rem 0.25rem 0.35rem 0.4rem;
    text-align: left;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #f7f7f8;
    background: transparent;
    border: none;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    box-shadow: none;
}

button.bc-tree-project-title:hover {
    background: rgba(255, 255, 255, 0.04);
}

.bc-tree-scene-btn,
.bc-tree-shot-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0.32rem 0.2rem 0.32rem 0.35rem;
    text-align: left;
    font: inherit;
    font-weight: 600;
    color: #e8e8ec;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    box-shadow: none;
}

.bc-tree-shot-btn {
    font-weight: 500;
    color: #d0d0d8;
}

.bc-tree-scene-btn:hover,
.bc-tree-shot-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

#runner-log-open-link[hidden] {
    display: none !important;
}

.bc-tabbar,
.document-tabs {
    display: flex;
    gap: 0.2rem;
    padding: 0.45rem;
    background: #45464c;
    border-bottom: 1px solid #686970;
}

.bc-center-tabs {
    display: flex;
    align-items: center;
}

.bc-tab,
.document-tab {
    min-height: 2rem;
    border-color: #6d6e75;
    border-radius: 4px;
    background: #4e4f55;
    color: #f7f7f8;
}

.bc-tab.active,
.document-tab.active {
    border-color: #f2f2f4;
    background: #777982;
}

.bc-tab:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.bc-tab-panel {
    padding: 0.9rem;
}

.bc-tab-panel h1 {
    margin-top: 0;
    color: #ffffff;
    font-size: 1.2rem;
}

.bc-toolbar-status {
    margin: 0;
    padding: 0 0.6rem 0.45rem;
    font-size: 0.82rem;
    line-height: 1.35;
    max-width: 52rem;
}

.bc-render-library {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #686970;
}

.bc-render-library-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #f0f0f4;
}

.bc-render-library-list {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    list-style: disc;
    color: #d8d8e0;
    font-size: 0.88rem;
}

.bc-render-library-item {
    margin: 0.35rem 0;
    line-height: 1.35;
}

.bc-render-library-meta {
    display: block;
    font-size: 0.78rem;
    color: #a8a8b8;
}

.bc-storage-pill {
    display: inline-block;
    margin: 0.15rem 0.35rem 0 0;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: #3a4a58;
    border: 1px solid #5a6b7a;
    color: #cfe8ff;
}

.bc-render-library-links a {
    color: #8dd6ff;
}

.bc-file-menu {
    position: relative;
    margin-bottom: 0.65rem;
}

.bc-file-menu--header {
    margin-bottom: 0;
}

.bc-file-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    min-width: 14rem;
    padding: 0.35rem 0;
    border: 1px solid #686970;
    border-radius: 8px;
    background: #3a3b42;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 30;
}

.bc-file-dropdown-label {
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c4c4ce;
}

.bc-open-project-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 0.35rem 0.35rem;
}

.bc-open-project-list button {
    width: 100%;
    justify-content: flex-start;
    border-radius: 6px;
}

.bc-render-menu-item {
    display: flex;
    width: calc(100% - 0.7rem);
    margin: 0.15rem 0.35rem;
    padding: 0.45rem 0.6rem;
    justify-content: flex-start;
    text-align: left;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #f4f4f7;
    font: inherit;
    cursor: pointer;
}

.bc-render-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #6d6e75;
}

.bc-render-menu-hint {
    margin: 0 0.75rem 0.45rem;
    padding: 0 0.35rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #a8a8b8;
}

.bc-project-tree {
    margin-top: 0.5rem;
    font-size: 0.92rem;
}

.bc-tree-project {
    margin-bottom: 1rem;
}

.bc-tree-project--selected {
    padding: 0.35rem 0.4rem 0.5rem;
    border-radius: 10px;
    outline: 2px solid rgba(141, 214, 255, 0.92);
    outline-offset: 1px;
    background: rgba(141, 214, 255, 0.08);
}

.bc-tree-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.bc-tree-row--project {
    margin-bottom: 0.35rem;
}

.bc-tree-disclosure {
    flex: 0 0 auto;
    align-self: center;
    margin: 0 0.28rem 0 0;
    padding: 0.1rem 0.12rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(232, 232, 240, 0.72);
    font-size: 0.52rem;
    line-height: 1;
    cursor: pointer;
    font: inherit;
}

.bc-tree-disclosure:hover {
    color: #f4f4f8;
    background: transparent;
}

.bc-tree-disclosure:focus-visible {
    outline: 2px solid rgba(141, 214, 255, 0.85);
    outline-offset: 1px;
}

.bc-tree-disclosure-icon {
    display: block;
    transition: transform 0.15s ease;
}

.bc-tree-disclosure[aria-expanded="false"] .bc-tree-disclosure-icon {
    transform: rotate(-90deg);
}

.bc-tree-children--project {
    padding-left: 0.1rem;
}

.bc-tree-scene-block {
    margin-bottom: 0.4rem;
}

.bc-tree-shot-block {
    margin-bottom: 0.3rem;
}

.bc-tree-children--scene {
    padding-left: 0.35rem;
}

.bc-tree-children--shot {
    padding-left: 0.35rem;
}

.bc-tree-project-title {
    font-size: 1rem;
    color: #f7f7f8;
}

.bc-tree-scene {
    margin: 0.5rem 0 0.25rem 0.5rem;
    color: #e8e8ec;
    font-weight: 600;
}

.bc-tree-shot {
    margin: 0.35rem 0 0.15rem 1rem;
    color: #d0d0d8;
}

.bc-tree-render {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0.18rem 0;
    padding: 0.35rem 0.5rem 0.35rem 0.4rem;
    text-align: left;
    border-radius: 4px;
    background: rgba(154, 230, 180, 0.22);
    border: 1px solid rgba(154, 230, 180, 0.42);
    border-left: 4px solid #9ae6b4;
    color: #f0f0f4;
    cursor: pointer;
    font: inherit;
}

.bc-tree-render:hover {
    background: rgba(154, 230, 180, 0.34);
    border-color: rgba(154, 230, 180, 0.58);
}

.bc-tree-render.bc-tree-render--selected {
    outline: 2px solid rgba(141, 214, 255, 0.95);
    outline-offset: 1px;
    box-shadow: inset 0 0 0 1px rgba(154, 230, 180, 0.55);
}

.job-row-caption {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: #b8b8c4;
    line-height: 1.25;
}

.bc-panel-ai {
    padding: 0.55rem 0.65rem 0.65rem;
    gap: 0.5rem;
}

.bc-ai-thread {
    flex: 1;
    min-height: 6rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.35rem 0.15rem;
    border: 1px solid #4a4b52;
    border-radius: 6px;
    background: #4a4b52;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bc-ai-thread-empty {
    margin: 0.35rem 0.25rem;
    font-size: 0.85rem;
}

.bc-ai-thread-empty[hidden] {
    display: none !important;
}

.bc-ai-msg {
    max-width: 94%;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    font-size: 0.86rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.bc-ai-inline-action {
    align-self: flex-start;
    margin: 0.35rem 0 0;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    font-size: 0.75rem;
}

.bc-ai-inline-action:hover,
.bc-ai-inline-action:focus-visible {
    border-color: var(--accent);
}

.bc-ai-msg--user {
    align-self: flex-end;
    margin-left: 1.5rem;
    background: #3d4a5c;
    border: 1px solid #5a6b80;
    color: #eef4fc;
}

.bc-ai-msg--assistant {
    align-self: flex-start;
    margin-right: 1.5rem;
    background: #3a3b42;
    border: 1px solid #5c5d66;
    color: #e8e8ee;
}

.bc-ai-composer-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bc-ai-composer-hint {
    margin: 0;
    font-size: 0.75rem;
}

#bc-ai-composer {
    width: 100%;
    margin: 0;
    padding: 0.5rem;
    border: 1px solid #686970;
    border-radius: 8px;
    background: #2a2b32;
    color: #f4f4f7;
    font: inherit;
    resize: vertical;
    min-height: 4.5rem;
}

#bc-ai-send {
    align-self: flex-start;
}

.bc-ai-status-line:empty {
    display: none;
}

/* AI Mode Switcher Bar */
.bc-ai-mode-bar {
    display: flex;
    gap: 0.5rem;
    margin: 0.25rem 0;
    padding: 0.35rem;
    background: #2a2b32;
    border: 1px solid #4a4b52;
    border-radius: 8px;
}

.bc-ai-mode-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #aaaaba;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-ai-mode-btn:hover {
    color: #f4f4f7;
    background: #3a3b42;
}

.bc-ai-mode-btn.active {
    background: #3d4a5c;
    border-color: #5a7a9a;
    color: #8dd6ff;
    box-shadow: 0 1px 3px rgba(141, 214, 255, 0.15);
}

.bc-ai-handler-build-banner {
    margin: 0.35rem 0 0.25rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #c8e7ff;
    background: #243044;
    border: 1px solid #4a6a8a;
    border-radius: 6px;
}

.bc-ai-handler-build-banner[hidden] {
    display: none !important;
}

.bc-aix-gates-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
    align-items: center;
}

.bc-aix-gate-pill {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid #555;
    color: #ccc;
    background: #2a2c34;
}

.bc-aix-gate-pill--ok {
    border-color: #3a7a4a;
    color: #b8f0c8;
    background: #243428;
}

.bc-aix-gate-pill--fail {
    border-color: #8a4a3a;
    color: #ffc8b8;
    background: #342824;
}

.bc-aix-evidence-hint {
    font-size: 0.75rem;
    color: #a8a8b8;
    margin-top: 0.25rem;
}

.bc-aix-match-hint {
    font-size: 0.72rem;
    margin: 0.35rem 0 0;
    line-height: 1.35;
    color: var(--muted, #a8a8b8);
}

.bc-aix-match-hint code {
    font-size: 0.85em;
}

.bc-aix-last-failure {
    font-size: 0.72rem;
    color: #ffb090;
    margin: 0.25rem 0 0;
    line-height: 1.35;
}

.bc-aix-autofix-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.4rem 0 0;
}

.bc-muted,
.bc-status {
    color: #f0f0f4;
}

.bc-runner-hint {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #b8b8c8;
}

.bc-runner-hint[hidden] {
    display: none !important;
}

.bc-info-queue-note {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
}

.bc-workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #202126;
}

.bc-workspace-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.bc-preview-frame {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 1rem;
    background:
        linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
    background-color: #202126;
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.bc-preview-frame[hidden] {
    display: none !important;
}

.bc-desktop-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #111118;
}

.bc-desktop-panel[hidden] {
    display: none !important;
}

.bc-desktop-frame {
    flex: 1;
    min-height: 0;
    width: 100%;
}

.bc-desktop-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.render-preview-card {
    width: min(860px, 94%);
    min-height: 640px;
    padding: 3rem;
    background: #111118;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
}

.render-preview-card--preview-only {
    min-height: min(560px, 70vh);
    padding: 1.5rem 1.75rem 2rem;
}

.render-preview-card--preview-only .preview-stage {
    margin-top: 0;
}

.bc-kicker {
    margin: 0 0 0.5rem;
    color: #f5b642;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.render-preview-card h2 {
    margin: 0 0 0.5rem;
    color: #f7d26a;
    font-size: clamp(2.2rem, 7vw, 5rem);
    line-height: 0.95;
}

.preview-stage {
    display: grid;
    place-items: center;
    min-height: 26rem;
    margin-top: 1.5rem;
    border: 1px solid #34344a;
    background: #202126;
    color: #cfcfd7;
    overflow: hidden;
}

.preview-stage.bc-centre-preview--idle > span {
    max-width: 28rem;
    padding: 0 1rem;
    line-height: 1.45;
    text-align: center;
}

.preview-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-stage.queued,
.preview-stage.running {
    background:
        radial-gradient(circle at center, rgba(245, 182, 66, 0.16), transparent 18rem),
        #202126;
}

.preview-stage.failed {
    background:
        radial-gradient(circle at center, rgba(255, 138, 138, 0.16), transparent 18rem),
        #202126;
}

.job-list,
.artifact-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
}

.job-row,
.artifact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    min-height: 3.2rem;
    padding: 0.55rem;
    border: 1px solid #686970;
    border-radius: 6px;
    background: #4b4c52;
    color: #f7f7f8;
    text-align: left;
    text-decoration: none;
}

.job-row.selected {
    border-color: #f5b642;
}

.job-row strong,
.artifact-row strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-row small,
.artifact-row span {
    display: block;
    color: #d8d8dd;
    font-size: 0.78rem;
}

.status-pill {
    padding: 0.2rem 0.45rem;
    border: 1px solid #6d6e75;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.75rem;
    font-style: normal;
}

.status-pill.done {
    color: #8ef2c2;
}

.status-pill.failed {
    color: #ff8a8a;
}

.status-pill.running,
.status-pill.queued {
    color: #ffd166;
}

.runner-log {
    min-height: 15rem;
    max-height: 38vh;
    margin-top: 1rem;
    white-space: pre-wrap;
}

@media (max-width: 900px) {
    .app-shell,
    .grid {
        grid-template-columns: 1fr;
    }

    .landing-page {
        padding: 1rem;
    }
}

@media (max-width: 700px) {
    .version-grid {
        grid-template-columns: 1fr;
    }
}

/* AIx Panel Styles */
.bc-aix-content {
    padding: 1rem;
    font-size: 0.9rem;
}

.bc-aix-section {
    margin-bottom: 1.25rem;
}

.bc-aix-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bc-aix-emergency {
    border: 1px solid #c95d5d;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: rgba(201, 93, 93, 0.1);
}

.bc-aix-emergency-details {
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--panel-2);
}

.bc-aix-emergency-details > summary {
    cursor: pointer;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    list-style-position: outside;
}

.bc-aix-emergency-details > summary::-webkit-details-marker {
    color: var(--muted);
}

.bc-aix-emergency-details[open] {
    border-color: #a86060;
    background: rgba(201, 93, 93, 0.06);
}

.bc-aix-emergency-details .bc-aix-emergency {
    margin: 0 0.75rem 0.75rem;
}

.bc-aix-btn {
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 0.35rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-aix-btn:hover {
    background: var(--panel-3);
    border-color: var(--accent);
}

.bc-aix-btn--danger {
    background: #c95d5d;
    border-color: #c95d5d;
    color: #fff;
    font-weight: 600;
    width: 100%;
}

.bc-aix-btn--danger:hover {
    background: #b54545;
    border-color: #b54545;
}

.bc-aix-btn--small {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
}

.bc-aix-btn--approve {
    background: #5d9b5d;
    border-color: #5d9b5d;
    color: #fff;
}

.bc-aix-btn--approve:hover {
    background: #4a8a4a;
    border-color: #4a8a4a;
}

.bc-aix-btn--disable {
    background: #a07050;
    border-color: #a07050;
    color: #fff;
}

.bc-aix-btn--disable:hover {
    background: #8a6040;
    border-color: #8a6040;
}

.bc-aix-hint {
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0.5rem 0 0 0;
}

.bc-aix-status {
    padding: 0.5rem 0.75rem;
    border-radius: 0.35rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.bc-aix-status:empty {
    display: none;
    padding: 0;
    margin: 0;
}

.bc-aix-status--success {
    background: rgba(93, 155, 93, 0.2);
    border: 1px solid #5d9b5d;
    color: #8fd68f;
}

.bc-aix-status--error {
    background: rgba(201, 93, 93, 0.2);
    border: 1px solid #c95d5d;
    color: #ff9f9f;
}

.bc-aix-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bc-aix-empty {
    color: var(--muted);
    font-size: 0.8rem;
    font-style: italic;
    margin: 0;
}

.bc-aix-error {
    color: #ff9f9f;
    font-size: 0.8rem;
    margin: 0;
}

.bc-aix-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    background: var(--panel-2);
}

.bc-aix-item--pending {
    border-left: 3px solid #d4a04a;
}

/* Manifest-registered (not “live job”); keep accent muted vs pending gold. */
.bc-aix-item--active {
    border-left: 3px solid #6b7f94;
}

.bc-aix-post-approve-section {
    margin-top: 0.25rem;
}

.bc-aix-post-approve-slot {
    min-height: 0;
}

.bc-aix-post-approve-card {
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.35rem;
    background: var(--panel-2);
}

.bc-aix-post-approve-copy {
    margin: 0.35rem 0 0.45rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--muted);
}

.bc-aix-item-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    gap: 0.12rem;
}

/* Title + status on one row when space allows (avoids checkbox orphan line from width:100% info). */
.bc-aix-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.bc-aix-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.bc-aix-status-badge {
    font-size: 0.65rem;
    text-transform: capitalize;
    color: var(--muted);
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.1rem 0.35rem;
    align-self: flex-start;
}

.bc-aix-file {
    font-size: 0.7rem;
    color: var(--muted);
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bc-aix-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex-basis: 100%;
    width: 100%;
}

.bc-aix-btn--small {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-width: 3.5rem;
}

.bc-aix-btn--backup {
    background: #5a7a9a;
    border-color: #5a7a9a;
    color: #fff;
}

.bc-aix-btn--backup:hover {
    background: #4a6a8a;
    border-color: #4a6a8a;
}

.bc-aix-btn--test {
    background: #d4a04a;
    border-color: #d4a04a;
    color: #000;
}

.bc-aix-btn--test:hover {
    background: #c4903a;
    border-color: #c4903a;
}

.bc-aix-test-results {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 0.75rem;
}

.bc-aix-test-results pre {
    font-family: monospace;
    font-size: 0.8rem;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 15rem;
    overflow: auto;
}

.bc-aix-item-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.45rem;
    width: 100%;
}

/* Global `input { width: 100% }` stretches checkboxes; keep AIx controls native-sized. */
.bc-aix-content input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.bc-aix-content input.bc-aix-checkbox[type="checkbox"] {
    margin-top: 0.12rem;
}

.bc-aix-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
    width: fit-content;
    max-width: 100%;
}

.bc-aix-name-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.25;
    color: var(--accent, #7eb8ff);
    cursor: pointer;
    text-align: left;
}

.bc-aix-name-btn:hover {
    text-decoration: underline;
}

.bc-aix-item--disabled {
    border-left: 3px solid #888;
}

.bc-aix-batch-bar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.45rem 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    background: var(--panel-2);
}

.bc-aix-batch-summary {
    font-size: 0.78rem;
}

.bc-aix-batch-mixed {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #e0b060;
}

.bc-aix-batch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bc-aix-details-slot {
    width: 100%;
}

.bc-aix-details {
    margin-top: 0.25rem;
    padding: 0.5rem 0.55rem;
    border-radius: 0.3rem;
    background: var(--panel-1, #1a1d24);
    border: 1px solid var(--border);
    font-size: 0.78rem;
}

.bc-aix-details-description {
    margin: 0 0 0.35rem;
    word-break: break-word;
}

.bc-aix-details-meta {
    color: var(--muted);
    margin-bottom: 0.35rem;
    word-break: break-word;
}

.bc-aix-example-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bc-aix-example-chip {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: inherit;
    cursor: pointer;
    max-width: 100%;
    word-break: break-word;
}

.bc-aix-example-chip:hover:not(:disabled) {
    border-color: var(--accent, #7eb8ff);
}

.bc-aix-example-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bc-aix-details-modal .bc-aix-details-label {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.72rem;
}

.bc-aix-details-path {
    word-break: break-word;
    font-size: 0.72rem;
}

.bc-aix-danger-zone {
    margin-top: 0.75rem;
    font-size: 0.72rem;
}

/* Simple Handlers List (lower-right Handlers tab) */
.bc-handlers-catalogue-heading {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    cursor: help;
    text-decoration: underline dotted var(--muted, #888);
    text-underline-offset: 0.15em;
}

.bc-handlers-catalogue-heading::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    top: calc(100% + 0.35rem);
    z-index: 50;
    width: min(17.5rem, calc(100vw - 2rem));
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    background: var(--panel-2, #1e2229);
    color: var(--text, #e8e8ec);
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}

.bc-handlers-catalogue-heading:hover::after,
.bc-handlers-catalogue-heading:focus-visible::after {
    visibility: visible;
    opacity: 1;
}

.bc-handlers-simple-content {
    padding: 0.75rem;
    overflow: visible;
}

.bc-handlers-catalogue-status {
    font-size: 0.72rem;
    margin: 0 0 0.35rem;
    min-height: 0;
}

.bc-handlers-catalogue-status:empty {
    display: none;
}

.bc-handlers-catalogue-status--success {
    color: #8fd68f;
}

.bc-handlers-catalogue-status--error {
    color: #ff9f9f;
}

.bc-handlers-catalogue-batch-bar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.45rem 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    background: var(--panel-2);
}

.bc-handlers-catalogue-batch-summary {
    font-size: 0.78rem;
}

.bc-handlers-catalogue-batch-mixed {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: #e0b060;
}

.bc-handlers-catalogue-batch-hint {
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0.15rem 0 0;
}

.bc-handlers-catalogue-batch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bc-handlers-simple-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bc-handlers-catalogue-acc {
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    background: var(--panel-2);
    border-left: 3px solid #5d9b5d;
    max-width: 100%;
    box-sizing: border-box;
}

.bc-handlers-catalogue-acc--disabled {
    border-left-color: #888;
    opacity: 0.95;
}

.bc-handlers-catalogue-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
    cursor: pointer;
    list-style: none;
    padding: 0.4rem 0.5rem;
}

.bc-handlers-catalogue-summary::-webkit-details-marker {
    display: none;
}

.bc-handlers-catalogue-summary-main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.bc-handlers-catalogue-select-wrap {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.bc-handlers-catalogue-body {
    padding: 0 0.55rem 0.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bc-handlers-catalogue-description {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
}

.bc-handlers-catalogue-section-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0 0 0.2rem;
}

.bc-handlers-catalogue-examples .bc-aix-example-list {
    margin-top: 0;
}

.bc-handlers-catalogue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.bc-handlers-catalogue-acc input.bc-handlers-catalogue-checkbox[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.bc-handlers-simple-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    background: var(--panel-2);
    border-left: 3px solid #5d9b5d;
    max-width: 100%;
    box-sizing: border-box;
}

.bc-handlers-simple-item--disabled {
    border-left-color: #888;
    opacity: 0.95;
}

.bc-handlers-simple-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
    width: 100%;
}

.bc-handlers-simple-main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.bc-handlers-simple-content input.bc-handlers-catalogue-checkbox[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0.15rem 0 0;
    flex-shrink: 0;
}

.bc-handlers-simple-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
}

.bc-handlers-simple-name {
    font-weight: 500;
    font-size: 0.85rem;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.bc-handler-chip {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.32rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
    line-height: 1.2;
}

.bc-handler-chip--origin {
    background: rgba(125, 184, 255, 0.12);
}

.bc-handler-chip--runtime {
    background: rgba(180, 180, 180, 0.12);
}

.bc-handlers-simple-status {
    font-size: 0.68rem;
    margin: 0;
}

.bc-handlers-simple-examples {
    font-size: 0.68rem;
    color: var(--muted);
    word-break: break-word;
    line-height: 1.35;
}

.bc-handlers-simple-source {
    font-size: 0.64rem;
    color: var(--muted);
    font-family: monospace;
    word-break: break-all;
    max-width: 100%;
    line-height: 1.3;
}

.bc-handlers-simple-file {
    font-size: 0.7rem;
    color: var(--muted);
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AI Chat Processing Indicator */
.bc-ai-processing {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
}

.bc-ai-processing__dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: bc-ai-processing-pulse 1.4s ease-in-out infinite;
}

.bc-ai-processing__dot:nth-child(2) {
    animation-delay: 0.2s;
}

.bc-ai-processing__dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bc-ai-processing-pulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* AI Chat Timing Badge */
.bc-ai-timing {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.25rem;
    display: block;
}

.bc-ai-model-route {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: var(--muted);
}

/* Code Review Modal */
.bc-code-review {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 1rem;
    max-height: 60vh;
    overflow: auto;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre;
    word-break: normal;
    overflow-x: auto;
    color: var(--text);
}

/* Modal button variants */
.bc-modal-btn--primary {
    background: var(--accent);
    color: var(--bg);
}

.bc-modal-btn--danger {
    background: #c95d5d;
    color: #fff;
}

.bc-modal-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    color: var(--text);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.bc-modal-input:focus {
    outline: none;
    border-color: var(--accent);
}

