.terminal-body { max-height: 520px; overflow: auto; }
.terminal-body pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 18px; }
.terminal-body .welcome { color: #b4c1d2; }
.terminal-body .command-line { color: #9ee6bd; margin-bottom: 5px; }
.terminal-body .terminal-error { color: #ffb7a7; }
.terminal-prompt label { color: #9ee6bd; white-space: nowrap; }
.terminal-prompt label b { color: #fdba74; font-weight: 400; }
.terminal-prompt { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 8px; min-height: 44px; }
.terminal-prompt label { flex: 0 0 auto; }
#terminal-form #command,
#terminal-form #command:focus,
#terminal-form #command:focus-visible {
  flex: 1 1 0;
  width: 0;
  min-width: 24px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  color: #f1f5f9;
  caret-color: #fdba74;
  font: inherit;
  line-height: inherit;
}
/* Keyboard focus is visible on the terminal title bar, not around the prompt. */
.terminal-window:focus-within .terminal-top { box-shadow: inset 0 -2px #fdba74; }
.terminal-shortcuts { padding: 10px 16px; color: #b4c1d2; background: #131e2d; font-size: 12px; border-top: 1px solid #34445a; }
.execution-status { min-height: 0; margin: 8px 0 0; font-size: 14px; color: var(--ecv-muted); }
.execution-status:empty { display: none; }
.mission-objectives { list-style: none; padding: 0; margin: 15px 0; }
.objective { display: flex; gap: 9px; margin: 13px 0; color: var(--ecv-muted); font-size: 14px; line-height: 1.6; }
.objective > span:first-child { flex: none; }
.objective.done { color: var(--ecv-text); }
.objective.done > span:first-child { color: var(--ecv-success); }
.validation-feedback { margin-top: 14px; padding: 12px; background: var(--nc-soft); border: 1px solid var(--nc-orange-border); border-radius: 8px; color: var(--ecv-text); font-size: 14px; }
.validation-feedback:empty { display: none; }
.validation-feedback[data-complete="true"] { border-color: var(--ecv-success); }
.technical-foundation { margin-top: 28px; border: 1px solid var(--ecv-border); border-radius: 12px; background: var(--ecv-surface); }
.technical-foundation summary { cursor: pointer; min-height: 54px; padding: 16px 20px; font-size: 16px; font-weight: 600; color: var(--nc-ink); }
.technical-foundation summary .ui-icon { margin-left: 8px; }
.technical-foundation details > div { padding: 0 20px 20px; }
.technical-foundation p { margin-bottom: 12px; font-size: 16px; }
.technical-foundation li { margin: 10px 0; }
.technical-foundation a, .help-official a { color: var(--nc-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.technical-foundation a { display: inline-block; padding-block: 4px; }
.help-official { font-size: 13px; margin: -4px 0 18px; }
.technical-foundation p.small { font-size: 13px; }
#reset-dialog > button { margin: 8px 8px 0 0; }
@media(max-width:640px) {
  .terminal-body { max-height: 490px; }
  .terminal-prompt { gap: 8px; }
  .terminal-prompt label { flex: 0 0 auto; }
  .ecv-ui .terminal-prompt input { flex: 1 1 0; width: 0; min-width: 24px; }
  .terminal-bottom > span:last-child { margin-left: 0; }
  .technical-foundation summary { font-size: 15px; padding-inline: 16px; }
}
/* Preserve table columns; long results scroll inside the terminal. */
.terminal-body pre.output { white-space: pre; overflow-x: auto; }

/* Completed activity status is a milestone, independent of the current replay. */
.unit-card.is-completed { border-color: var(--ecv-success); }
.card-status { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 12px; color: var(--ecv-muted); }
.card-status.is-completed { border: 1px solid var(--ecv-success); border-radius: 6px; padding: 3px 7px; color: var(--ecv-text); font-weight: 600; }
.card-status .ui-icon { width: 14px; height: 14px; color: var(--ecv-success); }
.lab-meta .completion-badge { display: inline-flex; align-items: center; gap: 6px; border-color: var(--ecv-success); color: var(--ecv-text); font-weight: 600; }
.completion-badge .ui-icon { width: 16px; height: 16px; color: var(--ecv-success); }
.completion-banner { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 20px; border: 1px solid var(--ecv-success); border-radius: 12px; background: var(--ecv-surface); }
.completion-banner-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--ecv-success); border-radius: 50%; color: var(--ecv-success); }
.completion-banner strong { display: block; font-size: 18px; font-weight: 600; }
.completion-banner p { color: var(--ecv-muted); font-size: 14px; margin-top: 4px; }
.completion-banner .text-link { margin-left: auto; }
.completion-summary { margin: -6px 0 18px; padding: 10px 12px; border: 1px solid var(--ecv-success); border-radius: 8px; color: var(--ecv-text); font-size: 14px; font-weight: 600; }
@media(max-width:640px) {
  .completion-banner { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .completion-banner > div { flex: 1; min-width: 150px; }
  .completion-banner .text-link { margin: 0 0 0 50px; }
  .card-status { margin-left: 0; }
}

.completion-status { color: #fdba74; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 10px; }
.completion-status:empty { display: none; }
