/* Shared final outcome pattern: plain page background, then line + text. */
.case-outcome-section,
.case-outcome-content,
.case-outcome-list,
.case-outcome-item {
  box-sizing: border-box;
}

.case-outcome-section,
.case-outcome-content,
.case-outcome-list {
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.outranking-case .case-outcome-section,
body.lungpass-case .case-outcome-section,
body.postid-237400 .case-outcome-section,
body.rxall-case .case-outcome-section {
  width: min(calc(100% - 48px), var(--case-container, 1340px)) !important;
  max-width: var(--case-container, 1340px) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

body.case-page .project-custom .case-outcome-section.e-con-boxed > .e-con-inner,
body.case-page .project-custom .case-outcome-section .e-con-boxed > .e-con-inner {
  --width: 100% !important;
  --container-max-width: none !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

.case-outcome-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: var(--space-xl, 32px) var(--space-2xl, 48px) !important;
  width: 100% !important;
  max-width: none !important;
}

.case-outcome-list > .case-outcome-item {
  position: relative;
  min-width: 0;
  margin: 0 !important;
  padding: var(--space-sm, 16px) 0 0 !important;
  border: 0 !important;
  border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent) !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.case-outcome-list > .case-outcome-item::before,
.case-outcome-list > .case-outcome-item::after {
  content: none !important;
}

.case-outcome-list > .case-outcome-item > :first-child {
  margin-top: 0 !important;
}

.case-outcome-list > .case-outcome-item > :last-child {
  margin-bottom: 0 !important;
}

/* Outranking: remove the tinted card while retaining the navigation clearance. */
body.outranking-case .case-outcome-section {
  margin-top: var(--case-section-gap, 128px) !important;
  margin-bottom: 0 !important;
}

body.outranking-case .case-outcome-content {
  width: 100% !important;
  max-width: none !important;
  align-self: stretch !important;
  margin: 0 !important;
  padding: 0 0 calc(32px + var(--case-final-clearance, 176px)) !important;
}

body.outranking-case .case-outcome-list {
  margin-top: var(--case-subsection-gap, 24px) !important;
}

/* LungPass: the conclusion is text, not another decorative composition. */
body.lungpass-case .lungpass-final.case-outcome-section {
  margin-top: var(--case-section-gap, 128px) !important;
  margin-bottom: 0 !important;
}

body.lungpass-case .lungpass-final > .elementor-element-f015fa3 {
  display: none !important;
}

body.lungpass-case .lungpass-final .elementor-element-2b47df4 {
  width: 100% !important;
  max-width: none !important;
  padding-inline: 0 !important;
}

body.lungpass-case .lungpass-final .case-outcome-content {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}

body.lungpass-case .lungpass-final .elementor-element-e97dd80,
body.lungpass-case .lungpass-final .elementor-element-3470491 {
  width: 100% !important;
  max-width: none !important;
}

body.lungpass-case .lungpass-final .elementor-element-3470491 p + p {
  margin-top: 0 !important;
}

/* Lenovo and RxPay already use a plain final section; align their item rhythm. */
body.theme-dark .case-outcome-list > .case-outcome-item {
  border-top-color: rgb(255 255 255 / 28%) !important;
}

body.rxpay-case .case-outcome-list,
body.postid-237400 .case-outcome-list {
  margin-top: 0 !important;
}

/* Martal keeps its metrics and quote, but the metrics follow the same rule. */
body.martal-case .results-metrics.case-outcome-list {
  margin-top: clamp(32px, 4vw, 56px) !important;
}

body.martal-case .results-section.case-outcome-section {
  width: 93.142857% !important;
  max-width: none !important;
  margin-inline: auto !important;
}

@media (max-width: 1279.98px) {
  body.martal-case .results-section.case-outcome-section {
    width: calc(100% - (2 * var(--mobile-gutter))) !important;
  }
}

body.martal-case .results-metrics.case-outcome-list > .case-outcome-item {
  padding-left: 0 !important;
}

@media (max-width: 1024px) {
  .case-outcome-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

}

@media (max-width: 767px) {
  body.outranking-case .case-outcome-section,
  body.lungpass-case .case-outcome-section,
  body.postid-237400 .case-outcome-section,
  body.rxall-case .case-outcome-section {
    width: min(calc(100% - 24px), var(--case-container, 1340px)) !important;
  }

  .case-outcome-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--case-subsection-gap, 24px) !important;
  }

  body.outranking-case .case-outcome-content {
    padding-bottom: calc(24px + var(--case-final-clearance, 160px)) !important;
  }

  body.lungpass-case .lungpass-final .elementor-element-e97dd80 > .elementor-widget-container {
    margin-bottom: var(--case-heading-gap, 32px) !important;
  }
}

/* Outcome sections use the same discrete rails as the case body. Keep this
   final so the shared outcome pattern cannot reintroduce a fluid interval. */
@media (max-width: 1279.98px) {
  body.outranking-case .case-outcome-section,
  body.lungpass-case .case-outcome-section,
  body.postid-237400 .case-outcome-section,
  body.rxall-case .case-outcome-section {
    width: min(calc(100% - 32px), var(--case-adaptive-width, 976px)) !important;
    max-width: var(--case-adaptive-width, 976px) !important;
  }
}

@media (max-width: 767.98px) {
  body.outranking-case .case-outcome-section,
  body.lungpass-case .case-outcome-section,
  body.postid-237400 .case-outcome-section,
  body.rxall-case .case-outcome-section {
    width: min(calc(100% - 16px), var(--case-adaptive-width, 608px)) !important;
  }
}

@media (min-width: 1280px) and (max-width: 1439.98px) {
  body.outranking-case .case-outcome-section,
  body.lungpass-case .case-outcome-section,
  body.postid-237400 .case-outcome-section,
  body.rxall-case .case-outcome-section {
    width: min(calc(100% - 48px), 1080px) !important;
    max-width: 1080px !important;
  }
}
