/*
 * Content-preserving lesson uplifts
 * Reusable layouts for dense processes, comparisons, case studies, evidence
 * hierarchies and calculation methods. All explanatory copy remains visible.
 */

.sa-uplift-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
  color: #315f62;
  font-family: "Outfit", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sa-uplift-intro::before {
  content: "";
  width: 32px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d7377, #f59e0b);
}

/* 1. Sequential mechanisms */
.sa-uplift-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 14px 0 22px;
  list-style: none;
  counter-reset: uplift-path;
}

.sa-uplift-path > li {
  position: relative;
  min-width: 0;
  padding: 54px 18px 18px;
  overflow: hidden;
  border: 1px solid #b9deda;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(13, 115, 119, 0.11), transparent 42%),
    #fbfefd;
  box-shadow: 0 7px 20px rgba(15, 74, 77, 0.07);
  counter-increment: uplift-path;
}

.sa-uplift-path > li::before {
  content: counter(uplift-path, decimal-leading-zero);
  position: absolute;
  top: 14px;
  left: 18px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: #0d7377;
  color: white;
  font-family: "Outfit", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
}

.sa-uplift-path > li:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 15px;
  color: #c97822;
  font-size: 1.35rem;
  font-weight: 800;
}

.sa-uplift-path h3 {
  margin: 0 0 9px;
  color: #164e52;
  font-family: "Outfit", sans-serif;
  font-size: 1.03rem;
  line-height: 1.25;
}

.sa-uplift-path p {
  margin: 0;
  color: #4a5f67;
  font-size: 0.93rem;
  line-height: 1.68;
}

.sa-uplift-path .sa-uplift-path-wide {
  grid-column: span 2;
  background:
    radial-gradient(circle at 100% 0, rgba(124, 58, 237, 0.10), transparent 44%),
    #fdfcff;
  border-color: #d7c9ee;
}

/* 2. Aligned comparisons */
.sa-uplift-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 22px;
}

.sa-uplift-method {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 1px solid #c7dedb;
  border-top: 5px solid var(--uplift-accent, #0d7377);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(25, 70, 72, 0.06);
}

.sa-uplift-method:nth-child(2) { --uplift-accent: #2563eb; }
.sa-uplift-method:nth-child(3) { --uplift-accent: #c97822; }
.sa-uplift-method:nth-child(4) { --uplift-accent: #7c3aed; }

.sa-uplift-method h3 {
  margin: 0 0 12px;
  color: #193e43;
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
}

.sa-uplift-method p {
  margin: 0;
  color: #4a5f67;
  font-size: 0.93rem;
  line-height: 1.65;
}

.sa-uplift-method-label {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--uplift-accent, #0d7377);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 3. Case-study story maps */
.sa-uplift-story {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 6px;
}

.sa-uplift-story::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 50%;
  width: 2px;
  background: linear-gradient(#7abbb3, #edc07e);
  transform: translateX(-1px);
}

.sa-uplift-story article {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 18px;
  border: 1px solid #c8dfdb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(20, 76, 78, 0.06);
}

.sa-uplift-story article:nth-child(4n + 2),
.sa-uplift-story article:nth-child(4n + 3) {
  background: #fffaf1;
  border-color: #ead5ac;
}

.sa-uplift-story article:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.sa-uplift-story h3 {
  margin: 0 0 8px;
  color: #174f52;
  font-family: "Outfit", sans-serif;
  font-size: 1.02rem;
}

.sa-uplift-story p {
  margin: 0;
  color: #4a5f67;
  font-size: 0.93rem;
  line-height: 1.67;
}

.sa-uplift-story-label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e6f5f2;
  color: #0a6669;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* 4. Calculation and practical-method steppers */
.sa-uplift-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 18px 0 24px;
  list-style: none;
  counter-reset: method-step;
}

.sa-uplift-stepper > li {
  position: relative;
  min-width: 0;
  padding: 52px 16px 17px;
  border: 1px solid #e0cfaa;
  border-radius: 16px;
  background: linear-gradient(150deg, #fffdf8, #fff7e8);
  box-shadow: 0 6px 17px rgba(117, 81, 24, 0.07);
  counter-increment: method-step;
}

.sa-uplift-stepper > li::before {
  content: counter(method-step);
  position: absolute;
  top: 14px;
  left: 16px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #b96b1d;
  color: white;
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.sa-uplift-stepper > li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 17px;
  right: 13px;
  color: #0d7377;
  font-size: 1.15rem;
  font-weight: 800;
}

.sa-uplift-stepper code {
  display: block;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  color: #183f44;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
}

.sa-uplift-stepper p {
  margin: 0;
  color: #526168;
  font-size: 0.86rem;
  line-height: 1.55;
}

.sa-uplift-stepper strong {
  display: block;
  margin-top: 8px;
  color: #8b531a;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .sa-uplift-path,
  .sa-uplift-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  .sa-uplift-path,
  .sa-uplift-compare,
  .sa-uplift-story,
  .sa-uplift-stepper {
    grid-template-columns: 1fr;
  }

  .sa-uplift-path .sa-uplift-path-wide,
  .sa-uplift-story article:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .sa-uplift-story::before {
    left: 22px;
  }

  .sa-uplift-story article {
    padding-left: 24px;
  }

  .sa-uplift-stepper > li:not(:last-child)::after,
  .sa-uplift-path > li:not(:last-child)::after {
    content: "↓";
  }
}

@media print {
  .sa-uplift-path > li,
  .sa-uplift-method,
  .sa-uplift-story article,
  .sa-uplift-stepper > li {
    break-inside: avoid;
    box-shadow: none;
  }
}
