/* Variant B: Chat operator. One conversation, live team on the side. */
.shell-b { display: grid; grid-template-columns: 76px 1fr 340px; min-height: 100vh; }
.rail { background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; padding: 14px 8px; gap: 6px; position: sticky; top: 0; height: 100vh; }
.rail .mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; }
.rail a { color: rgba(255,255,255,.8); text-decoration: none; display: grid; justify-items: center; gap: 2px; font-size: 10px; font-weight: 700; padding: 8px 4px; border-radius: 10px; width: 60px; position: relative; }
.rail a span:first-child { font-size: 20px; }
.rail a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; }
.rail a .count { position: absolute; top: 4px; right: 6px; background: var(--accent); font-size: 10px; padding: 0 5px; border-radius: 999px; }
.rail .spacer { flex: 1; }
.rail .never { color: #9BE3C4; font-size: 10px; text-align: center; line-height: 1.3; }
.center { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.center .head { padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.center .head h1 { font-size: 17px; margin: 0; }
.thread { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.msg { max-width: 760px; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.msg.me { grid-template-columns: 1fr; justify-self: end; max-width: 620px; }
.msg .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.msg.me .bubble { background: var(--navy); color: #fff; border-color: var(--navy); }
.msg .who { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.msg .bubble p:last-child { margin-bottom: 0; }
.steps { display: grid; gap: 6px; margin: 8px 0; }
.steps .step { font-size: 13px; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.steps .step.done { color: var(--ok); }
.steps .step.running { color: var(--info); }
.steps .step .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.steps .step.running .dot { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.inline-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: var(--surface-2); }
.inline-card h3 { margin: 0 0 4px; font-size: 14px; }
.inline-card p { font-size: 13px; margin: 0 0 6px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.composer { border-top: 1px solid var(--line); background: var(--surface); padding: 10px 20px 14px; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; resize: none; min-height: 44px; max-height: 140px; background: var(--surface); color: var(--ink); }
.composer .chips { margin-bottom: 8px; }
.composer .hint { font-size: 11px; color: var(--muted); margin-top: 6px; }
.side { border-left: 1px solid var(--line); background: var(--surface); height: 100vh; overflow-y: auto; position: sticky; top: 0; padding: 14px 16px 30px; }
.side h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 8px; }
.side .agent { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.side .agent .agent-emoji { width: 28px; height: 28px; font-size: 14px; }
.side .agent b { display: block; }
.side .agent small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.side .badge { font-size: 10px; padding: 1px 7px; margin-left: auto; }
.side .feed li { font-size: 12px; padding: 6px 0; }
.side .feed .when { min-width: 52px; }
.page { padding: 20px; overflow-y: auto; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lib-card { cursor: pointer; }
.lib-card .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.lib-card h3 { margin: 4px 0; }
.takeaway { background: var(--navy); color: #fff; padding: 12px 14px; border-radius: 10px; display: grid; gap: 6px; font-size: 13px; }
.takeaway b { color: #FFB199; }
.stage-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
@media (max-width: 1100px) { .shell-b { grid-template-columns: 76px 1fr; } .side { display: none; } .side.show { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 90vw); z-index: 25; box-shadow: -8px 0 30px rgba(0,0,0,.15); } }
@media (max-width: 760px) {
  .shell-b { grid-template-columns: 1fr; }
  .rail { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; justify-content: space-around; padding: 4px; z-index: 20; }
  .rail .mark, .rail .spacer, .rail .never { display: none; }
  .center { height: 100vh; padding-bottom: 64px; }
  .msg { max-width: 100%; }
}
