/* RPA · Steps. A ruled, numbered ledger: number | title | text on wide screens, stacked on
   small ones. Shared atoms (.rpa-plate, .rpa-display) are styled in the theme. */

.rpa-steps {
  --_rule: var(--rpa-c-rule, var(--rpa-rule));
  --_rule-strong: var(--rpa-c-rule-strong, var(--rpa-rule-strong));
  --_muted: var(--rpa-c-muted, var(--rpa-slate));
}

.rpa-steps__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-end: 1px solid var(--_rule);
}

.rpa-steps__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0.75rem;
  margin: 0;
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  border-block-start: 1px solid var(--_rule);
}
.rpa-steps__item:first-child { border-block-start-color: var(--_rule-strong); }

.rpa-steps__number { display: block; }

.rpa-steps .rpa-steps__title {
  margin: 0;
  font-size: var(--rpa-step-2);
  line-height: 1.12;
  text-wrap: balance;
}

.rpa-steps .rpa-steps__text {
  margin: 0;
  max-width: 38em;
  color: var(--_muted);
  /* Plain greedy wrapping: on these three-line paragraphs `pretty` rebalances the whole block, so
     one row set 130px narrower than its neighbours and the right edge looked ragged row to row. */
  text-wrap: wrap;
}

@media (min-width: 640px) {
  .rpa-steps__item {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    column-gap: var(--rpa-gap);
    align-items: baseline;
  }
  .rpa-steps__text { grid-column: 2; }
}

@media (min-width: 1000px) {
  .rpa-steps__item {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .rpa-steps__number { grid-column: 1 / span 2; }
  .rpa-steps__title { grid-column: 3 / span 4; padding-inline-end: 1rem; }
  .rpa-steps .rpa-steps__text { grid-column: 8 / -1; }
}
