/* Industry workbench — lives inside the same .app shell as chat (styles.css). */

.ir-shellbar{border-bottom:1px solid #f0f0f0;font-size:12px;color:#536278;letter-spacing:0}
.ir-shellbar .mode-switch{position:fixed;left:48.5%;top:10px;transform:translateX(-50%);z-index:21;width:427px;height:54px;display:grid;grid-template-columns:218px 209px;align-items:stretch;box-sizing:border-box;padding:0;overflow:hidden;border:1px solid #dedede;border-radius:27px;background:#f2f2f2;box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}
.ir-shellbar.mode-switch-bar.is-hidden .mode-switch{transform:translate(-50%,calc(-100% - 10px))}
.ir-shellbar.mode-switch-bar{flex-basis:78px;height:78px;min-height:78px;background:#fff}
.ir-shellbar .mode-switch-item{min-width:0;box-sizing:border-box;height:53px;padding:0 18px;border-radius:26.5px;color:#777;font-size:25px;font-weight:400;line-height:1.2}
.ir-shellbar .mode-switch-item.is-active{color:#171717;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.08),0 2px 5px rgba(0,0,0,.14)}
.ir-shellbar .ir-icon-button{width:28px;height:28px;padding:4px;flex-basis:28px;font-size:16px}
.ir-shell-divider{margin:0 12px;color:#a4aebb}.ir-shell-spacer{flex:1}.ir-icon-button{display:inline-grid;place-items:center;width:32px;height:32px;padding:6px;border:1px solid #dfe5ed;border-radius:4px;background:#fff;color:#506078;cursor:pointer;flex:0 0 32px}.ir-icon-button svg{width:18px;height:18px}.ir-icon-button:hover{background:#edf2f9}.ir-icon-button:focus-visible{outline:2px solid #3970cd;outline-offset:2px}
.ir-research-inputs{font-size:12px;margin-top:10px}.ir-research-inputs summary{cursor:pointer;color:#536278}.ir-research-inputs[hidden]{display:none}.ir-input-template{font-size:11px;color:#3262b8;margin-left:auto}
.app.ir-sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}.app.ir-sidebar-collapsed>.sidebar{visibility:hidden;padding:0;overflow:hidden;border:0}.app.ir-composer-collapsed .composer-wrap{display:none!important}.app.ir-report-focus .ir-about-fab{display:none}.app.ir-customer-focus .ir-stream{padding:0;gap:0;overflow-x:hidden}.app.ir-customer-focus .ir-stream>*{max-width:100%;min-width:0}.app.ir-customer-focus .ir-stream>.ir-say-user{margin:14px 24px;max-width:900px}.app.ir-customer-focus .ir-trace{margin:12px 24px}.app.ir-customer-focus .ir-report-complete{display:none}.app.ir-customer-focus .ir-customer-report{border:0;border-radius:0;margin:0;box-shadow:none;background:#fff;max-width:100%;min-width:0}.app.ir-customer-focus .ir-customer-report>.ir-report-card-head{padding:12px 24px;background:#fff;border-bottom:1px solid #e3e8ef;gap:10px}.app.ir-customer-focus .ir-customer-report>.ir-report-card-body{padding:0;max-width:100%;min-width:0}.app.ir-customer-focus .ir-report-card-title{font-size:12px;overflow-wrap:anywhere}.app.ir-report-focus .composer-wrap{max-height:48vh;overflow:auto}.app.ir-report-focus .composer{border-radius:6px}.app.ir-report-focus .ir-report-card-actions{flex-wrap:wrap}
@media(max-width:760px){.app:has(.ir-shellbar){grid-template-columns:0 minmax(0,1fr)}.app:has(.ir-shellbar)>.sidebar{position:fixed;z-index:20;left:0;top:56px;bottom:0;height:calc(100% - 56px);width:min(280px,85%);background:#f8fafc;box-shadow:8px 0 24px #2430441a}.app.ir-sidebar-collapsed>.sidebar{display:none}.ir-shellbar{padding:8px 48px}.ir-shellbar .mode-switch-item{width:auto;min-width:0;padding:10px 16px;font-size:17px}.app.ir-customer-focus .ir-report-card-head{flex-wrap:wrap;padding:10px 16px}.app.ir-customer-focus .ir-report-card-title{width:100%}.app.ir-report-focus .composer-wrap{max-height:58vh}.ir-research-inputs{font-size:11px}}

.ir-project-loading-state { display: none; padding: 32px 20px; color: var(--muted); }
.app:has(.ir-shellbar)>.workspace{grid-column:2}body:has(.ir-report-focus)>.ir-about-fab{display:none}
.app.ir-customer-focus .ir-stream>*{width:100%;max-width:100%;min-width:0}.app.ir-customer-focus .ir-customer-report{overflow:visible;max-width:100%;min-width:0}.app:has(.ir-shellbar)>.sidebar{display:flex}.app.ir-sidebar-collapsed>.sidebar{visibility:hidden}
@media(max-width:860px){.app:has(.ir-shellbar){grid-template-columns:0 minmax(0,1fr)}.app:has(.ir-shellbar)>.sidebar{position:fixed;z-index:20;left:0;top:56px;bottom:0;height:calc(100% - 56px);width:min(280px,85%);background:#f8fafc;box-shadow:8px 0 24px #2430441a}.app.ir-sidebar-collapsed>.sidebar{display:none}}
.ir-project-loading .ir-project-loading-state { display: block; }
.ir-project-loading #irWelcome,
.ir-project-loading #stream { display: none; }
.ir-project-loading .composer-wrap { visibility: hidden; }

.ir-side-status {
  margin-top: 8px;
  padding: 0 10px;
  font-size: 11px;
  color: var(--muted);
  min-height: 16px;
}
.ir-side-status:empty { display: none; }

.ir-capwarn {
  font-size: 12px; padding: 6px 10px; border-radius: 8px; margin-top: 8px;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
}

/* Bid package inside composer */
.ir-bidpkg { margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--input-c); border-radius: 8px; }
.ir-bidpkg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.ir-bidpkg-title { font-weight: 600; color: var(--ink); }
.ir-bidpkg-kind { color: var(--muted); }
.ir-bidpkg-hint { color: var(--muted); font-size: 11px; }
.ir-bidpkg-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ir-bidpkg-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ir-bidpkg-kindtag { padding: 1px 6px; border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.ir-bidpkg-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ir-bidpkg-warn { color: #92400e; font-size: 11px; }
.ir-bidpkg-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.ir-bidpkg-del:hover { color: #dc2626; }
.ir-mapping, .ir-customer-outputs { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ir-mapping-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.ir-mapping-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; margin-bottom: 8px; }
.ir-mapping-field { min-width: 0; font-size: 11px; color: var(--muted); }
.ir-mapping-field span { display: block; margin-bottom: 3px; }
.ir-mapping-field select { width: 100%; min-width: 0; padding: 5px 6px; border: 1px solid var(--input-c); border-radius: 6px; background: var(--panel); color: var(--ink); font-size: 12px; }
.ir-mapping-field.is-missing select { border-color: #d97706; }
.ir-mapping-error { margin: 6px 0; color: #b91c1c; font-size: 11px; }
.ir-output-download { border: 0; background: none; color: var(--link); cursor: pointer; padding: 2px 0; font-size: 12px; text-align: left; }
.ir-output-download:hover { text-decoration: underline; }

/* Console: between stream and composer */
.ir-console-dock {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--panel);
  display: flex; flex-direction: column;
}
.ir-console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px 0 4px;
  min-height: 34px;
  background: var(--surface-soft);
}
.ir-console-toggle {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border: 0; background: transparent;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left;
}
.ir-console-toggle:hover { color: var(--muted); }
.ir-console-chevron {
  margin-left: 2px; font-size: 10px; color: var(--muted);
  transition: transform .15s ease;
}
.ir-console-dock[data-open="true"] .ir-console-chevron { transform: rotate(180deg); }
.ir-console-dock[data-open="false"] .ir-console { display: none; }
.ir-console {
  height: 140px; overflow: auto; padding: 6px 12px;
  font-family: ui-monospace, monospace; font-size: 11px; line-height: 1.5;
  background: #0f172a; color: #cbd5e1;
}
.ir-console-dock.has-alert .ir-console-toggle .ir-hint { color: #b45309; font-weight: 600; }
.ir-clog { white-space: pre-wrap; word-break: break-word; }
.ir-clog .ts { color: #64748b; margin-right: 6px; }
.ir-clog.info .msg { color: #cbd5e1; }
.ir-clog.warn .msg { color: #fbbf24; }
.ir-clog.error .msg { color: #f87171; font-weight: 600; }
.ir-clog.phase .msg { color: #38bdf8; }

.ir-hint { font-weight: 400; font-size: 11px; color: var(--muted); }
.ir-badge {
  display: inline-block; min-width: 18px; text-align: center;
  padding: 1px 7px; border-radius: 10px; background: var(--accent);
  color: var(--primary-foreground); font-size: 11px; font-weight: 600;
}
.ir-filter { padding: 3px 6px; border: 1px solid var(--input-c); border-radius: 6px; font-size: 12px; }
.ir-mini-btn { padding: 3px 10px; border: 1px solid var(--input-c); border-radius: 6px; background: var(--panel); cursor: pointer; font-size: 12px; }
.ir-mini-btn:hover { background: var(--surface-soft); }
.ir-mini-btn:disabled { opacity: .45; cursor: not-allowed; }
.ir-empty { color: var(--muted); font-size: 13px; }
@keyframes ir-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Composer number inputs inside pills */
.composer .pill input[type="number"] {
  width: 44px; border: 0; background: transparent; font: inherit; font-size: 12px;
  padding: 0; outline: none;
}
.main:has(.ir-streamview) .composer {
  width: min(1000px, 100%);
}

@media (max-width: 720px) {
  .ir-mapping-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Drawer ---- */
.ir-drawer {
  position: fixed; top: 0; right: 0; width: 420px; max-width: 90vw; height: 100vh;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .2s; z-index: 40;
  display: flex; flex-direction: column;
}
.ir-drawer.open { transform: translateX(0); }
.ir-drawer-head { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ir-drawer-head .evidence-close { margin-left: auto; }
.ir-drawer-body { flex: 1; overflow: auto; padding: 14px; font-size: 13px; }
.ir-field { margin-bottom: 12px; }
.ir-field label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.ir-field textarea, .ir-field input, .ir-field select {
  width: 100%; box-sizing: border-box; padding: 6px 8px;
  border: 1px solid var(--input-c); border-radius: 6px; font-family: var(--font); font-size: 13px;
}
.ir-prov { font-size: 12px; }
.ir-prov a { color: var(--link); cursor: pointer; text-decoration: underline; display: block; margin: 2px 0; }
.ir-save { margin-top: 8px; padding: 6px 14px; border: none; border-radius: 6px; background: var(--accent); color: var(--primary-foreground); cursor: pointer; }

/* ---- Stream (chat-scroll analogue) ---- */
.ir-streamview {
  flex: 1; min-height: 0; min-width: 0; max-width: 100%; overflow: hidden;
  display: flex; flex-direction: column;
}
.ir-streamview.is-welcome {
  overflow: hidden;
}
.ir-streamview.is-welcome .ir-stream { display: none; }
.ir-streamview:not(.is-welcome) .ir-welcome { display: none; }
html.ir-project-loading .main.is-landing .ir-streamview {
  justify-content: center;
}
/*
 * Scroll container must NOT shrink its children (flex-shrink:0 on kids),
 * otherwise the last cards / report sit below the fold with no way to reach them.
 * Match chat-scroll: full-width scroller, centered content column.
 */
.ir-stream {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.ir-stream > * {
  flex: 0 0 auto;
  width: min(1000px, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ir-welcome { margin: 0; width: min(720px, 100%); }

/* Floating continue-research chip: out of document flow so the report can go edge-to-edge. */
.ir-request-rail {
  position: absolute;
  right: 16px;
  bottom: 28px;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px 8px 8px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: #fff;
  color: #243044;
  font: 600 13px/1 var(--font);
  letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ir-request-rail:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}
.ir-request-rail:focus-visible {
  outline: 2px solid #3970cd;
  outline-offset: 2px;
}
.ir-request-rail-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  transition: transform .2s ease;
}
.app:not(.ir-composer-collapsed) .ir-request-rail-mark {
  transform: rotate(45deg);
}
.ir-request-rail.is-idle-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
@media (prefers-reduced-motion: reduce) {
  .ir-request-rail,
  .ir-request-rail-mark { transition: none; }
}

.ir-seed-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ir-seed-group + .ir-seed-group { margin-top: 12px; }
.ir-seed-group-title {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* narration lines */
.ir-say { display: flex; gap: 8px; align-items: flex-start; line-height: 1.55; }
.ir-say-run { font-size: 14px; color: var(--ink); }
.ir-say-run .ir-say-text { font-weight: 500; }
.ir-say-phase { font-size: 12.5px; color: var(--muted); padding-left: 4px; }
.ir-say-who {
  flex: none; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: var(--accent); color: var(--primary-foreground);
}
.ir-say-user {
  flex-direction: column; align-items: flex-end; gap: 4px;
}
.ir-say-user .ir-say-who {
  background: var(--surface-soft); color: var(--muted); font-weight: 500;
}
.ir-say-user .ir-say-text {
  max-width: min(720px, 100%);
  background: var(--surface-soft); border: 1px solid var(--line);
  border-radius: 12px 12px 4px 12px; padding: 10px 14px;
  font-size: 13.5px; white-space: pre-wrap; word-break: break-word;
}

/* agent cards in the stream */
.ir-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--panel); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}

.ir-card.queued {
  display: none;
}
.ir-card-head { display: flex; align-items: center; gap: 8px; }
.ir-card-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.ir-card-name { font-weight: 600; font-size: 13px; }
.ir-card-status { margin-left: auto; font-size: 11px; color: var(--muted); }
.ir-card-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ir-card-steps { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.ir-card-step { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.ir-card.running { border-color: #2563eb; background: #eff6ff; }
.ir-card.running .ir-card-dot { background: #2563eb; animation: ir-pulse 1s infinite; }
.ir-card.done { border-color: #16a34a; box-shadow: 0 0 0 1px #16a34a33; }
.ir-card.done .ir-card-dot { background: #16a34a; }
.ir-card.skipped { opacity: .55; }
.ir-card.skipped .ir-card-dot { background: #d97706; }
.ir-card-arts { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ir-card-art { font-size: 11px; font-family: ui-monospace, monospace; color: var(--ink); cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.ir-card-art:hover { background: var(--surface-soft); }
.ir-card-art.empty { color: var(--muted); cursor: default; }
.ir-card-art a.ir-art-ext { color: #2563eb; text-decoration: none; }
.ir-card-art a.ir-art-ext:hover { text-decoration: underline; }

/* Process trace — collapsed by default once the report is in. */
.ir-trace {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.ir-trace-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}
.ir-trace-title { font-weight: 600; font-size: 13px; }
.ir-trace-head .ir-report-card-actions { margin-left: auto; }
.ir-trace-body {
  display: none;
  padding: 12px;
  flex-direction: column;
  gap: 12px;
}
.ir-trace.open .ir-trace-body { display: flex; }
.ir-trace-body > * { width: 100%; box-sizing: border-box; }

/* popped-up final report card */
.ir-report-card { border: 1px solid #16a34a; border-radius: 10px; background: var(--panel); overflow: hidden; }
.ir-report-card-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #ecfdf5; border-bottom: 1px solid var(--line);
}
.ir-report-card-title { font-weight: 600; font-size: 13px; }
.ir-report-card-actions { margin-left: auto; display: flex; gap: 6px; }
.ir-report-output-actions { display: flex; gap: 6px; }
.ir-report-card-body { display: none; padding: 16px 18px; }
.ir-report-card.open .ir-report-card-body { display: block; }
.ir-report-card-body .ir-md { font-size: 13px; line-height: 1.6; color: var(--ink); }
.ir-report-card-body .ir-md h1 { font-size: 16px; margin: 0 0 10px; }
.ir-report-card-body .ir-md h2 { font-size: 14px; margin: 16px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.ir-report-card-body .ir-md h3 { font-size: 13px; margin: 12px 0 4px; color: var(--ink); }
.ir-report-card-body .ir-md h4, .ir-report-card-body .ir-md h5 { font-size: 12px; margin: 10px 0 4px; color: var(--muted); }
.ir-report-card-body .ir-md p { margin: 6px 0; }
.ir-report-card-body .ir-md h2,
.ir-report-card-body .ir-md h3,
.ir-report-card-body .ir-md h4,
.ir-report-card-body .ir-md h5 {
  margin: 20px 0 0;
  padding: 10px 14px;
  border: 1px solid #86efac;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #ecfdf5;
  color: #166534;
  font-size: 13px;
  font-weight: 700;
}
.ir-report-card-body .ir-md h2 + p,
.ir-report-card-body .ir-md h3 + p,
.ir-report-card-body .ir-md h4 + p,
.ir-report-card-body .ir-md h5 + p {
  margin: 0 0 16px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 0 0 6px 6px;
  background: #fff;
  color: #475569;
  line-height: 1.75;
}
.ir-complete-report-action {
  display: flex;
  justify-content: center;
  margin: 28px 0 4px;
  padding: 22px 0 6px;
  border-top: 1px solid var(--line);
}
.ir-complete-report-cta {
  min-width: 148px;
  border: 1px solid #16a34a;
  border-radius: 6px;
  background: #16a34a;
  color: #fff;
  padding: 9px 16px;
  font: 600 13px/1 var(--font);
  cursor: pointer;
}
.ir-complete-report-cta:hover { background: #15803d; }
.ir-report-card-body .ir-md ul, .ir-report-card-body .ir-md ol { margin: 6px 0; padding-left: 22px; }
.ir-report-card-body .ir-md li { margin: 3px 0; }
.ir-report-card-body .ir-md li > ul, .ir-report-card-body .ir-md li > ol { margin: 3px 0; }
.ir-report-card-body .ir-md a { color: #2563eb; text-decoration: none; }
.ir-report-card-body .ir-md a:hover { text-decoration: underline; }
.ir-report-card-body .ir-md a.ir-art-ref {
  font-family: ui-monospace, monospace; font-size: 0.92em;
  cursor: pointer;
}
.ir-report-card-body .ir-md code { background: var(--surface-soft); padding: 1px 4px; border-radius: 3px; font-size: 12px; font-family: ui-monospace, monospace; }
.ir-report-card-body .ir-md blockquote {
  margin: 8px 0; padding: 6px 12px;
  border-left: 3px solid #16a34a; background: var(--surface-soft);
  border-radius: 0 6px 6px 0; color: var(--ink);
}
.ir-report-card-body .ir-md blockquote p { margin: 4px 0; }
.ir-report-card-body .ir-md .md-table-wrap {
  overflow: auto;
  max-width: 100%;
  max-height: min(70vh, 560px);
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
}
.ir-report-card-body .ir-md .md-table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
.ir-report-card-body .ir-md .md-table-wrap::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 8px;
}
.ir-report-card-body .ir-md .md-table-wrap::-webkit-scrollbar-track {
  background: var(--surface-soft);
  border-radius: 0 0 10px 10px;
}
.ir-report-card-body .ir-md .md-table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.ir-report-card-body .ir-md .md-table th,
.ir-report-card-body .ir-md .md-table td {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.ir-report-card-body .ir-md .md-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-soft);
  font-weight: 650;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.ir-report-card-body .ir-md .md-table th:first-child,
.ir-report-card-body .ir-md .md-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--panel);
  box-shadow: 1px 0 0 var(--line);
  z-index: 1;
}
.ir-report-card-body .ir-md .md-table th:first-child {
  z-index: 3;
  background: var(--surface-soft);
}
.ir-report-card-body .ir-md .md-table tbody tr:last-child td { border-bottom: 0; }
.ir-report-card-body .ir-md .md-table tbody tr:hover td { background: var(--surface-soft); }
.ir-report-card-body .ir-md .md-table tbody tr:hover td:first-child { background: var(--surface-soft); }

/* ---- About / product help ---- */
.ir-about-fab {
  position: fixed;
  right: 0;
  top: 42%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: #2563eb;
  color: #fff;
  font: 700 13px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 8px 22px oklch(0.45 0.18 264 / 42%);
  animation: ir-fab-ring 1.8s ease-out 3;
}
.ir-about-fab-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  font: italic 700 16px/1 Georgia, "Times New Roman", serif;
}
.ir-about-fab-label { letter-spacing: 0.04em; }
.ir-about-fab:hover { background: #1d4ed8; }
@keyframes ir-fab-ring {
  0% { box-shadow: 0 0 0 0 oklch(0.55 0.2 264 / 50%), 0 8px 22px oklch(0.45 0.18 264 / 42%); }
  70% { box-shadow: 0 0 0 14px oklch(0.55 0.2 264 / 0%), 0 8px 22px oklch(0.45 0.18 264 / 42%); }
  100% { box-shadow: 0 0 0 0 oklch(0.55 0.2 264 / 0%), 0 8px 22px oklch(0.45 0.18 264 / 42%); }
}

/* --------------------------------------------------------------------------
 * Focused Deep Research timeline
 * Keep the product surface calm: research is primary, runtime tuning is not.
 * ----------------------------------------------------------------------- */
.main:has(.ir-streamview) .controls,
.main:has(.ir-streamview) .ir-console-dock,
.ir-about-fab {
  display: none !important;
}

/* Compact optional research files: the composer + is the picker; show chips only. */
.main:has(.ir-streamview) #bidPkg .ir-bidpkg-head {
  display: none;
}
.main:has(.ir-streamview) #bidPkg:not(:has(.ir-bidpkg-item)) {
  display: none;
}

.main:has(.ir-streamview) .composer-wrap {
  padding-top: 10px;
  padding-bottom: 14px;
}

.main:has(.ir-streamview) .composer {
  width: min(1160px, 100%);
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .07);
}

.main.is-landing:has(.ir-streamview) .composer {
  width: min(720px, 100%);
  border-radius: 28px;
  padding: 12px 16px 10px;
  box-shadow: 0 8px 28px oklch(0.145 0 0 / 8%);
}

.main.is-landing:has(.ir-streamview) .composer-wrap {
  padding-top: 8px;
  padding-bottom: 28px;
}

.main:has(.ir-streamview) .composer textarea {
  min-height: 42px;
  max-height: 120px;
  padding: 10px 4px 4px;
  line-height: 1.45;
}

.main:has(.ir-streamview) .attach-btn {
  height: calc(10px + 1.45em);
}

.main:has(.ir-streamview) .composer .actions {
  margin-top: 4px;
}

.ir-stream {
  gap: 0;
  padding-top: 34px;
}

.ir-stream > * {
  width: min(1280px, 100%);
}

.ir-expert-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px 18px;
  margin-top: 6px;
  border-bottom: 1px solid var(--line);
}

.ir-expert-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f8f3;
  color: #078d69;
  border: 1px solid #bce8da;
  font-size: 15px;
  font-weight: 700;
}

.ir-expert-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ir-expert-copy strong {
  font-size: 17px;
  letter-spacing: -.01em;
}

.ir-worked {
  color: var(--muted);
  font-size: 12px;
}

.ir-say-plan {
  margin: 22px 0 18px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.ir-say-plan .ir-say-text {
  max-width: 860px;
}

.ir-todo {
  margin: 0 0 28px;
  border: 1px solid #e4e8ef;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.ir-todo-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid #edf0f4;
  background: #fafbfc;
}

.ir-todo-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ir-todo-head strong {
  color: var(--ink);
  font-size: 14px;
}

.ir-todo-head span,
.ir-todo-count {
  color: #7b8495;
  font-size: 11.5px;
}

.ir-todo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  align-items: stretch;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 16px 18px;
}

.ir-todo-item {
  position: relative;
  min-width: 0;
  border: 1px solid #e7ebf1;
  border-radius: 12px;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.ir-todo-item:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 25px;
  left: 100%;
  width: 13px;
  height: 1px;
  background: #dfe4eb;
}

.ir-todo-item.open {
  border-color: #cfd9e8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

.ir-todo-item.running {
  border-color: #b9d4fb;
}

.ir-todo-row {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: 9px;
  row-gap: 4px;
  padding: 13px 12px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ir-todo-row:hover {
  background: #fafbfc;
}

.ir-todo-mark {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid #d9dee7;
  border-radius: 50%;
  background: #fff;
  color: #8b94a6;
  font-size: 11px;
  font-weight: 650;
}

.ir-todo-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ir-todo-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #2f3746;
  font-size: 12.5px;
  font-weight: 620;
}

.ir-todo-copy > span {
  display: none;
}

.ir-todo-status {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  color: #8b94a6;
  font-size: 11.5px;
  text-align: left;
}

.ir-todo-stage {
  border-top: 1px solid #edf0f4;
}

.ir-todo-task-panel {
  display: none;
  padding: 16px 18px 18px;
}

.ir-todo-task-panel.active {
  display: block;
  animation: ir-progress-enter .42s cubic-bezier(.22, 1, .36, 1) both;
}

.ir-todo-detail-inner {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  background: #fafbfc;
}

.ir-todo-item.running .ir-todo-mark {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .06);
}

.ir-todo-item.running .ir-todo-status {
  color: #2563eb;
  font-weight: 600;
}

.ir-todo-item.running .ir-todo-copy strong {
  color: #1d4ed8;
}

.ir-todo-item.done .ir-todo-mark {
  border-color: #a7e3cf;
  background: #ecfdf5;
  color: #059669;
}

.ir-todo-item.done .ir-todo-copy strong,
.ir-todo-item.done .ir-todo-copy > span {
  color: #8a938f;
}

.ir-todo-item.done .ir-todo-status {
  color: #059669;
}

.ir-todo-item.skipped {
  opacity: .65;
}

.ir-say-user {
  margin-bottom: 12px;
}

.ir-card {
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.ir-card-head {
  min-height: 42px;
  padding: 0 6px;
  gap: 8px;
  cursor: pointer;
  border-radius: 8px;
}

.ir-card-head:hover {
  background: var(--surface-soft);
}

.ir-task-icon {
  color: #94a3b8;
  font-size: 13px;
}

.ir-task-create,
.ir-task-number {
  color: #8b93a5;
  font-size: 12px;
}

.ir-card-name {
  font-size: 13px;
  font-weight: 600;
}

.ir-card-status {
  margin-left: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}

.ir-card.running .ir-card-status {
  color: #2563eb;
  background: #eff6ff;
}

.ir-card.done .ir-card-status {
  color: #059669;
  background: #ecfdf5;
}

.ir-card-toggle {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  transition: transform .15s ease;
}

.ir-card.open .ir-card-toggle {
  transform: rotate(180deg);
}

.ir-card-body {
  margin: 2px 8px 10px 30px;
  padding: 18px 20px;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  background: #fafbfc;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-width: 0;
  transition:
    max-height .7s cubic-bezier(.22, 1, .36, 1),
    opacity .35s ease,
    transform .55s ease,
    padding .55s ease,
    margin .55s ease,
    border-width .1s linear .45s;
}

.ir-card.open .ir-card-body {
  max-height: 2400px;
  opacity: 1;
  transform: translateY(0);
  padding-top: 18px;
  padding-bottom: 18px;
  margin-top: 2px;
  margin-bottom: 10px;
  border-width: 1px;
  transition:
    max-height .75s cubic-bezier(.22, 1, .36, 1),
    opacity .35s ease .08s,
    transform .5s ease,
    padding .5s ease,
    margin .5s ease,
    border-width .1s linear;
}

.ir-card.collapsing .ir-card-head {
  background: #f7faf9;
}

.ir-task-section + .ir-task-section {
  margin-top: 14px;
}

.ir-task-label {
  display: block;
  margin-bottom: 5px;
  color: #687084;
  font-size: 12px;
  font-weight: 600;
}

.ir-card-objective {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.ir-card-meta {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}

.ir-card-steps {
  margin-top: 8px;
  gap: 6px;
}

.ir-progress-window {
  position: relative;
  scroll-behavior: smooth;
}

.ir-progress-window.is-scrollable {
  max-height: 390px;
  overflow-y: auto;
  padding-right: 8px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  border-bottom: 1px solid #eef1f5;
}

.ir-progress-window.is-scrollable::-webkit-scrollbar {
  width: 6px;
}

.ir-progress-window.is-scrollable::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.ir-progress-window.is-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.ir-card-step {
  position: relative;
  padding-left: 14px;
  color: #667085;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.55;
}

.ir-card-step::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
}

.ir-card-step a {
  color: #2563eb;
  text-decoration: none;
}

.ir-card-step a:hover {
  text-decoration: underline;
}

.ir-progress-enter {
  animation: ir-progress-enter .42s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes ir-progress-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.ir-card-arts {
  margin-top: 12px;
  padding-top: 10px;
}

.ir-card-art {
  font-family: var(--font);
  line-height: 1.55;
}

.ir-card.running,
.ir-card.done {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ir-phase-summary,
.ir-todo-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 2px 2px 14px 36px;
  padding: 14px 16px;
  border-left: 3px solid #10b981;
  border-radius: 0 8px 8px 0;
  background: #f4fbf8;
  color: #384152;
  font-size: 13px;
  line-height: 1.65;
  animation: ir-progress-enter .5s cubic-bezier(.22, 1, .36, 1) both;
}

.ir-phase-summary strong,
.ir-todo-summary strong {
  color: #087a5b;
  font-size: 13px;
}

.ir-todo-summary[hidden] {
  display: none;
}

.ir-todo-summary {
  margin: 0 12px 12px;
  padding: 10px 11px;
  font-size: 11.5px;
  line-height: 1.55;
}

.ir-todo-summary strong {
  font-size: 11.5px;
}

.ir-todo-item:not(.open) .ir-todo-summary span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ir-report-complete {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0 10px;
  padding: 14px 16px;
  border-left: 3px solid #10b981;
  background: #f4fbf8;
  color: #556071;
  font-size: 12.5px;
  line-height: 1.6;
  animation: ir-progress-enter .5s cubic-bezier(.22, 1, .36, 1) both;
}

.ir-report-complete strong {
  color: #087a5b;
  font-size: 14px;
}

.ir-report-card {
  margin-top: 8px;
  border-color: #d7e8e1;
}

.ir-report-card-head {
  padding: 13px 16px;
  background: #f1faf6;
}

.ir-report-card-body {
  padding: 24px 28px 40px;
}

.ir-report-card-body .ir-md {
  max-width: 780px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.75;
}

@media (max-width: 760px) {
  .ir-task-create { display: none; }
  .ir-card-body { margin-left: 6px; padding: 14px; }
  .ir-report-card-body { padding: 18px 14px 30px; }
  .ir-todo-head > div > span { display: none; }
  .ir-todo-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }
  .ir-todo-task-panel { padding: 12px; }
  .ir-todo-detail-inner,
  .ir-todo-summary { margin-left: 0; }
}
.ir-about {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.ir-about[hidden] { display: none; }
.ir-about-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.145 0 0 / 35%);
}
.ir-about-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(84vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.ir-about-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.ir-about-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ir-about-body {
  overflow: auto;
  padding: 16px 20px 22px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
}
.ir-about-lead { font-size: 14.5px; line-height: 1.6; margin-top: 0; }
.ir-about-body h3 {
  margin: 18px 0 8px;
  font-size: 13.5px;
  font-weight: 700;
}
.ir-about-body p { margin: 8px 0; }
.ir-about-body ul { margin: 8px 0; padding-left: 1.2em; }
.ir-about-body li { margin: 4px 0; }
.ir-about-table-wrap { overflow: auto; margin: 10px 0 12px; }
.ir-about-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ir-about-table th,
.ir-about-table td {
  border: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}
.ir-about-table th { background: var(--surface-soft); font-weight: 650; }
.ir-continuation{margin:16px 0;padding:16px;border:1px solid #d8dee8;border-left:4px solid #e1251b;background:#fff;border-radius:6px}
.ir-continuation-q{font-weight:700;color:#1f2937;margin-bottom:8px}.ir-continuation-status{font-size:13px;color:#6b7280;margin-bottom:8px}
.ir-continuation-answer{white-space:pre-wrap;line-height:1.7;color:#252b36}.ir-continuation-sources,.ir-continuation-applied{margin-top:10px;font-size:12px;color:#667085}
.ir-continuation-preview{margin-top:12px;padding:10px 12px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:5px;font-size:12px}
.ir-continuation-location{margin-top:8px}.ir-continuation-location>span{margin-left:8px;color:#98a2b3}.ir-continuation-location ul{margin:5px 0 0;padding-left:18px}.ir-continuation-location li{margin:3px 0}.ir-continuation-location li div{color:#475467;margin-top:2px}
.ir-continuation-location-link{margin-left:8px;border:0;background:transparent;color:#2563eb;padding:0;cursor:pointer;font-size:12px}.ir-continuation-location-link:hover{text-decoration:underline}
