/* Impostazioni (ADR-0260 §2): the tabs are `.g-tabs--pagine` (ui.css). What is the page's own is
 * Configura: one card per step, its number in a circle, «Apri» on the right. Reuses tokens; no new
 * visual values.
 */

.g-passi {
  display: grid;
  gap: var(--s2);
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}

.g-passo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--bordo);
  border-radius: var(--r-card);
  background: var(--foglio);
}

.g-passo__numero {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--bordo);
  border-radius: var(--r-tondo);
  font-size: var(--fs-14);
  font-weight: var(--fw-strong);
  font-variant-numeric: tabular-nums;
}

.g-passo--fatto .g-passo__numero {
  border-color: var(--verde);
  color: var(--verde);
}

.g-passo__corpo {
  min-width: 0;
}

.g-passo__titolo {
  margin: 0;
  font-size: var(--fs-16);
  font-weight: var(--fw-strong);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.g-passo__letto {
  margin: var(--s1) 0 0;
  color: var(--ink-muted);
  font-size: var(--fs-14);
  overflow-wrap: anywhere;
}

.g-passo__stato {
  color: var(--ink);
  font-weight: var(--fw-medium);
}

/* Audit B2/B3: an ordinary `.g-btn` — the control radius and the page height (40 px). A pill and
   36 px made «Apri» the only button of its kind in the product. */
.g-passo__apri {
  align-self: center;
}

/* A phone, or 200% text: «Apri» goes under the words instead of squeezing them. */
@media (max-width: 640px) {
  .g-passo {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: var(--s1);
    /* The five cards stay within the section's 60 rem on a phone at 200% text (lot 8): the
       words and «Apri» take two rows here, so the card is lower in the block. */
    padding: var(--s2) var(--s3);
  }

  /* The number beside the title, the words and «Apri» across the card: no narrow column. */
  .g-passo__corpo {
    display: contents;
  }

  .g-passo__letto,
  .g-passo__apri {
    grid-column: 1 / -1;
  }

  .g-passo__letto {
    margin: 0;
  }

  .g-passo__apri {
    justify-self: start;
    min-height: var(--touch-min);
  }
}
