.ime-cutover {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ime-handoff-page {
  max-width: 1480px;
}

.ime-hero,
.ime-env-strip,
.ime-metric,
.ime-queue,
.ime-lookup-panel,
.ime-readiness__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ime-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-left: 4px solid var(--brass);
}

.ime-hero__copy {
  min-width: 0;
  max-width: 780px;
}

.ime-hero__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ime-hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.08;
  color: var(--text-1);
}

.ime-hero p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

.ime-hero__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ime-hero__actions .ime-inline-form {
  display: inline-flex;
}

.ime-env-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.ime-env-strip__item {
  padding: 12px 14px;
  border-right: 1px solid var(--border-lo);
}

.ime-env-strip__item:last-child {
  border-right: 0;
}

.ime-env-strip__item span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-env-strip__item strong {
  display: block;
  min-width: 0;
  color: var(--text-1);
  font-size: 13px;
}

.ime-env-strip__item small {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}

.ime-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.ime-state.is-success {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.ime-state.is-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #a16207;
}

.ime-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ime-metrics--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ime-metric {
  position: relative;
  min-height: 116px;
  padding: 13px 13px 12px;
  overflow: hidden;
}

.ime-metrics--compact .ime-metric {
  min-height: 96px;
}

.ime-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--border);
}

.ime-metric.is-danger::before {
  background: #dc2626;
}
.ime-metric.is-warning::before {
  background: #f59e0b;
}
.ime-metric.is-success::before {
  background: #16a34a;
}

.ime-metric__label {
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-metric__value {
  margin-top: 8px;
  color: var(--text-1);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.ime-metric__detail {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.35;
}

.ime-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.ime-workspace__main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.ime-queue {
  border-left: 4px solid var(--border);
  overflow: hidden;
}

.ime-queue.is-danger {
  border-left-color: #dc2626;
}
.ime-queue.is-warning {
  border-left-color: #f59e0b;
}
.ime-queue.is-success {
  border-left-color: #16a34a;
}

.ime-queue__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 13px;
  border-bottom: 1px solid var(--border-lo);
}

.ime-queue__eyebrow {
  margin-bottom: 4px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-queue h2 {
  margin: 0;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}

.ime-queue p {
  max-width: 860px;
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}

.ime-count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-lo);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 800;
}

.ime-table-wrap {
  overflow-x: auto;
}

.ime-table {
  min-width: 760px;
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.ime-table--dashboard,
.ime-table--compare,
.ime-table--handoff,
.ime-table--candidates,
.ime-table--missing,
.ime-table--webhooks,
.ime-table--snapshot {
  table-layout: fixed;
}

.ime-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-lo);
  background: var(--surface-lo);
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.ime-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-lo);
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.4;
  vertical-align: top;
}

.ime-table tbody tr:hover {
  background: rgba(184, 146, 74, 0.045);
}

.ime-table tbody tr:last-child td {
  border-bottom: 0;
}

.ime-table--dashboard th:nth-child(1),
.ime-table--dashboard td:nth-child(1) {
  width: 17%;
}

.ime-table--dashboard th:nth-child(2),
.ime-table--dashboard td:nth-child(2) {
  width: 19%;
}

.ime-table--dashboard th:nth-child(3),
.ime-table--dashboard td:nth-child(3) {
  width: 13%;
}

.ime-table--dashboard th:nth-child(4),
.ime-table--dashboard td:nth-child(4) {
  width: 21%;
}

.ime-table--dashboard th:nth-child(5),
.ime-table--dashboard td:nth-child(5) {
  width: 20%;
}

.ime-table--snapshot th:nth-child(1),
.ime-table--snapshot td:nth-child(1) {
  width: 20%;
}

.ime-table--snapshot th:nth-child(2),
.ime-table--snapshot td:nth-child(2) {
  width: 12%;
}

.ime-table--snapshot th:nth-child(3),
.ime-table--snapshot td:nth-child(3) {
  width: 40%;
}

.ime-table--snapshot th:nth-child(4),
.ime-table--snapshot td:nth-child(4) {
  width: 28%;
}

.ime-table--compare th:nth-child(1),
.ime-table--compare td:nth-child(1) {
  width: 18%;
}

.ime-table--compare th:nth-child(2),
.ime-table--compare td:nth-child(2),
.ime-table--compare th:nth-child(3),
.ime-table--compare td:nth-child(3) {
  width: 18%;
}

.ime-table--compare th:nth-child(4),
.ime-table--compare td:nth-child(4) {
  width: 27%;
}

.ime-table--compare th:nth-child(5),
.ime-table--compare td:nth-child(5) {
  width: 19%;
}

.ime-table--handoff th:nth-child(1),
.ime-table--handoff td:nth-child(1) {
  width: 16%;
}

.ime-table--handoff th:nth-child(2),
.ime-table--handoff td:nth-child(2) {
  width: 19%;
}

.ime-table--handoff th:nth-child(3),
.ime-table--handoff td:nth-child(3) {
  width: 15%;
}

.ime-table--handoff th:nth-child(4),
.ime-table--handoff td:nth-child(4),
.ime-table--handoff th:nth-child(5),
.ime-table--handoff td:nth-child(5) {
  width: 13%;
}

.ime-table--handoff th:nth-child(6),
.ime-table--handoff td:nth-child(6) {
  width: 24%;
}

.ime-table--candidates th:nth-child(1),
.ime-table--candidates td:nth-child(1) {
  width: 12%;
}

.ime-table--candidates th:nth-child(2),
.ime-table--candidates td:nth-child(2) {
  width: 14%;
}

.ime-table--candidates th:nth-child(3),
.ime-table--candidates td:nth-child(3) {
  width: 22%;
}

.ime-table--candidates th:nth-child(4),
.ime-table--candidates td:nth-child(4) {
  width: 16%;
}

.ime-table--candidates th:nth-child(5),
.ime-table--candidates td:nth-child(5) {
  width: 22%;
}

.ime-table--candidates th:nth-child(6),
.ime-table--candidates td:nth-child(6) {
  width: 14%;
}

.ime-table--missing th:nth-child(1),
.ime-table--missing td:nth-child(1),
.ime-table--missing th:nth-child(2),
.ime-table--missing td:nth-child(2) {
  width: 14%;
}

.ime-table--missing th:nth-child(3),
.ime-table--missing td:nth-child(3) {
  width: 35%;
}

.ime-table--missing th:nth-child(4),
.ime-table--missing td:nth-child(4) {
  width: 22%;
}

.ime-table--missing th:nth-child(5),
.ime-table--missing td:nth-child(5) {
  width: 15%;
}

.ime-table--webhooks th:nth-child(1),
.ime-table--webhooks td:nth-child(1) {
  width: 20%;
}

.ime-table--webhooks th:nth-child(2),
.ime-table--webhooks td:nth-child(2) {
  width: 12%;
}

.ime-table--webhooks th:nth-child(3),
.ime-table--webhooks td:nth-child(3) {
  width: 32%;
}

.ime-table--webhooks th:nth-child(4),
.ime-table--webhooks td:nth-child(4) {
  width: 20%;
}

.ime-table--webhooks th:nth-child(5),
.ime-table--webhooks td:nth-child(5) {
  width: 16%;
}

.ime-table__actions {
  min-width: 110px;
  text-align: right;
}

.ime-signal {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ime-signal__dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--border);
  flex: 0 0 auto;
}

.ime-signal__dot.is-danger {
  background: #dc2626;
}
.ime-signal__dot.is-warning {
  background: #f59e0b;
}
.ime-signal__dot.is-success {
  background: #16a34a;
}

.ime-signal strong,
.ime-link-strong {
  display: block;
  color: var(--text-1);
  font-weight: 800;
}

.ime-signal span,
.ime-muted-line {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
}

.ime-copy {
  display: block;
  color: var(--text-2);
}

.ime-code-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}

.ime-status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.ime-status-pill.is-success {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.ime-status-pill.is-info {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.ime-status-pill.is-danger {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

.ime-status-pill.is-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #a16207;
}

.ime-status-pill.is-neutral {
  background: var(--surface-hi);
  color: var(--text-2);
}

.ime-action-stack {
  display: inline-flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.ime-inline-form {
  display: inline;
  margin: 0;
}

.ime-action-stack .ime-inline-form {
  display: inline-flex;
}

.ime-resource-key {
  display: block;
  color: var(--text-1);
  font-weight: 800;
}

.ime-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-hi);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 800;
}

.ime-check-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ime-check-option {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.35;
}

.ime-check-option input {
  margin-top: 2px;
}

.ime-apply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-lo);
  background: var(--surface-lo);
}

.ime-apply-bar span {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.4;
}

.ime-lookup-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 16px;
}

.ime-lookup-panel__copy h2 {
  margin: 0;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}

.ime-lookup-panel__copy p {
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}

.ime-lookup-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 100px 100px auto;
  gap: 9px;
  align-items: end;
}

.ime-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.ime-field span {
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-field .search-input-inline {
  width: 100%;
}

.ime-job-id-input {
  width: 82px;
}

.ime-link-form {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.ime-empty {
  margin: 14px 16px 16px;
  padding: 13px 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-lo);
  color: var(--text-2);
  font-size: 12px;
}

.ime-empty.is-compact {
  margin: 0;
  padding: 10px;
}

.ime-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.ime-mode {
  min-width: 0;
  border: 1px solid var(--border-lo);
  border-radius: 8px;
  background: var(--surface-lo);
}

.ime-mode header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-lo);
}

.ime-mode h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.2;
}

.ime-mode header span {
  color: var(--text-3);
  font-size: 11px;
}

.ime-mode__rows {
  display: flex;
  flex-direction: column;
}

.ime-mode-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-lo);
  font-size: 11px;
}

.ime-mode-row:last-child {
  border-bottom: 0;
}

.ime-mode-row strong,
.ime-mode-row span,
.ime-mode-row a {
  display: block;
}

.ime-mode-row span {
  margin-top: 3px;
  color: var(--text-3);
}

.ime-mode-row div:last-child {
  text-align: right;
}

.ime-readiness {
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ime-readiness__panel {
  padding: 14px;
}

.ime-readiness__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ime-readiness__header span,
.ime-readiness__panel h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 800;
}

.ime-readiness__header strong {
  color: var(--brass-lo);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-readiness__score {
  margin: 13px 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-lo);
}

.ime-readiness__score strong {
  display: block;
  color: var(--text-1);
  font-size: 30px;
  line-height: 1;
}

.ime-readiness__score span {
  display: block;
  margin-top: 6px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.35;
}

.ime-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ime-checklist__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
}

.ime-checklist__item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-hi);
  color: var(--text-3);
  font-size: 10px;
}

.ime-checklist__item.is-success i {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.ime-checklist__item.is-warning i {
  background: rgba(245, 158, 11, 0.14);
  color: #a16207;
}

.ime-checklist__item.is-info i {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.ime-steps {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
}

.ime-steps li + li {
  margin-top: 6px;
}

.ime-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 14px;
  align-items: start;
}

.ime-dashboard-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.ime-dashboard-drawer {
  min-width: 0;
}

.ime-readiness--drawer {
  top: 76px;
}

#ime_dashboard_panel {
  display: block;
}

/* Settings tab — a plain stacked page, deliberately NOT .ime-workspace (the
   cockpit feed grid collapses panels outside the Live context). */
.ime-settings-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  overflow-y: auto;
  min-height: 0;
}

.ime-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.ime-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border-lo);
}

.ime-panel__header h2 {
  margin: 0;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}

.ime-panel__header p,
.ime-panel__lead {
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}

.ime-panel__body {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 14px;
}

.ime-panel-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.06);
  color: #b91c1c;
  font-size: 12px;
}

.ime-panel-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--border-lo);
  border-radius: 8px;
  background: var(--surface-lo);
}

.ime-panel-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ime-panel-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border-lo);
  border-radius: 8px;
  background: var(--surface-lo);
}

.ime-panel-summary > div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--border-lo);
}

.ime-panel-summary > div:last-child {
  border-right: 0;
}

.ime-panel-summary span,
.ime-panel-summary small {
  display: block;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-panel-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text-1);
  font-size: 12px;
}

.ime-mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ime-mini-metrics div {
  padding: 10px;
  border: 1px solid var(--border-lo);
  border-radius: 8px;
  background: var(--surface-lo);
}

.ime-mini-metrics span {
  display: block;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-mini-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--text-1);
  font-size: 22px;
  line-height: 1;
}

.ime-panel-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ime-panel-section h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 800;
}

.ime-panel-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ime-candidate-card,
.ime-diff-card,
.ime-audit-card,
.ime-panel-callout {
  padding: 11px;
  border: 1px solid var(--border-lo);
  border-radius: 8px;
  background: var(--surface-lo);
}

.ime-candidate-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ime-candidate-card__main {
  display: flex;
  min-width: 0;
  gap: 9px;
}

.ime-diff-card header,
.ime-audit-card header,
.ime-panel-callout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.ime-panel-callout {
  align-items: center;
}

.ime-panel-callout.is-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.ime-panel-callout strong,
.ime-panel-callout span,
.ime-audit-card code,
.ime-audit-card a,
.ime-candidate-card strong {
  display: block;
}

.ime-diff-card dl,
.ime-kv {
  display: grid;
  grid-template-columns: minmax(96px, 0.34fr) minmax(0, 1fr);
  gap: 7px 10px;
  margin: 9px 0 0;
}

.ime-diff-card dt,
.ime-kv dt {
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ime-diff-card dd,
.ime-kv dd {
  min-width: 0;
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ime-json {
  max-height: 260px;
  overflow: auto;
  border-radius: 8px;
  font-size: 11px;
}

.ime-panel-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ime-panel-actions form {
  margin: 0;
}

@media (max-width: 1180px) {
  .ime-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ime-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .ime-lookup-panel {
    grid-template-columns: 1fr;
  }

  .ime-workspace {
    grid-template-columns: 1fr;
  }

  .ime-readiness {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 760px) {
  .ime-hero {
    flex-direction: column;
  }

  .ime-hero__actions {
    justify-content: flex-start;
  }

  .ime-env-strip,
  .ime-metrics,
  .ime-mode-grid,
  .ime-lookup-form,
  .ime-panel-summary,
  .ime-mini-metrics,
  .ime-panel-form__row {
    grid-template-columns: 1fr;
  }

  .ime-panel-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--border-lo);
  }

  .ime-panel-summary > div:last-child {
    border-bottom: 0;
  }

  .ime-candidate-card,
  .ime-panel-callout {
    flex-direction: column;
  }

  .ime-apply-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .ime-lookup-panel {
    padding: 14px;
  }

  .ime-env-strip__item {
    border-right: 0;
    border-bottom: 1px solid var(--border-lo);
  }

  .ime-env-strip__item:last-child {
    border-bottom: 0;
  }

  .ime-table {
    min-width: 900px;
  }
}

/* ═══════════════════════════════════════════
   IME HUB — toolbar + live feed
═══════════════════════════════════════════ */

/* Toolbar */
.ime-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.ime-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 120ms,
    color 120ms;
  white-space: nowrap;
}

.ime-tab:hover {
  background: var(--surface-hi);
  color: var(--text-1);
}

.ime-tab.is-active {
  background: var(--brass-pill);
  color: var(--brass-lo);
  box-shadow: inset 0 0 0 1px rgba(184, 146, 74, 0.22);
}

.ime-tab i {
  font-size: 11px;
}

/* Live feed panel */
.ime-feed-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.ime-feed-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-lo);
  background: var(--surface-lo);
}

.ime-feed-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ime-feed-panel__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

#ime_live_feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  font-family: var(--font-mono);
}

/* Individual feed row */
.ime-feed-row {
  display: grid;
  grid-template-columns: 68px 36px minmax(0, 1fr) 108px 52px;
  align-items: center;
  gap: 0 10px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border-lo);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.3;
}

.ime-feed-row:last-child {
  border-bottom: 0;
}

.ime-feed-row.is-parked {
  opacity: 0.42;
}

.ime-feed-row__time {
  color: var(--text-3);
  white-space: nowrap;
}

.ime-feed-row__dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono);
  text-transform: uppercase;
  white-space: nowrap;
}

.ime-feed-row__dir.is-in {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.ime-feed-row__dir.is-out {
  background: rgba(184, 146, 74, 0.13);
  color: var(--brass-lo);
}

.ime-feed-row__label {
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ime-feed-row__wo {
  color: var(--info);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.ime-feed-row__wo a {
  color: var(--info);
  text-decoration: none;
}

.ime-feed-row__wo a:hover {
  text-decoration: underline;
}

.ime-feed-row__status {
  text-align: right;
  white-space: nowrap;
}

.ime-feed-row__status.is-ok {
  color: var(--s-complete);
}

.ime-feed-row__status.is-err {
  color: var(--danger);
  font-weight: 700;
}

.ime-feed-row__status.is-muted {
  color: var(--text-3);
}

/* Attention strip */
.ime-attention-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 13px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--r-md);
  background: rgba(220, 38, 38, 0.04);
}

.ime-attention-strip__label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-right: 4px;
}

/* Funnel strip */
.ime-funnel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.ime-funnel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-lo);
  background: var(--surface-lo);
}

.ime-funnel__title {
  color: var(--text-1);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ime-funnel__link {
  color: var(--info);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.ime-funnel__link:hover {
  text-decoration: underline;
}

.ime-funnel__cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ime-funnel__cell {
  padding: 13px 6px 11px;
  text-align: center;
  border-right: 1px solid var(--border-lo);
}

.ime-funnel__cell:last-child {
  border-right: 0;
}

.ime-funnel__val {
  display: block;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}

.ime-funnel__cell.is-brass .ime-funnel__val {
  color: var(--brass-lo);
}

.ime-funnel__key {
  display: block;
  margin-top: 5px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Cockpit grid */
.ime-cockpit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.ime-cockpit-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Drift inspector (slim side panel) */
.ime-drift-panel {
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ime-drift-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.ime-drift-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-lo);
  background: var(--surface-lo);
}

.ime-drift-card__title {
  color: var(--text-1);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ime-drift-card__body {
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ime-drift-card__wo {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}

.ime-drift-card__meta {
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.4;
}

.ime-drift-card__action-text {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.ime-drift-card__evidence {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-hi);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 200px;
  color: var(--text-2);
}

.ime-drift-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ime-drift-card__empty {
  padding: 12px 13px;
  color: var(--text-3);
  font-size: 12px;
}

.ime-feed-empty {
  padding: 24px 16px;
  color: var(--text-3);
  font-size: 12px;
  font-family: var(--font-mono);
  text-align: center;
}

@media (max-width: 1100px) {
  .ime-cockpit-grid {
    grid-template-columns: 1fr;
  }

  .ime-drift-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .ime-toolbar {
    flex-wrap: wrap;
  }

  .ime-funnel__cells {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ime-funnel__cell:nth-child(4) {
    border-right: 0;
  }

  .ime-funnel__cell:nth-child(5),
  .ime-funnel__cell:nth-child(6),
  .ime-funnel__cell:nth-child(7) {
    border-top: 1px solid var(--border-lo);
  }

  .ime-feed-row {
    grid-template-columns: 60px 20px minmax(0, 1fr) 80px;
  }
}

/* ═══════════════════════════════════════════
   IME HUB — information-first cockpit stack
═══════════════════════════════════════════ */

/* Vertical stack replacing the old cockpit-grid */
.ime-cockpit-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Health board ── */
.ime-health-board {
  display: flex;
  flex-direction: column;
}

.ime-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-lo);
}

.ime-health-row:last-child {
  border-bottom: 0;
}

.ime-health-row__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ime-health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border);
}

.ime-health-dot.is-success {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.ime-health-dot.is-danger {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.ime-health-dot.is-warning {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.ime-health-dot.is-info {
  background: var(--info);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.ime-health-dot.is-neutral {
  background: var(--text-3);
}

.ime-health-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ime-health-row__label {
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
}

.ime-health-row__detail {
  color: var(--text-2);
  font-size: 12px;
  font-family: var(--font-mono);
}

.ime-health-row__state {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  color: var(--text-3);
}

.ime-health-row__state.is-success {
  color: var(--s-complete);
}
.ime-health-row__state.is-danger {
  color: var(--danger);
}
.ime-health-row__state.is-warning {
  color: var(--warning-text);
}
.ime-health-row__state.is-info {
  color: var(--info);
}

/* ── Needs you ── */
.ime-needsyou-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  color: var(--text-3);
  font-size: 13px;
}

.ime-needsyou-empty i {
  color: var(--s-complete);
  font-size: 14px;
}

.ime-needsyou-list {
  display: flex;
  flex-direction: column;
}

.ime-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-lo);
}

.ime-action-row:last-child {
  border-bottom: 0;
}

.ime-action-row__icon {
  flex-shrink: 0;
  font-size: 14px;
  width: 16px;
  text-align: center;
  color: var(--text-3);
}

.ime-action-row.is-danger .ime-action-row__icon {
  color: var(--danger);
}
.ime-action-row.is-warning .ime-action-row__icon {
  color: var(--warning-text);
}
.ime-action-row.is-info .ime-action-row__icon {
  color: var(--info);
}
.ime-action-row.is-success .ime-action-row__icon {
  color: var(--s-complete);
}

.ime-action-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ime-action-row__text {
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ime-action-row__detail {
  color: var(--text-2);
  font-size: 11px;
  font-family: var(--font-mono);
}

.ime-action-row__btn {
  flex-shrink: 0;
}

/* ── Live feed updates (narrator-driven row layout) ── */
.ime-feed-row {
  grid-template-columns: 68px 18px minmax(0, 1fr) 100px;
}

.ime-feed-row__icon {
  font-size: 11px;
  text-align: center;
}

.ime-feed-row.is-routine {
  opacity: 0.4;
}

/* Audit link in feed header */
.ime-feed-panel__audit-link {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ime-feed-panel__audit-link:hover {
  color: var(--text-2);
}

.ime-feed-panel__audit-link i {
  font-size: 10px;
}

/* Feed footer (routine count + raw link) */
.ime-feed-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border-lo);
  background: var(--surface-lo);
  color: var(--text-3);
  font-size: 11px;
  font-family: var(--font-mono);
}

/* Pulsing live dot (replaces old static dot) */
.ime-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: ime-pulse 2s ease-in-out infinite;
}

@keyframes ime-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(22, 163, 74, 0);
  }
}

/* ── Funnel one-liner ── */
.ime-funnel-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
}

.ime-funnel-line__copy {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ime-funnel-line__copy strong {
  color: var(--text-1);
  font-weight: 700;
}

.ime-funnel-line__sold {
  color: var(--brass-lo) !important;
}

/* ── Mission Control cockpit additions ───────────────────────── */
.ime-cockpit-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  margin: 0;
}
.ime-cockpit-h__count {
  color: var(--text-3);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.ime-cockpit-h__note {
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
  border-radius: var(--r-sm);
  padding: 2px 8px;
}

.ime-action-row__actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.ime-inline-btn {
  display: inline;
  margin: 0;
}

.ime-scorecard {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 16px 14px 6px;
  overflow-x: auto;
}
.ime-score-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 78px;
  padding: 4px 6px;
}
.ime-score-count {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}
.ime-score-node.is-sold .ime-score-count {
  color: var(--brass-lo);
}
.ime-score-stage {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-top: 5px;
}
.ime-score-conn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 88px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}
.ime-score-rate {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--s-visit);
}
.ime-score-time {
  font-size: 9.5px;
  color: var(--text-3);
  margin-top: 2px;
  cursor: help;
  white-space: nowrap;
}
.ime-score-footer {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border-lo);
  font-size: 12px;
  color: var(--text-2);
}
.ime-score-footer strong {
  color: var(--text-1);
}
.ime-score-warn {
  color: var(--warning-text) !important;
}
.ime-score-star {
  color: var(--text-3);
}

.ime-store-board {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  gap: 7px;
}
.ime-store-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.ime-store-label {
  min-width: 96px;
  color: var(--text-2);
  font-family: var(--font-mono);
}
.ime-store-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-hi);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.ime-store-bar span {
  display: block;
  height: 100%;
  background: var(--brass);
  border-radius: var(--r-pill);
}
.ime-store-count {
  min-width: 28px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-1);
}
.ime-store-gap {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-top: 1px solid var(--border-lo);
  font-size: 11.5px;
  color: var(--text-2);
}
.ime-store-gap strong {
  color: var(--warning-text);
}
.ime-feed-panel__sub {
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  text-transform: none;
  margin-left: 4px;
}

/* ════════════════ IME OPERATIONS CONSOLE ════════════════ */
/* The cutover console fills the viewport so the feed + rail scroll internally.
   .view-scroll is a flex item in the app shell; making it a flex COLUMN lets
   .ime-console fill it via flex-grow. height:100% would NOT resolve here (the
   percentage needs a definite ancestor height), which left the feed at content
   height with blank space below it (2026-06-26 half-height-feed bug). */
.app-body[data-page="lowes-ime-cutover"] .view-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ime-console {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* The turbo-frame wraps the active view; make it the growing region so the live
   console fills the height (internal scroll), while tall tool panels scroll here. */
.ime-console > #ime_dashboard_panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Command bar — the instrument header */
.ime-cmdbar {
  background: #12223a;
  border-bottom: 1px solid #0d1a2e;
  color: #e8eef6;
  overflow: hidden;
}
.ime-cmdbar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 13px 18px;
}
.ime-cmdbar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.ime-cmdbar__wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}
.ime-cmdbar__pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b7a8f;
  flex-shrink: 0;
}
.ime-cmdbar__pulse.is-live {
  background: #7ee0a8;
  animation: ime-pulse 2.2s infinite;
}
@keyframes ime-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(126, 224, 168, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(126, 224, 168, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 224, 168, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ime-cmdbar__pulse.is-live {
    animation: none;
  }
}
.ime-cmdbar__state {
  font-size: 12px;
  color: rgba(232, 238, 246, 0.62);
}
.ime-cmdbar__state strong {
  font-weight: 700;
}
.ime-cmdbar__state .is-on {
  color: #7ee0a8;
}
.ime-cmdbar__state .is-off {
  color: #e6b277;
}
.ime-cmdbar__dot {
  opacity: 0.4;
  margin: 0 3px;
}
.ime-cmdbar__vitals {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.ime-vital {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  line-height: 1.15;
}
.ime-vital:first-child {
  border-left: 0;
}
.ime-vital b {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.ime-vital i {
  font-size: 9.5px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(232, 238, 246, 0.5);
  margin-top: 2px;
}
.ime-vital.is-warn b {
  color: #f0c47a;
}
.ime-cmdbar__tabs {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
  overflow-x: auto;
}
.ime-cmdbar__tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(232, 238, 246, 0.62);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.ime-cmdbar__tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.ime-cmdbar__tab.is-active {
  color: #fff;
  border-bottom-color: var(--brass);
}
.ime-cmdbar__tab i {
  font-size: 12px;
  opacity: 0.85;
}

/* Workspace — feed master + triage rail in one surface */
.ime-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(420px, 38%, 560px);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  background: var(--surface);
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

/* Feed master — a flex column filling its (now definite-height) grid cell: the
   bar is a fixed header and .ime-feed__scroll grows to fill the rest and scrolls
   its own content, so the list region reaches the bottom of the screen even when
   there are only a few events (2026-06-26). */
.ime-feed {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.ime-feed__bar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-lo);
  background: var(--surface-lo);
  position: sticky;
  top: 0;
  z-index: 2;
}
.ime-feed__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
}
.ime-feed__right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.ime-feed__muted {
  font-size: 12px;
  color: var(--text-3);
}
.ime-feed__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brass-lo);
  text-decoration: none;
}
.ime-feed__link:hover {
  text-decoration: underline;
}
@media (pointer: coarse) {
  .ime-feed__link,
  .ime-tabset__tab,
  .ime-feed-row > summary,
  .ime-feed-row__panel a,
  #lowes-wo-card details > summary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .ime-feed__link,
  .ime-need__link {
    min-width: 44px;
    justify-content: center;
  }
  .ime-feed-row > summary {
    display: flex;
  }
}
.ime-feed__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.ime-feed-empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

/* Feed row — expandable <details> (overrides the old flat-row rules above) */
.ime-feed-row {
  display: block;
  padding: 0;
  border-bottom: 1px solid var(--border-lo);
  position: relative;
}
.ime-feed-row > summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}
.ime-feed-row > summary::-webkit-details-marker {
  display: none;
}
.ime-feed-row > summary:hover {
  background: rgba(184, 146, 74, 0.05);
}
.ime-feed-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}
.ime-feed-row.is-success::before {
  background: var(--success);
}
.ime-feed-row.is-danger::before {
  background: var(--danger);
}
.ime-feed-row.is-warning::before {
  background: var(--warning);
}
.ime-feed-row__dir {
  color: var(--text-3);
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.ime-feed-row.dir-inbound .ime-feed-row__dir {
  color: var(--s-visit);
}
.ime-feed-row__icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-2);
}
.ime-feed-row.is-success .ime-feed-row__icon {
  color: var(--s-complete);
}
.ime-feed-row.is-danger .ime-feed-row__icon {
  color: var(--danger);
}
.ime-feed-row.is-warning .ime-feed-row__icon {
  color: var(--warning-text);
}
.ime-feed-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ime-feed-row__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ime-feed-row__detail {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ime-feed-row__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ime-feed-row__wo {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  text-decoration: none;
}
a.ime-feed-row__wo:hover {
  color: var(--brass-lo);
  text-decoration: underline;
}
.ime-feed-row__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  min-width: 56px;
  text-align: right;
}
.ime-feed-row__caret {
  font-size: 10px;
  color: var(--text-3);
  transition: transform 0.15s ease;
}
.ime-feed-row[open] .ime-feed-row__caret {
  transform: rotate(180deg);
}
.ime-feed-row__panel {
  padding: 2px 16px 14px 41px;
  background: var(--surface-lo);
  border-top: 1px dashed var(--border-lo);
}
.ime-kv {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 10px 0;
}
.ime-kv div {
  display: flex;
  flex-direction: column;
}
.ime-kv dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.ime-kv dd {
  margin: 1px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-1);
  word-break: break-all;
}
.ime-payload {
  margin-top: 8px;
}
.ime-payload__tag {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: 3px;
}
.ime-payload pre {
  margin: 0;
  padding: 9px 11px;
  max-height: 240px;
  overflow: auto;
  background: #12223a;
  color: #cdd9e6;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ime-payload.is-error pre {
  background: #2a1414;
  color: #f0b3b3;
}

/* Triage rail */
.ime-rail {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  background: var(--surface);
}
.ime-rail__region {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.ime-rail__region:last-child {
  border-bottom: 0;
}
.ime-rail__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 15px 9px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.ime-rail__sub {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-3);
}
.ime-rail__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brass);
  color: #fff;
  font-size: 12px;
}
.ime-rail__flag {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10.5px;
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
  padding: 2px 7px;
  border-radius: var(--r-sm);
}
.ime-rail__empty {
  padding: 4px 15px 10px;
  color: var(--text-3);
  font-size: 12.5px;
}
.ime-rail__empty i {
  color: var(--s-complete);
  margin-right: 5px;
}

/* Need rows */
.ime-needslist {
  display: flex;
  flex-direction: column;
}
.ime-need {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 15px;
  border-top: 1px solid var(--border-lo);
}
.ime-need:first-child {
  border-top: 0;
}
.ime-need__icon {
  font-size: 12px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--warning-text);
}
.ime-need.is-danger .ime-need__icon {
  color: var(--danger);
}
.ime-need.is-info .ime-need__icon {
  color: var(--s-visit);
}
.ime-need__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ime-need__text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}
.ime-need__detail {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.35;
}
.ime-need__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.ime-need__btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  min-height: 32px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--brass-lo);
  color: #fff;
  border: 1px solid var(--brass-lo);
}
@media (pointer: coarse) {
  .ime-need__btn {
    min-height: 44px;
  }
}
.ime-need__btn.is-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.ime-need__btn:hover {
  filter: brightness(0.96);
}
.ime-need__btn.is-ghost:hover {
  background: var(--surface-hi);
  color: var(--text-1);
}
.ime-inline-btn {
  display: inline;
  margin: 0;
}

/* Scorecard tightened for the rail width */
.ime-rail .ime-scorecard {
  padding: 12px 12px 4px;
}
.ime-rail .ime-score-node {
  min-width: 52px;
}
.ime-rail .ime-score-count {
  font-size: 18px;
}
.ime-rail .ime-score-conn {
  min-width: 56px;
  padding-bottom: 16px;
}

@media (max-width: 1000px) {
  .ime-workspace {
    grid-template-columns: 1fr;
  }
  .ime-feed {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .ime-feed__scroll,
  .ime-rail {
    max-height: none;
  }
  .ime-cmdbar__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ime-cmdbar__vitals {
    width: 100%;
  }
  .ime-vital {
    flex: 1;
    align-items: flex-start;
    padding-left: 0;
    padding-right: 10px;
    border-left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
  }
}

/* ── Single header: IME tools + state + KPIs in the topbar control strip ── */
.topbar-controls:has(.ime-tabset) {
  gap: 16px;
  flex-wrap: wrap;
}
.ime-tabset {
  display: flex;
  gap: 2px;
}
.ime-tabset__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.ime-tabset__tab:hover {
  background: var(--surface-hi);
  color: var(--text-1);
}
.ime-tabset__tab.is-active {
  background: var(--brass-lo);
  color: #fff;
}
.ime-tabset__tab i {
  font-size: 11px;
  opacity: 0.85;
}
.ime-pc-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}
.ime-pc-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.ime-pc-state strong {
  font-weight: 700;
}
.ime-pc-state .is-on {
  color: var(--s-complete);
}
.ime-pc-state .is-off {
  color: var(--warning-text);
}
.ime-pc-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b6b0a4;
  flex-shrink: 0;
}
.ime-pc-pulse.is-live {
  background: var(--success);
  animation: ime-pulse 2.2s infinite;
}
.ime-pc-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}
.ime-pc-vital {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.ime-pc-vital b {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}
.ime-pc-vital.is-warn b {
  color: var(--warning-text);
}

/* ═══════════════════════════════════════════════════════════════════
   COCKPIT ELEVATION (2026-06-26) — funnel centerpiece, live-arrival
   flash, severity-led worklist, instrument vitals. Additive; built on
   the brass / IBM Plex Mono / Playfair system already in --tokens.
═══════════════════════════════════════════════════════════════════ */

/* ── Scorecard as a real tapering funnel (the analytics thesis) ── */
.ime-funnel {
  padding: 8px 4px 4px;
}
.ime-funnel__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.ime-funnel__bar {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  min-width: 30px;
  background: linear-gradient(
    90deg,
    rgba(184, 146, 74, 0.18),
    rgba(184, 146, 74, 0.07)
  );
  border-right: 2px solid rgba(184, 146, 74, 0.42);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  transform-origin: left center;
  animation: ime-funnel-fill 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes ime-funnel-fill {
  from {
    transform: scaleX(0.04);
    opacity: 0.3;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
.ime-funnel__stage.is-sold .ime-funnel__bar {
  background: linear-gradient(
    90deg,
    rgba(184, 146, 74, 0.32),
    rgba(184, 146, 74, 0.12)
  );
  border-right-color: var(--brass);
}
.ime-funnel__label {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.ime-funnel__stage.is-sold .ime-funnel__label {
  color: var(--brass-lo);
  font-weight: 700;
}
.ime-funnel__count {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.ime-funnel__stage.is-sold .ime-funnel__count {
  color: var(--brass-lo);
}
.ime-funnel__drop {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 14px;
}
.ime-funnel__drop::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: linear-gradient(var(--border), transparent);
}
.ime-funnel__pct {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brass-lo);
  font-variant-numeric: tabular-nums;
}
.ime-funnel__pct span {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.65;
  margin-left: 1px;
}
.ime-funnel__note {
  font-size: 12px;
  color: var(--text-3);
}

/* ── Live-arrival flash — only rows that stream in (ime_feed_controller) ── */
@keyframes ime-feed-flash {
  0% {
    background: rgba(184, 146, 74, 0.2);
  }
  100% {
    background: transparent;
  }
}
.ime-feed-row.is-fresh {
  animation: ime-feed-flash 1.9s ease-out;
}
.ime-feed-row.is-fresh::before {
  background: var(--brass);
  box-shadow: 0 0 8px rgba(184, 146, 74, 0.5);
}

/* ── Needs-you — a severity rail makes the queue scannable at a glance ── */
.ime-need {
  position: relative;
  padding-left: 17px;
}
.ime-need::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--warning);
}
.ime-need.is-danger::before {
  background: var(--danger);
}
.ime-need.is-info::before {
  background: var(--s-visit);
}

/* ── Instrument vitals — warn states read as lit gauges ── */
.ime-pc-vital.is-warn {
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: rgba(245, 158, 11, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .ime-funnel__bar,
  .ime-feed-row.is-fresh {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Design pass (2026-07-06) — the two-party tape.
   One bold device: every tape row declares WHO is talking. Lowe's blue
   (#004990, their brand blue) = inbound; Skipper's brass = outbound; red
   is reserved for failure alone. Everything around it is quiet
   discipline: the age is the triage number on a finding card, one primary
   action per card, four instruments in the header. Appended last on
   purpose — equal-specificity overrides of the blocks above.
   ═══════════════════════════════════════════════════════════════════════ */

.ime-console {
  --ime-lowes: #004990;
  --ime-lowes-ink: #1a5fa8;
  --ime-lowes-soft: rgba(0, 73, 144, 0.09);
  --ime-skipper: #b8924a;
  --ime-skipper-ink: #8a6d33;
  --ime-skipper-soft: rgba(184, 146, 74, 0.12);
}

/* — Direction lanes: the row edge names the speaker; failure outranks — */
.ime-feed-row.dir-inbound::before {
  background: var(--ime-lowes);
  opacity: 0.7;
}
.ime-feed-row.dir-outbound::before {
  background: var(--ime-skipper);
  opacity: 0.7;
}
.ime-feed-row.is-danger::before {
  background: var(--danger);
  opacity: 1;
}
.ime-feed-row.is-danger > summary {
  background: rgba(220, 38, 38, 0.045);
}
.ime-feed-row.is-danger > summary:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* IN/OUT chips (markup renders text, not an icon) */
.ime-feed-row__dir {
  flex-shrink: 0;
  width: 34px;
  padding: 3px 0;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: center;
  color: var(--text-3);
  background: rgba(0, 0, 0, 0.04);
}
.ime-feed-row.dir-inbound .ime-feed-row__dir {
  background: var(--ime-lowes-soft);
  color: var(--ime-lowes-ink);
}
.ime-feed-row.dir-outbound .ime-feed-row__dir {
  background: var(--ime-skipper-soft);
  color: var(--ime-skipper-ink);
}
.ime-feed-row.is-danger .ime-feed-row__dir {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

/* Routine chatter recedes so decisions read at a squint */
.ime-feed-row.is-routine > summary {
  opacity: 0.55;
}
.ime-feed-row.is-routine > summary:hover {
  opacity: 1;
}

/* — Needs-you: the age is the triage number — */
.ime-need__age {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-3);
  background: rgba(0, 0, 0, 0.045);
}
.ime-need.is-danger .ime-need__age {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

/* Quiet secondary actions: Resolve stays a button; Ack/Compare are links */
.ime-need__link {
  display: inline-flex;
  align-items: center;
  padding: 3px 4px;
  min-height: 32px;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none;
  cursor: pointer;
}
@media (pointer: coarse) {
  .ime-need__link {
    min-height: 44px;
  }
}
.ime-need__link:hover {
  color: var(--text-1);
  text-decoration: underline;
}

@media (max-width: 760px) {
  .ime-need {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ime-need__icon {
    grid-column: 1;
    grid-row: 1;
  }
  .ime-need__body {
    grid-column: 2;
    grid-row: 1;
  }
  .ime-need__age {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
  .ime-need__actions {
    grid-column: 2;
    grid-row: 3;
    margin-top: 2px;
  }
}

/* — Header instruments: numbers readable across the room — */
.ime-pc-vital b {
  font-size: 14px;
}
