/* ivr-engine-fusion.css — the Engine Fusion sub-tab of 03 ENGINE (ADR ENGINE_FUSION §8).
   Repo-only. Every rule is scoped under #engine-sub-fusion or the return chip
   #ivr-ef-return, so the file is inert when the feature is off or uninstalled.
   No 'v13-' in any id or class (v13-hot-reload purges those). No animation.
   Colours come from style.css's theme variables (dark default, light-mode
   overrides there), with the dark values as fallbacks. */

#engine-sub-fusion {
  flex: 0 0 auto;
  padding: 10px 14px 28px;
  color: var(--text-1, #b8c0d0);
  font-family: var(--sans, 'Segoe UI', sans-serif);
  font-size: 12px;
  line-height: 1.5;
}
#engine-sub-fusion .ivr-ef { max-width: 1400px; }

#engine-sub-fusion .ivr-ef-title {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border, #1e2a42);
}
#engine-sub-fusion .ivr-ef-name {
  font-family: var(--mono, monospace); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--amber, #ffaa00);
}
#engine-sub-fusion .ivr-ef-sub { color: var(--text-2, #7080a0); font-size: 11px; }
#engine-sub-fusion .ivr-ef-link { color: var(--blue, #00a8ff); text-decoration: none; cursor: pointer; }
#engine-sub-fusion .ivr-ef-link:hover { text-decoration: underline; }
#engine-sub-fusion .ivr-ef-dim { color: var(--text-3, #4a5670); }
#engine-sub-fusion .ivr-ef-small { font-size: 11px; }
#engine-sub-fusion code {
  font-family: var(--mono, monospace); font-size: 10.5px;
  color: var(--cyan, #00ddcc); background: transparent;
}

/* header: issuer, run, capture as-of, producer, mapping, reading */
#engine-sub-fusion .ivr-ef-head {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 4px 14px; padding: 8px 10px; margin-bottom: 8px;
  background: var(--surface-0, #0d1220);
  border: 1px solid var(--border, #1e2a42); border-radius: 6px;
}
#engine-sub-fusion .ivr-ef-kv { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
#engine-sub-fusion .ivr-ef-k {
  font-family: var(--mono, monospace); font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3, #4a5670);
  margin-right: 6px; white-space: nowrap;
}
#engine-sub-fusion .ivr-ef-v {
  font-family: var(--mono, monospace); font-size: 11px; color: var(--text-0, #eef0f4);
  overflow: hidden; text-overflow: ellipsis;
}
#engine-sub-fusion .ivr-ef-select {
  background: var(--bg-2, #0f1628); color: var(--text-1, #b8c0d0);
  border: 1px solid var(--border-2, #2a3860); border-radius: 3px;
  font-family: var(--mono, monospace); font-size: 10px; max-width: 100%;
}

/* status words and badges */
#engine-sub-fusion .ivr-ef-st { font-family: var(--mono, monospace); font-weight: 700; text-transform: uppercase; font-size: 10px; }
#engine-sub-fusion .ivr-ef-st-ready { color: var(--green, #00cc88); }
#engine-sub-fusion .ivr-ef-st-partial { color: var(--amber, #ffaa00); }
#engine-sub-fusion .ivr-ef-st-unavailable,
#engine-sub-fusion .ivr-ef-st-error { color: var(--red, #ff3344); }
#engine-sub-fusion .ivr-ef-badge {
  display: inline-block; padding: 0 6px; margin-left: 4px; border-radius: 3px;
  font-family: var(--mono, monospace); font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  border: 1px solid currentColor;
}
#engine-sub-fusion .ivr-ef-badge-stale { color: var(--red, #ff3344); }
#engine-sub-fusion .ivr-ef-badge-current { color: var(--green, #00cc88); }
#engine-sub-fusion .ivr-ef-badge-unknown { color: var(--text-2, #7080a0); }

/* persistent banners */
#engine-sub-fusion .ivr-ef-banner {
  margin: 6px 0; padding: 6px 10px; border-radius: 4px;
  font-family: var(--mono, monospace); font-size: 11px; font-weight: 700;
  border-left: 3px solid currentColor; background: var(--surface-1, #141c30);
}
#engine-sub-fusion .ivr-ef-banner-draft { color: var(--amber, #ffaa00); }
#engine-sub-fusion .ivr-ef-banner-ok { color: var(--green, #00cc88); }
#engine-sub-fusion .ivr-ef-banner-off { color: var(--red, #ff3344); }

/* actions, progress, status */
#engine-sub-fusion .ivr-ef-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
#engine-sub-fusion .ivr-ef-btn {
  font-family: var(--mono, monospace); font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 3px; cursor: pointer;
  color: var(--text-1, #b8c0d0); background: var(--bg-3, #131b30);
  border: 1px solid var(--border-2, #2a3860);
}
#engine-sub-fusion .ivr-ef-btn:hover:not([disabled]) { border-color: var(--blue, #00a8ff); color: var(--text-0, #eef0f4); }
#engine-sub-fusion .ivr-ef-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
#engine-sub-fusion .ivr-ef-primary { color: var(--amber, #ffaa00); border-color: var(--amber-dim, #7a5000); }
#engine-sub-fusion .ivr-ef-warn { color: var(--red, #ff3344); border-color: var(--red-dim, #7a1020); }
#engine-sub-fusion .ivr-ef-mini { padding: 0 6px; margin-left: 4px; }
#engine-sub-fusion .ivr-ef-progress {
  min-height: 14px; font-family: var(--mono, monospace); font-size: 10px; color: var(--blue, #00a8ff);
}
#engine-sub-fusion .ivr-ef-status { min-height: 14px; font-size: 11px; color: var(--text-1, #b8c0d0); margin-bottom: 6px; }
#engine-sub-fusion .ivr-ef-notice {
  margin: 8px 0; padding: 10px 12px; border-radius: 4px;
  background: var(--surface-0, #0d1220); border: 1px dashed var(--border-2, #2a3860);
  color: var(--text-1, #b8c0d0);
}
#engine-sub-fusion .ivr-ef-issues { margin: 6px 0; font-size: 11px; }
#engine-sub-fusion .ivr-ef-issues ul { margin: 4px 0 0 16px; padding: 0; }

/* panes */
#engine-sub-fusion .ivr-ef-pane {
  margin: 8px 0; border: 1px solid var(--border, #1e2a42); border-radius: 6px;
  background: rgba(255, 255, 255, 0.015);
}
#engine-sub-fusion .ivr-ef-pane > summary {
  cursor: pointer; padding: 6px 10px;
  font-family: var(--mono, monospace); font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2, #7080a0);
}
#engine-sub-fusion .ivr-ef-pane[open] > summary { color: var(--text-0, #eef0f4); border-bottom: 1px solid var(--border, #1e2a42); }
#engine-sub-fusion .ivr-ef-body { padding: 8px 10px; overflow-x: auto; }
#engine-sub-fusion .ivr-ef-na { color: var(--text-3, #4a5670); font-style: italic; padding: 4px 0; }
#engine-sub-fusion .ivr-ef-foot { margin-top: 8px; font-size: 10.5px; color: var(--text-3, #4a5670); }
#engine-sub-fusion .ivr-ef-hypo {
  margin: 2px 0 8px; padding: 5px 8px; border-left: 3px solid var(--violet, #8866ff);
  font-family: var(--mono, monospace); font-size: 10.5px; font-weight: 700; color: var(--violet, #8866ff);
}

#engine-sub-fusion .ivr-ef-phase {
  padding: 6px 0 8px; border-bottom: 1px solid var(--border, #1e2a42);
}
#engine-sub-fusion .ivr-ef-phase:last-of-type { border-bottom: none; }
#engine-sub-fusion .ivr-ef-phase-h { font-weight: 600; color: var(--text-0, #eef0f4); margin-bottom: 3px; }
#engine-sub-fusion .ivr-ef-ph {
  display: inline-block; min-width: 26px; text-align: center; margin-right: 4px;
  font-family: var(--mono, monospace); font-size: 10px; font-weight: 700;
  color: var(--bg-0, #080c14); background: var(--amber, #ffaa00); border-radius: 3px;
}
#engine-sub-fusion .ivr-ef-line { margin: 2px 0; }
#engine-sub-fusion .ivr-ef-ul { margin: 2px 0 2px 16px; padding: 0; }
#engine-sub-fusion .ivr-ef-sub > summary { cursor: pointer; font-size: 10.5px; color: var(--text-2, #7080a0); }
#engine-sub-fusion .ivr-ef-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* the seven warrant categories */
#engine-sub-fusion .ivr-ef-bins { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 4px; }
#engine-sub-fusion .ivr-ef-bin {
  font-family: var(--mono, monospace); font-size: 10px; padding: 1px 6px; border-radius: 3px;
  border: 1px solid var(--border-1, #243050); color: var(--text-3, #4a5670);
}
#engine-sub-fusion .ivr-ef-bin b { color: var(--text-1, #b8c0d0); margin-right: 3px; }
#engine-sub-fusion .ivr-ef-bin-supported { color: var(--green, #00cc88); border-color: var(--green-dim, #006640); }
#engine-sub-fusion .ivr-ef-bin-contested { color: var(--red, #ff3344); border-color: var(--red-dim, #7a1020); }
#engine-sub-fusion .ivr-ef-bin-conditional { color: var(--amber, #ffaa00); border-color: var(--amber-dim, #7a5000); }

/* tables */
#engine-sub-fusion .ivr-ef-t { border-collapse: collapse; width: 100%; font-size: 11px; margin: 4px 0; }
#engine-sub-fusion .ivr-ef-t th {
  text-align: left; font-family: var(--mono, monospace); font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em; color: var(--text-3, #4a5670);
  border-bottom: 1px solid var(--border-1, #243050); padding: 3px 6px;
}
#engine-sub-fusion .ivr-ef-t td { border-bottom: 1px solid var(--border, #1e2a42); padding: 3px 6px; vertical-align: top; }
#engine-sub-fusion .ivr-ef-num { font-family: var(--mono, monospace); text-align: right; white-space: nowrap; }
#engine-sub-fusion .ivr-ef-cell-A { color: var(--text-0, #eef0f4); }
#engine-sub-fusion .ivr-ef-cell-L { color: var(--text-2, #7080a0); }
#engine-sub-fusion .ivr-ef-cell-E { color: var(--text-4, #2e3850); }

/* the fixed return chip after a drill-down */
#ivr-ef-return {
  position: fixed; right: 18px; bottom: 18px; z-index: 9000;
  font-family: var(--mono, monospace); font-size: 11px; font-weight: 700;
  padding: 6px 12px; border-radius: 4px; cursor: pointer;
  color: var(--amber, #ffaa00); background: var(--bg-2, #0f1628);
  border: 1px solid var(--amber-dim, #7a5000);
}

html.light-mode #engine-sub-fusion .ivr-ef-pane { background: rgba(0, 0, 0, 0.02); }
