/* features: text-only points (refs 299, 290).
   cards    bordered flat cards with a hard offset shadow in the text colour;
            1 / 2 / 3 columns; with 4 or 5 items the first two run wide.
   figures  big numbers in one row (2 x 2 on phones), split by rules. */
.s-features__list { display: grid; gap: var(--gutter); }
.s-features__item h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
.s-features__text { margin-top: var(--space-2); color: var(--fg-soft); }
.s-features__tag {
  font-size: var(--fs-label);
  font-weight: var(--fw-ui);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
  color: var(--fg-muted);
}

/* ---- cards ---- */
.s-features--cards .s-features__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-5);
  border: 2px solid var(--fg);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--fg);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.s-features--cards .s-features__text { margin-top: 0; }
.s-features__badge {
  position: absolute;
  top: calc(var(--space-3) * -1);
  right: var(--space-4);
  padding: var(--space-1) var(--space-3);
  border: 2px solid var(--fg);
  border-radius: var(--radius-sm);
  background: var(--surface-quiet);
  color: var(--fg);
  font-size: var(--fs-label);
  font-weight: var(--fw-ui);
  line-height: var(--lh-label);
}
@media (min-width: 640px) {
  .s-features--cards .s-features__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .s-features--cards .s-features__list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-6) var(--gutter); }
  .s-features--cards .s-features__item { grid-column: span 2; }
  /* 4 or 5 items: the first two run wide (3 + 3, then 2 + 2 + 2 or 3 + 3) */
  .s-features--cards .s-features__item:first-child:nth-last-child(n+4):nth-last-child(-n+5),
  .s-features--cards .s-features__item:first-child:nth-last-child(n+4):nth-last-child(-n+5) + .s-features__item,
  .s-features--cards .s-features__item:first-child:nth-last-child(4) ~ .s-features__item { grid-column: span 3; }
}
@media (min-width: 1200px) {
  /* up to five near-square tiles in one row; more wrap */
  .s-features--cards .s-features__list { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-6) var(--gutter); }
  .s-features--cards .s-features__item { padding-top: var(--space-7); }
}

/* ---- figures ---- */
.s-features--figures .s-features__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-7); }
.s-features--figures .s-features__item {
  padding-left: var(--space-4);
  border-left: var(--hairline) solid var(--rule-strong);
}
.s-features__figure {
  margin-bottom: var(--space-4);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: var(--fw-display);
  line-height: var(--lh-stat);
  font-variant-numeric: tabular-nums;
}
.s-features__figure small { margin-left: 0.15em; font-size: 0.32em; font-weight: var(--fw-ui); letter-spacing: 0; }
@media (min-width: 960px) {
  .s-features--figures .s-features__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
