/* Motori del PC (engines.js): installazione con la barra, motore pronto, errore vero con «Riprova» e registro.
   Colori del brand: blu #2F6BFF → azzurro #38BDF8 per l'avanzamento, menta per il pronto; chiaro e scuro dai token. */
.eng { display: grid; gap: .3rem; min-width: 0; max-width: 34rem; padding: .55rem .7rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.35; }
.ai-st + .eng { margin-top: .4rem; }
.eng small, .ai-tbl td .eng small { display: block; margin: 0; color: var(--muted); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.eng-h { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; }
.eng-h b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.eng-h svg { width: var(--ic-sm); height: var(--ic-sm); flex: none; }
.eng-run { border-color: color-mix(in srgb, #2f6bff 32%, var(--line)); background: color-mix(in srgb, #2f6bff 6%, var(--surface)); }
.eng-run .eng-h b { font-variant-numeric: tabular-nums; }
.eng-bar { display: block; height: .42rem; border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, #2f6bff 14%, var(--surface-3, var(--surface-2))); }
.eng-bar i { display: block; height: 100%; min-width: .42rem; border-radius: inherit;
  background: linear-gradient(90deg, #2f6bff, #38bdf8); transition: width .6s ease; }
.eng-spin { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; flex: none;
  border: 2px solid color-mix(in srgb, #38bdf8 28%, transparent); border-top-color: #2f6bff; animation: eng-spin .9s linear infinite; }
.eng-ko { border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.eng-ko .eng-h svg { color: var(--danger); }
.eng-ko .eng-why { color: var(--ink-2); }
.eng-todo b { color: var(--ink); font-weight: 600; }
.eng-miss { border-style: dashed; }
.eng-miss .eng-h svg { color: var(--accent); }
.eng-ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.eng-ok .eng-h svg, .eng-ok .eng-h b { color: var(--ok); }
.eng-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: .15rem; min-width: 0; }
.eng-acts button { display: inline-flex; align-items: center; gap: .35rem; }
.eng-acts button svg { width: var(--ic-xs); height: var(--ic-xs); }
.eng-log { min-width: 0; flex: 1 1 12rem; }
.eng-log summary { cursor: pointer; font-size: var(--fs-xs); color: var(--accent); font-weight: 600; }
.eng-log pre { margin: .35rem 0 0; max-height: 12rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: var(--fs-2xs)/1.45 var(--mono); padding: .5rem .6rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-2); }
.st-engine { margin: .1rem 0 .2rem; }
.st-engine.hidden, .st-engine:empty { display: none; }
.st-engine .eng { max-width: none; }
@keyframes eng-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .eng-spin { animation: none; } .eng-bar i { transition: none; } }
@media (max-width: 860px) { .eng { max-width: none; } }
