/* Build a Company — /company (feature #911). On the house tokens (static/css/tokens.css; the light theme maps them there;
   --text-heading is pointed at --text inside .bc so headings are never pure white);
   display font = Archivo Black via --font-display. Accent = .bc-primary only (one per view). Status, stage and role
   (working / blocked / done / failed / live / paused / waiting) are words, weight, dashed or solid hairlines — never green/red. */
.bc { --text-heading: var(--text); max-width: 1120px; margin: 0 auto; padding: 0 16px 3rem; color: var(--text); box-sizing: border-box; }
.bc *, .bc *::before, .bc *::after { box-sizing: border-box; }
.bc h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2.4rem); color: var(--text-heading); margin: 1.2rem 0 .4rem; line-height: 1.15; }
.bc h2 { font-family: var(--font-display); font-size: 1.05rem; color: var(--text-heading); margin: 0 0 .7rem; }
.bc h3 { font-family: var(--font-display); font-size: .95rem; color: var(--text-heading); margin: .2rem 0 .5rem; }
.bc-sub { color: var(--text-2); font-size: .95rem; line-height: 1.55; margin: 0; }
.bc-dim { color: var(--text-3); font-size: .85rem; line-height: 1.5; }
.bc-dim code { color: var(--text); word-break: break-all; }
.bc-paper { margin: .8rem 0 0; color: var(--text-2); font-size: .9rem; line-height: 1.5; }
.bc-badge { display: inline-block; background: var(--surface-2); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: 999px; padding: .15rem .6rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-right: .3rem; }
.bc-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 1.1rem; margin-top: 1rem; min-width: 0; }
.bc-err { color: var(--text); font-weight: 600; }
.bc-steps { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--text-2); line-height: 1.6; }
.bc-depts-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.bc-mini { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: .8rem; display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--text-2); }
.bc-mini b { color: var(--text); }
.bc-mgr { border-color: var(--text-3); }
.bc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; border-radius: 10px; border: 1px solid var(--hairline-strong); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; }
.bc-btn:hover, .bc-btn:focus-visible { border-color: var(--text-3); outline: none; }
.bc-btn:disabled { opacity: .55; cursor: default; }
.bc-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bc-primary:hover, .bc-primary:focus-visible { background: var(--accent); border-color: var(--text); color: var(--accent-ink); }
.bc-small { min-height: 36px; padding: .35rem .8rem; font-size: .82rem; }
.bc-ok { border-color: var(--text-3); color: var(--text); }
.bc-no { border-color: var(--hairline-strong); color: var(--text-2); }
.bc-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; font-size: .85rem; color: var(--text-2); }
.bc input:not([type=checkbox]), .bc textarea, .bc select { width: 100%; max-width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: 10px; padding: .6rem .7rem; font: inherit; font-size: 16px; }
.bc input:focus, .bc textarea:focus, .bc select:focus { border-color: var(--text-3); outline: none; }
.bc-dept-row { border: 1px solid var(--hairline); border-radius: 12px; padding: .9rem; margin: 0 0 .8rem; background: var(--surface); min-width: 0; }
.bc-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.bc-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--hairline-strong); border-radius: 999px; padding: .3rem .7rem; color: var(--text); font-size: .82rem; cursor: pointer; min-height: 36px; }
.bc-chip input { accent-color: var(--text-2); }
.bc-mgr-note { color: var(--text); font-size: .88rem; margin: .8rem 0; }
.bc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bc-top h2 { font-size: 1.35rem; }
.bc-pill { display: inline-block; border-radius: 999px; padding: .1rem .55rem; font-size: .75rem; font-weight: 700; border: 1px solid var(--hairline-strong); color: var(--text-2); }
.bc-pill-active { color: var(--text); border-color: var(--text-3); }
.bc-pill-paused { color: var(--text-2); border-style: dashed; border-color: var(--text-3); }
.bc-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.bc-col { min-width: 0; }
.bc-col > .bc-panel:first-child { margin-top: 1rem; }
.bc-depts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.bc-dept { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: .9rem; min-width: 0; overflow-wrap: anywhere; }
.bc-dept.bc-st-working { border-color: var(--text-3); }
.bc-dept.bc-st-blocked { border-color: var(--text-2); border-style: dashed; }
.bc-dept-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.bc-st-working .bc-st { color: var(--text); border-color: var(--text-3); }
.bc-st-blocked .bc-st { color: var(--text); border-color: var(--text-2); border-style: dashed; font-weight: 800; }
.bc-experts { color: var(--text-2); font-size: .8rem; margin: .3rem 0; }
.bc-counts { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.bc-count { font-size: .72rem; border-radius: 6px; padding: .1rem .4rem; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.bc-c-done { color: var(--text-2); }
.bc-c-running { color: var(--text); }
.bc-c-failed, .bc-c-escalated { color: var(--text); border-style: dashed !important; font-weight: 800; }
.bc-c-waiting_approval { color: var(--text); }
.bc-c-queued, .bc-c-cancelled { color: var(--text-3); }
/* Run state (ET-31377): why the company is or is not running, next to the turn counter. */
.bc-run { margin-top: .25rem; }
.bc-run-running, .bc-run-waiting { color: var(--text); border-color: var(--text-3); }
.bc-run-idle { color: var(--text-2); }
.bc-run-blocked, .bc-run-stale, .bc-run-paused { color: var(--text); border-color: var(--text-2); border-style: dashed; font-weight: 800; }
.bc-st-waiting .bc-st { color: var(--text-2); }
.bc-task-list li { margin-bottom: .35rem; }
.bc-task-why { color: var(--text-2); font-size: .76rem; margin-top: .1rem; overflow-wrap: anywhere; }
.bc-task-detail { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 8px; padding: .5rem .7rem; margin-top: .3rem; font-size: .8rem; }
.bc-task-detail p { margin: .2rem 0; }
.bc-link { background: none; border: 0; color: var(--text); cursor: pointer; font-size: .76rem; padding: 0 .2rem; text-decoration: underline; }
.bc-k { color: var(--text-3); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; margin: .5rem 0 .2rem; }
.bc-results, .bc-task-list, .bc-findings { margin: 0; padding-left: 1rem; font-size: .84rem; color: var(--text-2); line-height: 1.5; }
.bc-task-list { list-style: none; padding: 0; }
.bc-task-list li { padding: .35rem 0; border-bottom: 1px solid var(--hairline); overflow-wrap: anywhere; }
.bc-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); margin: .6rem 0 0; }
.bc-appr { border: 1px solid var(--hairline-strong); border-radius: 12px; padding: .8rem; margin-bottom: .7rem; background: var(--surface); overflow-wrap: anywhere; }
.bc-appr-top { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.bc-appr-sum { margin: .5rem 0; color: var(--text); line-height: 1.5; }
.bc-appr-btns { display: flex; gap: .5rem; }
.bc-tag { font-size: .72rem; border: 1px solid var(--hairline-strong); border-radius: 6px; padding: .05rem .4rem; color: var(--text); }
.bc-tag-kind { color: var(--text-2); border-color: var(--hairline); }
.bc-pre { white-space: pre-wrap; font-size: .78rem; color: var(--text-2); max-height: 220px; overflow: auto; }
.bc-fix { color: var(--text); font-weight: 600; }
.bc-chat { position: sticky; top: 76px; display: flex; flex-direction: column; }
.bc-msgs { max-height: 460px; min-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding-right: .2rem; }
.bc-msg { border-radius: 12px; padding: .55rem .75rem; max-width: 92%; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.bc-msg-me { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--hairline-strong); }
.bc-msg-mgr { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--hairline); }
.bc-who { display: block; font-size: .7rem; color: var(--text-3); margin-bottom: .15rem; }
.bc-text { white-space: pre-wrap; }
.bc-note { color: var(--text-2); font-size: .82rem; }
.bc-chat-form { display: flex; gap: .5rem; margin: .7rem 0 .4rem; align-items: stretch; }
.bc-chat-form textarea { flex: 1; resize: vertical; min-width: 0; }
@media (max-width: 860px) {
  .bc-grid { grid-template-columns: minmax(0, 1fr); }
  .bc-chat { position: static; }
}
@media (max-width: 480px) {
  .bc-panel { padding: .9rem; }
  .bc-chat-form { flex-direction: column; }
  .bc-depts { grid-template-columns: minmax(0, 1fr); }
}

/* ── the live office (FloM + expire76, 2026-10-11): pixel-art stage + rooms + feed + editor ── */
.bc-office-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bc-live { color: var(--text-3); }
.bc-live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: transparent; border: 1px solid var(--text-3); margin-right: .4rem; vertical-align: 1px; box-sizing: border-box; }
.bc-live[data-state="live"] { color: var(--text); border-color: var(--text-3); }
.bc-live[data-state="live"]::before { background: var(--text); border-color: var(--text); }
.bc-live[data-state="offline"] { color: var(--text-2); border-color: var(--hairline-strong); border-style: dashed; }
.bc-live[data-state="offline"]::before { background: transparent; border-style: dashed; }
.bc-office { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); gap: 1rem; align-items: start; }
.bc-office > .bc-office-head, .bc-office > .bc-dim, .bc-office > .bc-dept-editor { grid-column: 1 / -1; }
.bc-office-stage { background: var(--bg); border: 1px solid var(--hairline); border-radius: 12px; padding: 8px; min-width: 0; }
#bc-office-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#bc-office-canvas.bc-hover { cursor: pointer; }
#bc-office-canvas[hidden], .bc-office-3d[hidden] { display: none; }
.bc-office-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.bc-office-rooms { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .6rem; }
.bc-room { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: .45rem .6rem; color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; min-height: 40px; }
.bc-room:hover, .bc-room:focus-visible, .bc-room.bc-room-on { border-color: var(--text-3); outline: none; }
.bc-room-sw { width: 10px; height: 10px; border-radius: 2px; background: var(--text-3); flex: none; box-sizing: border-box; }
.bc-room.bc-st-working .bc-room-sw { background: var(--text); }
.bc-room.bc-st-blocked .bc-room-sw { background: transparent; border: 2px solid var(--text); }
.bc-room.bc-st-idle .bc-room-sw { background: var(--hairline-strong); }
.bc-room-meta { color: var(--text-3); font-size: .74rem; margin-left: auto; white-space: nowrap; }
.bc-office-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; max-height: 260px; overflow-y: auto; font-size: .82rem; line-height: 1.45; color: var(--text-2); }
.bc-office-feed li { padding: .3rem .5rem; border-left: 2px solid var(--hairline-strong); background: var(--surface); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.bc-office-feed li.bc-ev-good { border-left-color: var(--text-3); }
.bc-office-feed li.bc-ev-bad { border-left-color: var(--text); border-left-style: dashed; }
.bc-office-feed li.bc-ev-ask { border-left-color: var(--text-2); }
.bc-office-feed li.bc-ev-new { animation: bc-ev-in .5s ease-out; }
.bc-office-feed time { display: block; color: var(--text-3); font-size: .7rem; }
/* ── 3D network view (FloM, 2026-10-11): same stage, three.js canvas ── */
.bc-office-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.bc-view { display: inline-flex; gap: .25rem; }
.bc-view .bc-btn[aria-pressed="true"] { border-color: var(--text-3); color: var(--text); background: var(--surface); }
.bc-view .bc-btn:disabled { opacity: .45; cursor: not-allowed; }
.bc-office-3d { position: relative; width: 100%; min-height: 300px; border-radius: 6px; overflow: hidden; }
.bc-office-3d canvas { display: block; cursor: grab; }
.bc-office-3d canvas:active { cursor: grabbing; }
.bc-3d-tip { position: absolute; pointer-events: none; max-width: 260px; background: var(--bg); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: 8px; padding: .3rem .5rem; font-size: .78rem; line-height: 1.35; }
.bc-3d-note { margin: .4rem 0 0; font-size: .78rem; }
.bc-dept-editor { border: 1px solid var(--hairline-strong); border-radius: 12px; padding: .9rem; background: var(--surface); }
@keyframes bc-ev-in { from { background: var(--surface-2); } to { background: var(--surface); } }
@media (prefers-reduced-motion: reduce) { .bc-office-feed li.bc-ev-new { animation: none; } }
@media (max-width: 860px) {
  .bc-office { grid-template-columns: minmax(0, 1fr); }
  .bc-office-feed { max-height: 200px; }
}

/* ── Investable (joebottrader, 2026-10-12): owner switch + public list/profile ── */
.bc-inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bc-switch { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); min-height: 44px; cursor: pointer; }
.bc-switch input { width: 22px; height: 22px; accent-color: var(--text-2); cursor: pointer; }
.bc-inv-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; }
.bc-inv-terms input { background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 8px; color: var(--text); padding: .5rem; min-height: 40px; }
.bc-inv-stats { color: var(--text); font-size: .88rem; margin: .4rem 0; }
.cx-sort { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.cx-sort .bc-btn[aria-pressed="true"] { border-color: var(--text-3); color: var(--text); background: var(--surface); }
.cx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.cx-card { display: flex; flex-direction: column; gap: .35rem; padding: .9rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.cx-card:hover, .cx-card:focus-visible { border-color: var(--text-3); outline: none; }
.cx-name { font-weight: 700; font-size: 1rem; }
.cx-mission { color: var(--text-2); font-size: .84rem; overflow-wrap: anywhere; }
.cx-line { color: inherit; font-weight: 600; font-size: .82rem; } /* rule 2: not a status colour */
.cx-meta { color: var(--text-3); font-size: .76rem; }
.cx-score { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .5rem; }
.cx-stat { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; }
.cx-stat span { color: var(--text-3); font-size: .74rem; }
.cx-stat b { color: var(--text); font-size: .98rem; overflow-wrap: anywhere; }
.cx-terms p { margin: .3rem 0; }
.cx-back input { background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 8px; color: var(--text); padding: .5rem; min-height: 44px; max-width: 220px; }
#cx-root [hidden], #bc-inv [hidden] { display: none !important; }
#cx-root a:not(.bc-btn):not(.cx-card), #bc-inv a { color: var(--text); text-decoration: underline; }
.bc-entity .bc-k { margin-top: 1rem; }
.bc-en-rows { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .5rem; }
.bc-en-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; align-items: end; background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: .6rem; }
.bc-en-row label { display: flex; flex-direction: column; gap: .2rem; font-size: .72rem; color: var(--text-3); min-width: 0; }
.bc-en-row input, .bc-en-row select { min-height: 40px; padding: .4rem .5rem; font-size: 14px; }
.bc-en-row .bc-en-check { flex-direction: row; align-items: center; gap: .4rem; color: var(--text-2); min-height: 40px; }
.bc-en-row .bc-en-check input { width: auto; accent-color: var(--text-2); }
.bc-en-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.bc-en-row [data-rm] { min-height: 40px; }
.bc-en-own { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.bc-en-quote ul { margin: .3rem 0; padding-left: 1.1rem; color: var(--text-2); font-size: .85rem; }
.bc-en-quote b { color: inherit; font-weight: 600; } /* rule 2: emphasis is weight, not a status colour */
.bc-en-actions { flex-wrap: wrap; margin-top: .6rem; }
.bc-terms-list li { margin-bottom: .6rem; }
#bc-entity [hidden], #cx-terms-root [hidden] { display: none !important; }
#bc-entity a, #cx-terms-root a, .bc-paper a { color: var(--text); text-decoration: underline; }

/* ── Owner's dashboard (Build it Better ET-31466): one screen at 1920×1080 and 1440×900 ── */
.bc.bc-wide { max-width: none; padding: 0 12px 1rem; }
.bc.bc-wide .bc-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin: .3rem 0 .2rem; }
.bc.bc-wide .bc-head h1 { font-size: 1rem; margin: 0; }
.bc.bc-wide .bc-head .bc-sub { font-size: .78rem; }
.bc.bc-wide .bc-head .bc-paper { margin: 0; font-size: .74rem; }
.bc.bc-wide .bc-head .bc-paper > span:not(.bc-badge) { display: none; }
.bc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bc-red { color: var(--text); font-weight: 700; }
.bc-xs { min-height: 28px; padding: .15rem .55rem; font-size: .74rem; border-radius: 7px; }
.bc-dash[hidden], .bc-pane[hidden], #bc-dash [hidden] { display: none !important; }
.bc-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; padding: .5rem .2rem; border-bottom: 1px solid var(--hairline); }
.bc-bar-id { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.bc-logo { flex: none; width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--hairline-strong); color: var(--text); display: grid; place-items: center; font-family: var(--font-display); font-size: .9rem; background: var(--surface); }
.bc-bar-name { min-width: 0; }
.bc-bar-row { display: flex; align-items: center; gap: .55rem; flex-wrap: nowrap; min-width: 0; }
.bc-bar-row h2 { min-width: 4ch; flex: 0 1 auto; margin: 0; font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.bc-heart { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: .1rem 0 0; color: var(--text-3); font-size: .74rem; font-variant-numeric: tabular-nums; }
.bc-heart b { color: var(--text-2); font-weight: 600; }
.bc-counter { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 12px; padding: .4rem .9rem; }
.bc-ctr-head { display: flex; flex-direction: column; gap: .1rem; }
.bc-ctr-head b { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.bc-ctr-sub { font-size: .7rem; color: var(--text-3); white-space: nowrap; }
.bc-ctr-nums { display: flex; gap: .9rem; }
.bc-ctr-n { display: flex; flex-direction: column; align-items: center; min-width: 52px; cursor: help; }
.bc-ctr-n b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.bc-ctr-n span { font-size: .66rem; color: var(--text-3); white-space: nowrap; }
.bc-ctr-n.bc-low b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bc-ctr-extra { border-left: 1px solid var(--hairline-strong); padding-left: .9rem; }
.bc-ctr-extra b { color: var(--text-2); }
.bc-ctr-extra.bc-off b { color: var(--text-3); }
.bc-ctr-bars { display: flex; flex-direction: column; gap: .2rem; min-width: 250px; }
.bc-barrow { display: grid; grid-template-columns: 54px 70px auto; align-items: center; gap: .45rem; font-size: .7rem; color: var(--text-3); }
.bc-barlbl { text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.bc-track { height: 5px; border-radius: 3px; background: var(--hairline); overflow: hidden; }
.bc-track i { display: block; height: 100%; width: 0; background: var(--text-3); border-radius: 3px; transition: width .4s ease; }
.bc-track i.bc-hot { background: var(--text); }
.bc-bartxt { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-atzero { margin: 0; font-size: .7rem; color: var(--text-3); cursor: help; }
.bc-atzero b { color: var(--text-2); font-weight: 600; }
.bc-bar-act { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.bc-waiting { border-color: var(--text-3); color: var(--text); }
.bc-waiting b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--text); color: var(--bg); margin-right: .35rem; font-size: .72rem; }
.bc-upgrade { border-color: var(--hairline-strong); color: var(--text); }
.bc-dash .bc-run { margin: .2rem .2rem 0; font-size: .74rem; }
.bc-tabs { display: flex; align-items: stretch; gap: .2rem; border-bottom: 1px solid var(--hairline); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bc-tabs::-webkit-scrollbar { display: none; }
.bc-tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); font: inherit; font-size: .84rem; padding: .55rem .8rem; cursor: pointer; white-space: nowrap; min-height: 40px; }
.bc-tab:hover, .bc-tab:focus-visible { color: var(--text); outline: none; }
.bc-tab[aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.bc-tab sup { color: var(--text-2); font-size: .66rem; margin-left: .15rem; }
.bc-tab sup.bc-sup-red { color: var(--text); font-weight: 800; }
.bc-tab-gap { flex: 1 0 1rem; }
.bc-office-grid { --bc-avail: calc(100vh - 210px); display: grid; grid-template-columns: 270px minmax(0, 1fr) 350px; gap: .7rem; margin-top: .6rem; height: max(420px, var(--bc-avail)); }
.bc-rail, .bc-right { display: flex; flex-direction: column; gap: .6rem; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.bc-col-head { display: flex; align-items: center; gap: .5rem; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: .4rem; }
.bc-col-head b { color: var(--text-2); }
.bc-col-head .bc-btn { margin-left: auto; text-transform: none; letter-spacing: 0; border-color: var(--hairline-strong); color: var(--text); }
.bc-rail-list { display: flex; flex-direction: column; gap: .4rem; }
.bc-rrow { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-left: 3px solid var(--hairline-strong); border-radius: 9px; padding: .45rem .6rem; color: var(--text); font: inherit; cursor: pointer; }
.bc-rrow:hover, .bc-rrow:focus-visible, .bc-rrow.bc-on { border-color: var(--text-3); outline: none; background: var(--surface-2); }
.bc-rrow.bc-st-working { border-left-color: var(--text); }
.bc-rrow.bc-st-queued { border-left-color: var(--text-3); }
.bc-rrow.bc-st-blocked { border-left-color: var(--text); border-left-style: dashed; }
.bc-rr-top { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .86rem; }
.bc-rr-top .bc-u { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.bc-u small { color: var(--text-3); font-weight: 400; }
.bc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hairline-strong); flex: none; box-sizing: border-box; }
.bc-st-working .bc-dot { background: var(--text); }
.bc-st-queued .bc-dot { background: var(--text-3); }
.bc-st-blocked .bc-dot { background: transparent; border: 2px solid var(--text); }
.bc-rr-nums, .bc-rr-sub, .bc-rr-wait { display: block; }
.bc-rr-nums { font-size: .72rem; color: var(--text-3); margin-top: .15rem; font-variant-numeric: tabular-nums; }
.bc-rr-nums b { color: var(--text); font-weight: 700; }
.bc-rr-nums b.bc-g { color: var(--text-2); }
.bc-rr-nums b.bc-r { color: var(--text); font-weight: 800; }
.bc-rr-nums b.bc-n { color: var(--text); }
.bc-rr-sub { font-size: .7rem; color: var(--text-3); margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-rr-wait { font-size: .7rem; color: var(--text-2); margin-top: .1rem; }
.bc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.bc-tiles5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: .5rem 0; }
.bc-tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: 9px; padding: .4rem .55rem; cursor: help; }
.bc-tile b { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--text); font-variant-numeric: tabular-nums; }
.bc-tile b.bc-g { color: var(--text-2); } .bc-tile b.bc-r { color: var(--text); } .bc-tile b.bc-n { color: var(--text); }
.bc-tile span { font-size: .66rem; color: var(--text-3); }
.bc-stage-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.bc-stage-top { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.bc-stage-top .bc-live { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.bc-working { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.bc-stage-top .bc-view { margin-left: auto; }
.bc-zoom { display: inline-flex; gap: .25rem; }
.bc-stage-col .bc-office-stage { position: relative; flex: 1; min-height: 0; border: 0; border-radius: 0; padding: 0; background: var(--bg); }
.bc-stage-col .bc-office-3d { position: absolute; inset: 0; min-height: 0; }
.bc-stage-col .bc-3d-note { position: absolute; left: .6rem; bottom: .4rem; margin: 0; }
.bc-dpanel { position: absolute; top: .5rem; left: .5rem; bottom: .5rem; width: min(520px, calc(100% - 1rem)); overflow-y: auto; background: var(--bg); border: 1px solid var(--hairline-strong); border-radius: 12px; padding: .7rem .8rem; z-index: 3; }
.bc-dp-head { display: flex; align-items: center; gap: .5rem; }
.bc-dp-head h3 { margin: 0; font-size: 1.15rem; }
.bc-dp-head #bc-dp-edit { margin-left: auto; }
.bc-dpanel .bc-chips { margin: .4rem 0; }
.bc-dpanel .bc-chip { min-height: 26px; padding: .1rem .55rem; font-size: .74rem; cursor: default; }
.bc-chip.bc-chip-red { border-color: var(--text-2); color: var(--text); font-weight: 700; cursor: pointer; }
.bc-dp-charter { border: 1px solid var(--hairline-strong); border-radius: 10px; padding: .5rem; background: var(--surface); }
.bc-dp-ch-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: .3rem; }
.bc-dp-ch-head span:last-child { color: var(--text-2); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.bc-dp-charter textarea { font-size: .84rem !important; line-height: 1.45; resize: vertical; min-height: 96px; }
.bc-dp-ch-foot { display: flex; align-items: center; gap: .4rem; margin-top: .35rem; }
.bc-dp-ch-foot .bc-dim { margin-right: auto; font-size: .72rem; }
.bc-dp-now { border: 1px solid var(--hairline-strong); border-radius: 10px; padding: .45rem .6rem; font-size: .8rem; background: var(--surface); }
.bc-dp-now b { display: block; color: var(--text); }
.bc-dp-now .bc-k { margin: 0 0 .15rem; color: var(--text-2); }
.bc-dp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; }
.bc-dp-list li { background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: .35rem .5rem; overflow-wrap: anywhere; }
.bc-dp-list li.bc-click { cursor: pointer; }
.bc-dp-list .bc-one { color: var(--text-3); font-size: .74rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-badge-s { display: inline-block; min-width: 54px; text-align: center; font-size: .62rem; font-weight: 700; text-transform: uppercase; border: 1px solid currentColor; border-radius: 5px; padding: 0 .3rem; margin-right: .35rem; }
.bc-dept-editor { border: 1px solid var(--hairline-strong); border-radius: 12px; padding: .9rem; background: var(--surface); }
.bc-strip-row { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border-top: 1px solid var(--hairline); font-size: .7rem; color: var(--text-3); cursor: help; }
.bc-strip-lbl { white-space: nowrap; text-transform: uppercase; letter-spacing: .1em; }
.bc-strip-lbl b { color: var(--text); font-size: .85rem; }
.bc-strip { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 2px; flex: 1; min-width: 0; }
.bc-strip i { display: block; height: 12px; border-radius: 2px; background: var(--hairline); }
.bc-strip i.bc-s-done { background: var(--text-3); } .bc-strip i.bc-s-failed { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text); } .bc-strip i.bc-s-running { background: var(--text); }
.bc-legend { white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; }
.bc-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: .3rem; }
.bc-lg-run { background: var(--text); } .bc-lg-done { background: var(--text-3); } .bc-lg-fail { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text); }
.bc-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: .55rem .65rem; min-height: 0; display: flex; flex-direction: column; }
.bc-card-wait { border-top: 2px solid var(--text-3); flex: 0 1 auto; max-height: 34%; }
.bc-card-plan { flex: 0 1 auto; max-height: 26%; }
.bc-right .bc-chat { flex: 1 1 200px; min-height: 190px; position: static; }
.bc-card-feed { flex: 0 1 auto; max-height: 22%; }
.bc-scroll { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.bc-right .bc-appr { padding: .5rem .55rem; margin-bottom: .4rem; border-color: var(--hairline-strong); }
.bc-right .bc-appr-sum { margin: .25rem 0 .35rem; font-size: .84rem; font-weight: 600; }
.bc-right .bc-appr-btns .bc-btn { min-height: 28px; padding: .1rem .6rem; font-size: .74rem; }
.bc-ok.bc-fill { background: var(--surface-2); color: var(--text); border-color: var(--text-3); font-weight: 800; }
.bc-plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.bc-plan li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: .4rem; align-items: center; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: .3rem .4rem; font-size: .8rem; }
.bc-plan .bc-pos { color: var(--text-2); font-weight: 700; text-align: center; }
.bc-plan li > span:nth-child(2) { display: block; min-width: 0; }
.bc-plan .bc-pt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bc-plan .bc-pw { display: block; color: var(--text-3); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-plan .bc-pa { display: inline-flex; gap: .1rem; }
.bc-plan .bc-pa button { background: none; border: 1px solid transparent; color: var(--text-2); border-radius: 5px; min-width: 24px; min-height: 24px; cursor: pointer; font-size: .8rem; }
.bc-plan .bc-pa button:hover, .bc-plan .bc-pa button:focus-visible { border-color: var(--text-3); color: var(--text); outline: none; }
.bc-plan .bc-pa button[data-a="remove"]:hover { border-color: var(--text-2); border-style: dashed; color: var(--text); }
.bc-right .bc-msgs { flex: 1; max-height: none; min-height: 60px; }
.bc-msg-wait { align-self: flex-end; max-width: 92%; font-size: .72rem; color: var(--text-2); margin-top: -.2rem; }
.bc-right .bc-chat-form { margin: .4rem 0 0; }
.bc-right .bc-chat-form textarea { min-height: 38px; font-size: 14px; padding: .45rem .6rem; resize: none; }
.bc-right .bc-office-feed { max-height: none; font-size: .78rem; }
.bc-filters { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.bc-filters h2 { margin: 0 auto 0 0; }
.bc-filters label { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-2); }
.bc-filters select { width: auto; min-width: 140px; padding: .35rem .5rem; font-size: 14px; }
.bc-table-wrap { overflow-x: auto; }
.bc-ledger { width: 100%; border-collapse: collapse; font-size: .8rem; }
.bc-ledger th { text-align: left; color: var(--text-3); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: .35rem .5rem; border-bottom: 1px solid var(--hairline-strong); white-space: nowrap; }
.bc-ledger td { padding: .35rem .5rem; border-bottom: 1px solid var(--hairline); vertical-align: top; color: var(--text-2); }
.bc-ledger td.bc-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.bc-ledger tr.bc-click { cursor: pointer; }
.bc-ledger tr.bc-click:hover td { background: var(--surface-2); }
.bc-ledger td.bc-res { max-width: 420px; }
.bc-mem-group { margin-bottom: .8rem; }
.bc-mem-group li { margin-bottom: .25rem; }
@media (max-width: 1500px) { .bc-office-grid { grid-template-columns: 240px minmax(0, 1fr) 320px; } .bc-ctr-bars { min-width: 210px; } }
@media (max-width: 1180px) {
  .bc-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .bc-counter { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; flex-wrap: wrap; }
  .bc-office-grid { grid-template-columns: minmax(0, 1fr) 320px; height: auto; }
  .bc-rail { grid-column: 1 / -1; grid-row: 2; }
  .bc-stage-col { height: 70vh; min-height: 420px; }
  .bc-right { overflow: visible; }
  .bc-card-wait, .bc-card-plan, .bc-card-feed { max-height: 320px; }
}
@media (max-width: 760px) {
  .bc.bc-wide { padding: 0 8px 1rem; }
  .bc-bar { grid-template-columns: minmax(0, 1fr); }
  .bc-bar-act { justify-content: flex-start; }
  .bc-counter { grid-row: auto; display: grid; grid-template-columns: 1fr; gap: .4rem; }
  .bc-ctr-nums { justify-content: space-between; }
  .bc-ctr-bars { min-width: 0; }
  .bc-office-grid { display: flex; flex-direction: column; height: auto; }
  .bc-stage-col { order: 1; height: 62vh; min-height: 360px; }
  .bc-rail { order: 2; overflow: visible; }
  .bc-right { order: 3; overflow: visible; }
  .bc-right .bc-chat { min-height: 300px; }
  .bc-legend { display: none; }
  .bc-strip i { height: 10px; }
  .bc-tiles5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bc-dpanel { width: calc(100% - 1rem); }
  .bc-stage-top .bc-view { margin-left: 0; }
}

/* ET-31466: right-column cards keep their content; the chat takes the free height, the column scrolls past it */
.bc-right > .bc-card { flex: none; }
.bc-right > .bc-chat { flex: 1 1 200px; }
.bc-right #bc-approvals { max-height: 26vh; overflow-y: auto; }
.bc-right #bc-plan { max-height: 24vh; overflow-y: auto; }
.bc-right #bc-office-feed { max-height: 20vh; overflow-y: auto; }
.bc-bar-row #bc-pause, .bc-bar-row .bc-pill { flex: none; }
@media (max-width: 1500px) and (min-width: 1181px) {
  .bc-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; }
  .bc-counter { min-width: 0; overflow: hidden; gap: .7rem; }
  .bc-ctr-head .bc-ctr-sub { display: none; }
  .bc-ctr-bars { min-width: 0; flex: 1 1 auto; }
  .bc-bartxt { overflow: hidden; text-overflow: ellipsis; }
}
/* ET-31466: at 1181-1600 px the left rail folds into a strip above the office, so the office keeps
   >= 1,100 px of width on one screen (1440x900); the right column stays beside it. */
@media (max-width: 1600px) and (min-width: 1181px) {
  .bc.bc-wide { padding-left: 4px; padding-right: 4px; margin-left: -24px; margin-right: -24px; }
  .bc-office-grid { grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: auto minmax(0, 1fr); gap: .5rem; }
  .bc-office-grid > .bc-rail { grid-column: 1; grid-row: 1; flex-direction: row; align-items: center; gap: .5rem; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
  .bc-office-grid > .bc-stage-col { grid-column: 1; grid-row: 2; }
  .bc-office-grid > .bc-right { grid-column: 2; grid-row: 1 / 3; }
  .bc-rail .bc-col-head { margin: 0; flex: none; }
  .bc-rail .bc-col-head .bc-btn { margin-left: .3rem; }
  .bc-rail-list { flex-direction: row; flex: none; gap: .35rem; }
  .bc-rail .bc-rrow { width: auto; min-width: 0; max-width: 220px; padding: .25rem .5rem; white-space: nowrap; }
  .bc-rail .bc-rr-top { font-size: .78rem; }
  /* experts and "Queued: reason" stay on every chip (ET-31466 #3), one short line each */
  .bc-rail .bc-rr-sub, .bc-rail .bc-rr-wait { display: block; font-size: .62rem; line-height: 1.2; max-width: 204px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bc-rail .bc-rr-nums { font-size: .66rem; margin-top: 0; }
  .bc-rail .bc-tiles { display: flex; flex: none; gap: .3rem; }
  .bc-rail .bc-tile { padding: .15rem .45rem; display: flex; align-items: baseline; gap: .3rem; white-space: nowrap; }
  .bc-rail .bc-tile b { display: inline; font-size: .9rem; }
}

.bc-expert-card { border: 1px solid var(--hairline-strong); border-radius: 8px; padding: .4rem .7rem; margin: .3rem 0; font-size: .82rem; }
.bc-expert-card summary { cursor: pointer; min-height: 28px; color: var(--text); }
.bc-expert-brief, .bc-expert-perms { margin: .4rem 0; color: var(--text); }
.bc-expert-caps { margin: .3rem 0 .3rem 1.1rem; padding: 0; color: var(--text-2); }
