/* ==========================================================================
   Inbox — one surface theme: the page (--bg) and one panel (--surface).
   Left, on the page: Please review, the one raised card at rest (--raise), then
   Ongoing conversations. Middle: the open conversation is the stage, the one
   panel. Right, on the page: the site. Every word is ink; the text styles are
   the contract's (meta 12 · body/strong 14 · heading 16 · title 20 · code).
   Dark red only in the yin-yang, the review count and the needs-you marker.
   ========================================================================== */
.view-inbox { overflow: hidden; }
.ib {
  height: 100%; min-height: 600px;
  display: grid; grid-template-columns: 336px minmax(0, 1fr) 300px; column-gap: 20px;
  padding: 4px 20px 0;
}
.ib-left, .ib-right { min-width: 0; min-height: 0; }

/* ==========================================================================
   Left: Please review — the shared review queue, raised on the page
   ========================================================================== */
.ib-left { display: flex; flex-direction: column; }
.ib-review { flex: none; }
.ib-review .queue { padding: 10px; }
.ib-review .queue-head { padding: 4px 10px 8px 12px; }
.ib-review.is-clear .queue { box-shadow: var(--ring); } /* nothing waits: nothing is raised */

/* ==========================================================================
   Left: Ongoing conversations, on the page
   ========================================================================== */
.ib-convs { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: 28px; }
.ib-convs-head { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 0 10px 10px; }
.ib-convs-top { display: flex; align-items: center; gap: 10px; min-height: 28px; padding: 0 10px 0 12px; }
.ib-convs-title { font-size: var(--fs-heading); font-weight: 500; line-height: 1.4; white-space: nowrap; }
.ib-convs-busy { flex: none; margin-left: auto; display: flex; }
.ib-busy { display: inline-flex; }
/* Correspondence off: the mark fades like any agent that is off; the words stay ink */
.ib-busy.is-off .busy-mark .bm-yin { fill: var(--stroke); }
.ib-busy.is-off .busy-mark .bm-rim { stroke: var(--stroke); }
.ib-filter { display: grid; width: 100%; }
.ib-search .input:focus { background: var(--surface); }

.ib-list {
  --av-bg: var(--surface); /* avatars on the page are white discs */
  flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 2px; padding: 0 10px 24px;
}
.ib-list .empty { padding: 40px 16px; }
.ib-crow {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 1px;
  padding: 10px 12px; border-radius: var(--r-2); color: var(--ink); text-decoration: none;
  transition: background var(--dur-1) var(--ease);
}
.ib-crow:hover { background: var(--hover); }
.ib-crow.is-active { background: var(--fill); }
.ib-crow > .av { grid-row: 1 / 4; margin-top: 2px; }
/* name (Strong) · what was said last (Body; unread at weight 500) · the site (meta) */
.ib-crow-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; line-height: 1.45; }
.ib-crow-meta { justify-self: end; align-self: center; display: flex; align-items: center; gap: 6px; font-size: var(--fs-meta); line-height: 1.4; white-space: nowrap; }
.ib-crow-paused { display: inline-flex; align-items: center; gap: 4px; }
.ib-crow-paused .ic { width: 12px; height: 12px; }
.ib-crow-time { font-variant-numeric: tabular-nums; }
.ib-crow-line, .ib-crow-site { grid-column: 2 / 4; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-crow-line { line-height: 1.45; }
.ib-crow.is-unread .ib-crow-line { font-weight: 500; }
.ib-crow-site { font-size: var(--fs-meta); line-height: 1.4; }
.ib-crow-live { display: inline-flex; align-items: center; gap: 8px; }
.ib-crow-live .dot { width: 6px; height: 6px; margin-left: 1px; }

/* ==========================================================================
   Middle: the stage — the one panel: who, the rooms, the chat, the dock
   ========================================================================== */
.ib-mid {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
  margin-bottom: 20px; background: var(--surface); border-radius: var(--r-4); box-shadow: var(--ring);
}
.ib-head { flex: none; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 20px 0 24px; border-bottom: 1px solid var(--line); }
.ib-head-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ib-head-id { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ib-head-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-heading); font-weight: 500; line-height: 1.4; }
.ib-head-more { flex: none; cursor: default; }
.ib-head-sub { line-height: 1.45; }
.ib-head-actions { flex: none; display: flex; align-items: center; gap: 8px; }
/* The rooms: .tabs > .tab from the contract (Email with … · Team Chat) */
.ib-tabs .count { margin-left: 0; }

.ib-room { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.ib-room.is-fading { animation: fade-in var(--dur-3) var(--ease); }

/* ---------- Email: a chat ---------- */
.ib-thread, .ib-forum { display: flex; flex-direction: column; max-width: 840px; margin: 0 auto; padding: 24px 28px 28px; }
.ib-thread { gap: 16px; }
.ib-start { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 80%; text-align: center; }
.ib-start-subject { font-weight: 500; line-height: 1.45; }
.ib-start-sub { font-size: var(--fs-meta); line-height: 1.4; }
/* A day: a hairline across the room, the day in its middle */
.ib-day { align-self: stretch; display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: var(--fs-meta); line-height: 1.4; white-space: nowrap; }
.ib-day::before, .ib-day::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

.ib-msg { display: flex; align-items: flex-end; gap: 10px; max-width: min(84%, 620px); }
.ib-msg.is-new, .ib-post.is-new { animation: rise var(--dur-3) var(--ease) both; }
.ib-msg.is-in { align-self: flex-start; }
.ib-msg.is-out { align-self: flex-end; flex-direction: row-reverse; }
.ib-msg > .av { margin-bottom: 2px; }
.ib-msg-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ib-msg.is-out .ib-msg-col { align-items: flex-end; }
.ib-msg-meta { display: flex; align-items: center; gap: 8px; min-height: 24px; padding: 0 4px; font-size: var(--fs-meta); line-height: 1.4; }
.ib-meta-name { font-size: var(--fs-body); font-weight: 500; line-height: 1.45; }
.ib-meta-time { font-variant-numeric: tabular-nums; }
.ib-info, .ib-more { --s: 24px; margin: 0 -4px 0 -2px; }
.ib-info .ic, .ib-more .ic { width: 16px; height: 16px; }
.ib-more { opacity: 0; transition: opacity var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.ib-msg:hover .ib-more, .ib-more:focus-visible, .ib-more[aria-expanded="true"] { opacity: 1; }

/* Bubbles from the contract: theirs white with a hairline, ours the fill, not sent yet dashed */
.ib-bubble.bubble { position: relative; max-width: none; min-width: 0; padding: 12px 16px 13px; }
.ib-bubble.bubble-outbox { padding: 11px 15px 12px; }
.ib-bubble.is-editing { border-style: solid; border-color: var(--ink); }
.ib-body p + p { margin-top: 10px; }
.ib-bstat { display: flex; align-items: center; gap: 8px; margin: -1px 0 10px; font-size: var(--fs-meta); line-height: 1.4; }
.ib-bstat .ic { width: 14px; height: 14px; flex: none; }
.ib-bstat .dot { width: 6px; height: 6px; margin: 0 4px 0 2px; }
/* A longer line of the server's words (why it waits, a sender not verified): the icon stays on the first line */
.ib-bstat.is-note { align-items: flex-start; }
.ib-bstat.is-note .ic { margin-top: 2px; }
.ib-bact { display: flex; align-items: center; gap: 8px; margin: 14px -7px -4px; padding-top: 11px; border-top: 1px solid var(--line); }
.ib-msg.is-editing { width: min(84%, 620px); }
.ib-msg.is-editing .ib-msg-col { flex: 1 1 auto; }
.ib-msg.is-editing .ib-bubble { align-self: stretch; }
.ib-edit {
  display: block; width: 100%; min-height: 160px; margin: 0; padding: 0; border: 0; outline: 0; resize: none; background: transparent;
  font: 400 var(--fs-body)/1.55 var(--font); color: var(--ink);
}

/* Attachments: the file's own icon, as in Documents */
.ib-atts { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-msg.is-out .ib-atts, .ib-post.is-mine .ib-atts { justify-content: flex-end; }
.ib-att {
  display: inline-flex; align-items: center; gap: 8px; max-width: 280px; height: 32px; padding: 0 12px 0 8px; border-radius: var(--r-2);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); font-size: var(--fs-meta); line-height: 1.4;
  cursor: pointer; transition: box-shadow var(--dur-1) var(--ease);
}
.ib-att:hover { box-shadow: inset 0 0 0 1px var(--stroke); }
.ib-att-ic { flex: none; display: grid; place-items: center; width: 18px; height: 18px; }
.ib-att-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ib-att-ic .fill { fill: currentColor; stroke: none; }
.ib-att-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-att .chip-remove { margin-right: -6px; }

.ib-trans { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; border: 0; background: none; color: var(--ink); font: 400 var(--fs-meta)/1.4 var(--font); cursor: pointer; text-underline-offset: 3px; }
.ib-trans:hover { text-decoration: underline; text-decoration-color: var(--stroke); }
.ib-trans .ic { width: 14px; height: 14px; }

.ib-event { align-self: center; display: inline-flex; align-items: center; gap: 8px; max-width: 90%; font-size: var(--fs-meta); line-height: 1.4; }
.ib-event .ic { width: 14px; height: 14px; flex: none; }
.ib-event-link { flex: none; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-decoration-color: var(--stroke); text-underline-offset: 3px; cursor: pointer; }
.ib-event-link:hover { text-decoration-color: var(--ink); }
.ib-live { align-self: center; max-width: 90%; }

/* ---------- Team Chat: the same room and bubbles, laid out as a group chat ---------- */
.ib-team-intro { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 24px 4px; text-align: center; }
.ib-team-intro .av-stack { margin-bottom: 8px; }
.ib-team-title { font-weight: 500; line-height: 1.45; }
.ib-forum .ib-day { margin: 18px 0 4px; }
.ib-forum .ib-event { margin: 10px 0 2px; }
.ib-post { display: flex; align-items: flex-start; gap: 10px; max-width: min(84%, 620px); margin-top: 14px; }
.ib-post.is-follow { margin-top: 4px; }
.ib-post.is-mine { align-self: flex-end; }
.ib-post > .av { margin-top: 26px; }
.ib-post-av { flex: none; width: 24px; }
.ib-post-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ib-post.is-mine .ib-post-col { align-items: flex-end; }
.ib-post-head { display: flex; align-items: baseline; gap: 8px; min-height: 22px; padding: 0 4px; font-size: var(--fs-meta); line-height: 1.4; }
.ib-post-name { font-size: var(--fs-body); font-weight: 500; line-height: 1.45; }
.ib-post-time { font-variant-numeric: tabular-nums; }
.ib-post-text.bubble { max-width: none; }
.ib-post-text p + p { margin-top: 8px; }
.ib-post .ib-atts { margin-top: 2px; }
.ib-forum .ib-live { margin-top: 14px; }

/* ---------- Dock: Decision needed (or why the agents rest), then the composer ---------- */
.ib-dock { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.ib-ask-slot:empty { display: none; }
.ib-ask-slot .decision { animation: rise var(--dur-3) var(--ease) both; }
/* Short of room (fitAsk): each piece of evidence keeps one line, its words in full on hover; the conversation scrolls */
.ib-ask-slot.is-tight .decision { gap: 12px; padding-top: 16px; padding-bottom: 18px; }
.ib-ask-slot.is-tight .decision-ev dt, .ib-ask-slot.is-tight .decision-ev dd { padding-top: 7px; padding-bottom: 7px; }
.ib-ask-slot.is-tight .decision-ev dd { display: flex; align-items: center; min-width: 0; }
.ib-ask-slot.is-tight .decision-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-ask-slot.is-tight .decision-mark, .ib-ask-slot.is-tight .decision-doc { flex: none; }
.ib-paused { align-items: center; padding: 12px 16px; }
.ib-paused .callout-body { gap: 2px; }

/* ---------- Composer: writes to the open room ---------- */
.ib-comp {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "text tools send"; align-items: center; column-gap: 6px; row-gap: 0;
  padding: 7px 7px 7px 12px; border-radius: var(--r-3); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow var(--dur-1) var(--ease);
}
.ib-comp:hover { box-shadow: inset 0 0 0 1px var(--stroke); }
.ib-comp:focus-within { box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px var(--fill); }
.ib-comp.is-over { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 4px var(--fill); }
.ib-comp-text {
  grid-area: text; display: block; width: 100%; min-height: 32px; max-height: 200px; padding: 6px 2px; margin: 0;
  border: 0; outline: 0; resize: none; background: transparent; font: 400 var(--fs-body)/1.45 var(--font); color: var(--ink);
}
.ib-comp-text::placeholder, .ib-chips-input::placeholder { color: var(--ink); opacity: .42; }
.ib-comp-tools { grid-area: tools; display: flex; align-items: center; gap: 4px; align-self: end; }
.ib-comp-send { grid-area: send; align-self: end; }
.ib-comp-fold { display: none; }
.ib-comp-fields, .ib-comp-ctx, .ib-comp-atts { display: none; }
.ib-comp.is-expanded {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "fields fields" "ctx ctx" "text text" "atts atts" "tools send";
  padding: 6px 10px 10px 14px;
}
.ib-comp.is-expanded .ib-comp-fold { display: inline-grid; }
.ib-comp.is-expanded .ib-comp-text { min-height: 72px; padding: 10px 2px 6px; line-height: 1.55; }
.ib-comp.is-expanded .ib-comp-atts:not(:empty) { grid-area: atts; display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }
.ib-comp.is-expanded .ib-comp-ctx:not(:empty) { grid-area: ctx; display: flex; padding: 8px 0 0; }
.ib-comp.is-expanded.is-email .ib-comp-fields { grid-area: fields; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.ib-comp.is-expanded.is-email .ib-comp-fields .ib-cf:first-child { border-top: 0; }
.ib-comp.is-expanded .ib-comp-tools { margin-left: -6px; }

.ib-cf { display: flex; align-items: center; gap: 10px; min-height: 40px; border-top: 1px solid var(--line); }
.ib-cf-l { flex: none; width: 60px; }
.ib-from { display: inline-flex; align-items: center; gap: 8px; min-width: 0; height: 30px; margin-left: -8px; padding: 0 8px; border: 0; border-radius: var(--r-2); background: none; color: var(--ink); cursor: pointer; white-space: nowrap; transition: background var(--dur-1) var(--ease); }
.ib-from:hover, .ib-from[aria-expanded="true"] { background: var(--hover); }
.ib-from .ic { width: 14px; height: 14px; }
.ib-chips { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 0; }
.ib-chips-input { flex: 1 1 80px; min-width: 80px; height: 26px; padding: 0; border: 0; outline: 0; background: none; color: var(--ink); }
.ib-pchip { height: 26px; padding-left: 3px; gap: 6px; font-size: var(--fs-body); }
.ib-pchip > .ic { margin-left: 4px; }
.ib-cf-x { flex: none; height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-pill); background: none; color: var(--ink); font-weight: 500; cursor: pointer; }
.ib-cf-x:hover { background: var(--hover); }
.ib-subject { flex: 1 1 auto; min-width: 0; height: 38px; padding: 0; border: 0; outline: 0; background: none; color: var(--ink); font-weight: 500; }
.ib-ctx { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; height: 28px; padding: 0 8px 0 10px; border-radius: var(--r-pill); background: var(--fill); font-size: var(--fs-meta); line-height: 1.4; }
.ib-ctx .ic { width: 14px; height: 14px; flex: none; }

/* ==========================================================================
   Right: the site, on the page — its state, what we know, its documents
   ========================================================================== */
.ib-right { --av-bg: var(--surface); overflow: auto; overscroll-behavior: contain; padding: 16px 8px 32px; }
.ib-side { display: flex; flex-direction: column; gap: 32px; }
.ib-facts .section-title { margin-bottom: 2px; }
.ib-side .attrs { --attr-label: 112px; }
/* The documents sit on the page: Open and Download appear on the page's own hover colour */
.ib-side .docs { --doc-under: var(--bg); }
.ib-side .doc-row.ib-doc-new { background: var(--fill); }
.ib-side .doc-row.ib-doc-new::before, .ib-side .doc-row.ib-doc-new + .doc-row::before { opacity: 0; }
/* A long list runs below the fold: "Drop to upload" sits under the header, where the eye is */
.ib-side .docs-over { align-items: flex-start; padding-top: 64px; }
.ib-offer { display: flex; align-items: center; gap: 8px; padding: 10px 8px 14px 44px; animation: rise var(--dur-3) var(--ease) both; }

/* ==========================================================================
   Pause popover
   ========================================================================== */
.ib-pause-pop { display: flex; flex-direction: column; gap: 10px; }
.ib-pause-pop .popover-text { line-height: 1.5; }
.ib-pause-pop .textarea { min-height: 64px; }

/* ==========================================================================
   Info modal: Details · Agent chain · Checks · Original (machine text in code)
   ========================================================================== */
.ib-modal .modal-body { padding-top: 20px; }
.ib-meta { display: grid; grid-template-columns: 128px minmax(0, 1fr); margin: 0; }
.ib-meta > dt, .ib-meta > dd { margin: 0; padding: 11px 0; border-top: 1px solid var(--line); }
.ib-meta > dt:first-of-type, .ib-meta > dt:first-of-type + dd { border-top: 0; }
.ib-meta > dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-width: 0; }
.ib-meta-banner { align-items: center; margin-bottom: 14px; }
.ib-meta-banner .callout-body { gap: 2px; }
.ib-actor { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ib-mono-id { font: 400 var(--fs-meta)/1.6 var(--mono); }

/* ---------- Agent chain: a trace viewer ---------- */
.ib-chain { display: flex; flex-direction: column; }
.ib-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 2px 2px 0; }
.ib-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ib-stat-l { font-size: var(--fs-meta); line-height: 1.4; }
.ib-stat-v { font-size: var(--fs-figure); font-weight: 300; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ib-stat-s { font-size: var(--fs-meta); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ib-lanes { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 20px; padding: 14px 16px 12px; border-radius: var(--r-3); box-shadow: inset 0 0 0 1px var(--line); }
.ib-lane-names { display: flex; flex-direction: column; }
.ib-lane-name { display: flex; align-items: center; gap: 8px; height: 30px; min-width: 0; font-size: var(--fs-meta); line-height: 1.4; }
.ib-lanes-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ib-lane-guide { stroke: var(--line); stroke-width: 1; }
.ib-link { fill: none; stroke: var(--stroke); stroke-width: 1.25; }
.ib-link.is-gap { stroke-dasharray: 2 3; }
.ib-pill { fill: var(--fill-2); cursor: pointer; transition: fill var(--dur-1) var(--ease); }
.ib-pill:hover { fill: var(--stroke-faint); }
.ib-pill.is-person { fill: var(--surface); stroke: var(--ink); stroke-width: 1; }
.ib-dot { pointer-events: none; }
.ib-dot.d-llm, .ib-dot.d-checker, .ib-dot.d-mark { fill: var(--ink); }
.ib-dot.d-review { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.ib-dot.d-tool { fill: var(--stroke); }
.ib-gap-l { font: 400 var(--fs-meta) var(--font); fill: var(--ink); }

.ib-trace-bar { display: flex; align-items: center; gap: 8px; margin: 22px 0 6px; }
.ib-trace-title { font-weight: 500; }
.ib-trace { position: relative; }
.ib-trace::before { content: ""; position: absolute; left: 75.25px; top: 18px; bottom: 18px; width: 1.5px; border-radius: 2px; background: var(--line-strong); }

.ib-turn { position: relative; border-radius: var(--r-3); transition: background var(--dur-3) var(--ease); }
.ib-turn.is-flash { animation: ib-flash 1.4s var(--ease); }
@keyframes ib-flash { 0%, 30% { background: var(--fill); } 100% { background: transparent; } }
.ib-turn-head { display: grid; grid-template-columns: 52px 28px auto minmax(0, 1fr); align-items: center; column-gap: 10px; height: 40px; }
.ib-turn-head > .av { position: relative; z-index: 1; justify-self: center; box-shadow: 0 0 0 4px var(--surface); }
.ib-turn-name { font-weight: 500; white-space: nowrap; }
.ib-turn-role { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-meta); }

.ib-step { display: grid; grid-template-columns: 52px 28px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.ib-step-t { padding-top: 7px; font: 400 var(--fs-meta)/1.5 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.ib-step-dot { position: relative; z-index: 1; justify-self: center; width: 7px; height: 7px; margin-top: 13px; border-radius: 50%; background: var(--stroke); box-shadow: 0 0 0 3px var(--surface); }
.ib-step.k-llm > .ib-step-dot, .ib-step.k-check > .ib-step-dot, .ib-step.k-group > .ib-step-dot { background: var(--ink); }
.ib-step.k-review > .ib-step-dot { width: 9px; height: 9px; margin-top: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 3px var(--surface); }
.ib-step.k-trigger > .ib-step-dot, .ib-step.k-handoff > .ib-step-dot, .ib-step.k-queued > .ib-step-dot, .ib-step.k-sent > .ib-step-dot { background: var(--ink); }
.ib-step-main { min-width: 0; padding: 0 0 6px; }
.ib-step-head {
  display: flex; align-items: center; gap: 10px; width: calc(100% + 10px); min-height: 32px; margin-left: -10px; padding: 4px 8px 4px 10px;
  border: 0; border-radius: var(--r-2); background: none; color: var(--ink); text-align: left; cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.ib-step-head:hover { background: var(--hover); }
.ib-step-head[disabled] { cursor: default; }
.ib-step-head[disabled]:hover { background: none; }
.ib-step-what { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.ib-step-what .ic { align-self: center; }
.ib-kind { width: 14px; height: 14px; flex: none; }
.ib-step-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ib-step-count { flex: none; font-size: var(--fs-meta); white-space: nowrap; }
.ib-tool { flex: none; }
.ib-args { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-verdict { flex: none; height: 22px; padding: 0 8px; }
.ib-verdict .ic { width: 12px; height: 12px; }
.ib-step-meta { flex: none; margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: var(--fs-meta); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ib-chev { flex: none; width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease); }
.ib-chev-x { flex: none; width: 16px; }
.ib-step-head[aria-expanded="true"] .ib-chev { transform: rotate(180deg); }
.ib-step-peek { margin-top: -2px; padding-right: 26px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-step-body { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 10px; }
.ib-group-body { padding: 4px 0 2px; }
.ib-step-head[aria-expanded="true"] + .ib-step-peek:not(.mono) { display: none; }
.ib-step.is-nested { grid-template-columns: 0 0 minmax(0, 1fr); column-gap: 0; }
.ib-step.is-nested > .ib-step-t, .ib-step.is-nested > .ib-step-dot { visibility: hidden; }
.ib-step.is-nested .ib-step-main { padding: 0 0 2px 14px; border-left: 1.5px solid var(--line); margin-left: 4px; }

.ib-gap { display: grid; grid-template-columns: 52px 28px minmax(0, 1fr); column-gap: 10px; align-items: center; height: 34px; }
.ib-gap > i { position: relative; z-index: 1; justify-self: center; width: 4px; height: 100%; background: repeating-linear-gradient(var(--surface) 0 3px, transparent 3px 6px); }
.ib-gap-text { font-size: var(--fs-meta); }

.ib-io { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ib-io-l { font-size: var(--fs-meta); }
.ib-pre {
  margin: 0; padding: 12px 14px; border-radius: var(--r-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font: 400 var(--fs-meta)/1.65 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto;
}
.ib-pre.is-raw { max-height: none; }

/* ---------- Checks ---------- */
.ib-checks-intro { display: flex; align-items: center; gap: 14px; padding-bottom: 4px; }
.ib-checks { width: 100%; margin-top: 16px; border-collapse: collapse; }
.ib-checks th { padding: 0 16px 10px 0; text-align: left; font-size: var(--fs-meta); font-weight: 400; white-space: nowrap; }
.ib-checks td { padding: 14px 16px 14px 0; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.ib-checks td:last-child, .ib-checks th:last-child { padding-right: 0; text-align: right; }
.ib-checks .ib-q { width: 40%; font-weight: 500; }
.ib-checks tr.is-removed .ib-q { text-decoration: line-through; text-decoration-color: var(--stroke); }
.ib-checks .chip { margin-top: -1px; white-space: nowrap; }
/* Why a flagged item holds the email, and the checkers' suggested words: under the item, in the Meta style */
.ib-checks .ib-q-why { display: block; margin-top: 4px; font-size: var(--fs-meta); font-weight: 400; line-height: 1.4; }

/* ---------- Original ---------- */
.ib-orig-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ib-orig-body { margin-bottom: 22px; padding: 16px 20px; border-radius: var(--r-3); box-shadow: inset 0 0 0 1px var(--line); line-height: 1.6; }
.ib-orig-body p + p { margin-top: 10px; }

/* ==========================================================================
   Smaller screens (1280 × 800)
   ========================================================================== */
@media (max-width: 1360px) {
  .ib { grid-template-columns: 296px minmax(0, 1fr) 288px; column-gap: 16px; padding-left: 16px; padding-right: 16px; }
  /* The row never wraps: the turning yin-yang alone, the names in its tooltip */
  .ib-convs-busy .busy-label { display: none; }
  .ib-thread, .ib-forum { padding-left: 20px; padding-right: 20px; }
  .ib-msg, .ib-post { max-width: 90%; }
  .ib-msg.is-editing { width: 90%; }
  .ib-side .attrs { --attr-label: 104px; }
  .ib-lanes { grid-template-columns: 136px minmax(0, 1fr); }
}
@media (max-height: 860px) {
  .ib-head { padding-top: 12px; }
  .ib-convs { margin-top: 20px; }
  .ib-convs-head { gap: 10px; }
  .ib-crow { padding-top: 8px; padding-bottom: 8px; }
  .ib-mid { margin-bottom: 16px; }
  .ib-dock { gap: 10px; padding-top: 10px; padding-bottom: 12px; }
  .ib-right { padding-top: 12px; }
  .ib-side { gap: 26px; }
}
