/* Shared back action for every step in the project flow. */
#analysis-dialog .context-actions > a.context-back {
  background: var(--bg);
  color: var(--surface);
  border-color: var(--bg);
}
#analysis-dialog .context-actions > a.context-back:hover {
  background: color-mix(in oklch, var(--bg) 86%, var(--surface));
  border-color: var(--bg);
}
#analysis-dialog .context-actions > a.context-back:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Four steps: plot, building, amenities, concept. */
#analysis-dialog .step-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* The longer third-step name keeps its own space on small screens. */
@media (max-width: 1120px) {
  #analysis-dialog .step-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr); }
}

/* Align mobile labels when only completed steps retain their checkmark. */
@media (max-width: 700px) {
  #analysis-dialog .step-label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    min-height: 2.8em;
    gap: 0;
    line-height: 1.4;
  }
}
