/* Related setups block — used by RelatedSetups.astro on product and industry
   pages. Deliberately close to the setup cards on setups.html so a reader who
   has seen the gallery recognises these as the same objects. */

/* This block is dropped into two page families that use slightly different
   measures: product/setups/notes at 1200/20, industry at 1180/24. It carried the
   industry numbers, which put it 14px right of every other section on a product
   page. It adopts the host page's measure now rather than imposing one.

   :has() rather than a class on <body>, because the component is inserted by an
   Astro component and cannot reach the layout. related-setups.css loads after
   industry.css on those pages, so an override there would lose on source order. */
.rs-wrap {
  max-width: 1200px;
  margin: 96px auto 0;
  padding: 0 20px;
}
body:has(.sv-hero) .rs-wrap {
  max-width: 1180px;
  padding: 0 24px;
}

.rs-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.rs-head h2 {
  font-size: clamp(24px, 2.4vw, 31px);
  line-height: 1.16;
  letter-spacing: -0.018em;
  color: var(--text-primary);
}

.rs-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  /* 44px target without moving the baseline it aligns to */
  padding: 12px 0;
}
.rs-all:hover { opacity: 0.65; }
.rs-all svg,
.rs-go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.rs-grid {
  display: grid;
  /* auto-fit, not repeat(3): screens.astro lists two setups because only two are
     honestly about screens, and a fixed three-track grid left it with a hole.
     The track count follows the card count. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.rs-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 24px 20px;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.rs-card:hover { border-color: var(--border-med); transform: translateY(-2px); }

.rs-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rs-title {
  display: block;
  margin-top: 12px;
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.012em;
  color: var(--text-primary);
}
.rs-card:hover .rs-title { color: var(--accent-teal); }

.rs-sub {
  display: block;
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-body);
  /* the blurb explains, the title sells; let the title carry the card */
  flex-grow: 1;
}

.rs-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-teal);
}

@media (max-width: 620px) {
  .rs-wrap { margin-top: 72px; }
  .rs-grid { grid-template-columns: 1fr; }
  /* the prose floor the rest of the site now uses on a phone */
  .rs-sub { font-size: 16px; line-height: 1.55; }
  .rs-title { font-size: 19px; }
}
