/*
 * Shared horizontal measure for PrimData's primary public pages.
 *
 * Full-bleed section backgrounds remain full width. Only their direct content
 * shells are aligned with the navigation and first-screen measure.
 */
:root {
  --primary-content-max: 1320px;
  --primary-content-inline-space: 48px;
  --primary-content-inline-space-mobile: 28px;
}

body:is(
  .pdv-home-page,
  .pdv-scenario-page,
  .pdv-product-ecosystem-page,
  .pdv-resource-page,
  .pdv-company-page,
  .pdv-case-page
) :is(.wrap, .scn-shell, .rs2-shell, .ab2-shell) {
  box-sizing: border-box;
  width: min(
    var(--primary-content-max),
    calc(100% - var(--primary-content-inline-space))
  );
  max-width: none;
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 980px) {
  body:is(
    .pdv-home-page,
    .pdv-scenario-page,
    .pdv-product-ecosystem-page,
    .pdv-resource-page,
    .pdv-company-page,
    .pdv-case-page
  ) :is(.wrap, .scn-shell, .rs2-shell, .ab2-shell) {
    width: calc(100% - var(--primary-content-inline-space-mobile));
  }
}

/*
 * Research-task cards: keep every row and every internal image edge aligned.
 * The CMS-generated layout may contain per-card drag offsets; this final layer
 * intentionally normalizes them while preserving the card hover interaction.
 */
.scn-page .scn-scenarios .scn-section-head {
  margin-bottom: 32px;
}

.scn-page .scn-scenarios .scn-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.scn-page .scn-card-grid > .scn-scenario-card {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  scale: 1;
  translate: 0 0;
}

.scn-page .scn-card-grid > .scn-scenario-card picture,
.scn-page .scn-card-grid > .scn-scenario-card img {
  width: 100%;
  height: 100%;
}

.scn-page .scn-card-grid > .scn-scenario-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 1080px) {
  .scn-page .scn-scenarios .scn-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .scn-page .scn-scenarios .scn-section-head {
    margin-bottom: 24px;
  }

  .scn-page .scn-scenarios .scn-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
