/* Rules — a numbered instruction list with editorial numerals. */

.c-rules { counter-reset: rule; display: grid; gap: 2px; }

/* The numeral HANGS in a gutter rather than sitting in a flex row.
 *
 * It was `display: flex` with the ::before as the first flex item, which reads
 * correctly only while the rule is a single unbroken text node: any inline
 * markup inside it (a <b>, an <em>) becomes a flex item of its own, so the
 * emphasised words are torn out of the sentence and spread across the line with
 * the 14px gap between them. A rule is a paragraph, so it is laid out as one. */
.c-rules__item {
  position: relative;
  padding-block: 14px;
  padding-inline: calc(2.2rem + 14px) 2px;
  border-block-end: 1px solid var(--line-2);
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--ink-2);
}
.c-rules__item:last-child { border-block-end: 0; }
.c-rules__item::before {
  counter-increment: rule;
  content: counter(rule, lower-roman);
  position: absolute;
  inset-inline-start: 0;
  inline-size: 2.2rem;
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  color: var(--teal);
}
.c-rules a { color: var(--teal); font-weight: var(--fw-label); }
