#rescue-hero,
.rescue-section,
#shared-faq {
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
}

#rescue-hero {
  min-height: 759px;
  overflow: hidden;
  border-bottom: 1px dashed #cacaca;
  background: #f6f6f6;
}

.rescue-hero-inner {
  position: relative;
  width: min(100%, 1440px);
  min-height: 759px;
  margin: 0 auto;
}

.rescue-hero-copy {
  position: absolute;
  z-index: 1;
  top: 137px;
  left: clamp(48px, 6.95vw, 100px);
  width: min(56vw, 799px);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.rescue-hero-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 648px;
  max-width: 100%;
}

.rescue-hero-title {
  max-width: 648px;
  margin: 0;
  color: #000;
  font-size: clamp(52px, 4.45vw, 64px);
  font-weight: 500;
  line-height: 1.09;
  letter-spacing: -0.035em;
}

.rescue-hero-bottom {
  width: 648px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rescue-hero-bottom > p,
.rescue-hero-subtitle {
  width: min(100%, 648px);
  margin: 0;
  color: #2b2b2b;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 20px;
  font-weight: var(--fw-normal);
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.rescue-hero-bottom .cta-btn-group {
  width: fit-content;
  align-self: flex-start;
}

.rescue-hero-visual {
  position: absolute;
  right: clamp(48px, 9.8vw, 141px);
  bottom: 89px;
  width: 400px;
}

.rescue-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.rescue-section {
  border-bottom: 1px dashed #cacaca;
  background: #fff;
  padding: 100px max(48px, calc((100vw - 1200px) / 2));
}

.rescue-outcome-inner,
.rescue-process-grid,
.rescue-package-grid,
.rescue-section-heading,
.rescue-packages-heading {
  width: min(100%, 1200px);
  margin: 0 auto;
}

.rescue-outcome-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.rescue-outcome-copy {
  min-height: 426px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.rescue-outcome-copy > div {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rescue-eyebrow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rescue-eyebrow > span {
  width: 6px;
  height: 18px;
  border-radius: 2px;
  background: #d9d9d9;
}

.rescue-eyebrow p {
  margin: 0;
  color: #313131;
  font-family: Geist, sans-serif;
  font-size: 16px;
  line-height: 21px;
}

.rescue-section h2,
.rescue-outcome-copy h2,
.rescue-packages-heading h2 {
  margin: 0;
  color: #000;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -0.025em;
}

.rescue-section h2 span,
.rescue-outcome-copy h2 span,
.rescue-packages-heading h2 span {
  display: block;
}

.rescue-outcome-copy p,
.rescue-section-heading > p,
.rescue-packages-heading > p {
  margin: 0;
  color: #787878;
  font-size: 18px;
  line-height: 1.28;
}

.rescue-inline-cta,
.rescue-package-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 0 16px;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.rescue-inline-cta:hover,
.rescue-package-button:hover {
  transform: translateY(-2px);
}

.rescue-scanner,
.rescue-report {
  overflow: hidden;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: #fff;
}

.rescue-panel-bar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f4f4f4;
  padding: 0 16px;
  color: #555;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 300;
}

.rescue-panel-bar span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rescue-panel-bar img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: block;
}

.rescue-panel-bar i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #111;
  vertical-align: middle;
}

/* --- Codebase Matrix Grid --- */
.rescue-matrix-wrap {
  position: relative;
  padding: 11px 16px 4px;
  overflow: hidden;
}

.rescue-matrix-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.rescue-matrix-row {
  display: flex;
  gap: 4px;
  width: 100%;
}

.rescue-cell {
  flex: 1;
  aspect-ratio: 1 / 1;
  min-width: 0;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  box-sizing: border-box;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.rescue-cell--issue {
  background: #ffdede;
  border-color: #d8212e;
  animation: rescueIssuePulse 3s ease-in-out infinite;
}

@keyframes rescueIssuePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(216, 33, 46, 0);
  }
  50% {
    box-shadow: 0 0 10px 1px rgba(216, 33, 46, 0.45);
  }
}

.rescue-scan-beam {
  position: absolute;
  top: 11px;
  bottom: 4px;
  display: flex;
  align-items: stretch;
  pointer-events: none;
  left: 44%;
  animation: rescueScanBeam 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: left;
}

.rescue-scan-gradient {
  width: 37px;
  background: linear-gradient(270deg, rgba(216, 33, 46, 0.3) 0%, rgba(216, 33, 46, 0) 100%);
}

.rescue-scan-line {
  width: 1px;
  background: #d8212e;
  box-shadow: 0 0 8px 1px rgba(216, 33, 46, 0.85);
}

@keyframes rescueScanBeam {
  0% {
    left: 2%;
  }
  50% {
    left: 92%;
  }
  100% {
    left: 2%;
  }
}

/* --- Severity Stat Cards --- */
.rescue-scan-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 16px;
}

.rescue-stat-card {
  height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  box-sizing: border-box;
}

.rescue-stat-card.is-active {
  border-color: #d8212e;
}

.rescue-stat-card strong {
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  color: #e5e5e5;
}

.rescue-stat-card.is-active strong {
  color: #d8212e;
}

.rescue-stat-card span {
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 16px;
  line-height: 21px;
  color: #787878;
}

/* --- Scanner Footer --- */
.rescue-scan-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px 16px;
  color: #383838;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 16px;
  line-height: 21px;
}

.rescue-scan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 1px solid #d8212e;
  border-radius: 100px;
  padding: 0 14px;
  color: #d8212e;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
}

#rescue-process {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.rescue-section-heading {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rescue-section-heading h2 {
  max-width: 530px;
}

.rescue-section-heading > p {
  max-width: 723px;
  font-size: 20px;
  line-height: 26px;
}

.rescue-process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.rescue-process-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rescue-process-steps article {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.rescue-step-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #d9212e;
  flex-shrink: 0;
}

.rescue-process-steps article:not(.is-active) {
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.rescue-process-steps article:not(.is-active) h3 {
  color: #4e4e4e;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-transform: uppercase;
  margin: 0;
}

.rescue-process-steps article:not(.is-active) .rescue-step-dot,
.rescue-process-steps article:not(.is-active) p {
  display: none;
}

.rescue-process-steps article.is-active {
  min-height: 124px;
  background: #fafafa;
  border-color: #f0f0f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.rescue-process-steps article.is-active h3 {
  margin: 0;
  color: #000;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rescue-process-steps article.is-active p {
  margin: 0;
  border-top: 1px dashed #e4e4e4;
  padding-top: 10px;
  color: #5b5b5b;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 14px;
  line-height: 20px;
  width: 100%;
}

.rescue-report {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 352px;
  height: auto;
  box-sizing: border-box;
}

.rescue-report dl {
  margin: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  justify-content: space-between;
}

.rescue-report dl > div {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
}

.rescue-report dt {
  width: 80px;
  height: 30px;
  border: 1px solid #e3392c;
  background-color: transparent;
  padding: 0;
  color: #e3392c;
  font:
    300 12px / 16px "Geist Mono",
    monospace;
  text-align: center;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.rescue-report dd {
  margin: 0;
  color: #787878;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 14px;
  line-height: 18px;
  transition: color 0.3s ease;
}

.rescue-report dl > div.is-active dt {
  background-color: rgba(227, 57, 44, 0.2);
  border-color: #e3392c;
  color: #e3392c;
}

.rescue-report dl > div.is-active dd {
  color: #1a1a1a;
}

.rescue-report dl > div.is-active.is-success dt {
  background-color: rgba(24, 186, 78, 0.2);
  border-color: #18ba4e;
  color: #18ba4e;
}

.rescue-report dl > div.is-active.is-success dd {
  color: #1a1a1a;
}

#rescue-packages {
  display: flex;
  flex-direction: column;
  gap: 48px;
  background: #fafafa;
}

.rescue-packages-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.rescue-packages-heading > div {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rescue-packages-heading > p {
  max-width: 444px;
  font-size: 20px;
  line-height: 1.3;
}

.rescue-package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #e8e8e8;
}

.rescue-package-card {
  min-width: 0;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  border-right: 1px solid #e8e8e8;
  background: #fff;
  padding: 24px;
}

.rescue-package-card:last-child {
  border-right: 0;
}

.rescue-package-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rescue-package-main header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rescue-package-main h3 {
  margin: 0;
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 400;
}

.rescue-package-main header span {
  border-radius: 41px;
  background: #f5f5f5;
  padding: 4px 10px;
  color: #3d3b3b;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 14px;
  line-height: 19px;
}

.rescue-price {
  min-height: 59px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.rescue-price strong {
  color: #1a1a1a;
  font-size: 44px;
  font-weight: 500;
  line-height: 59px;
}

.rescue-price span {
  max-width: 72px;
  padding-bottom: 8px;
  color: #555;
  font-size: 16px;
  line-height: 1.1;
}

.rescue-package-main p {
  margin: 0;
  color: #333;
  font-size: 16px;
  line-height: 22px;
}

.rescue-package-card ul {
  margin: auto 0 0;
  border-top: 1px dashed #d2d1d1;
  padding: 24px 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rescue-package-card li {
  padding: 0;
  color: #000;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 16px;
  line-height: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rescue-package-card li::before {
  content: "+";
  color: #d8212e;
  font-family: var(--font-satoshi, "Satoshi", sans-serif);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  flex-shrink: 0;
}

.rescue-package-button {
  align-self: flex-start;
  min-height: 48px;
  font-weight: 500;
  box-sizing: border-box;
}

.rescue-package-button--red {
  border-color: #e3392c;
  background: #e3392c;
  color: #fff;
}

.rescue-package-button--red:hover {
  background: #c72e18;
  border-color: #c72e18;
}

.rescue-package-card--dark {
  background: #000;
}

.rescue-package-card--dark h3,
.rescue-package-card--dark .rescue-price strong {
  color: #efefef;
}

.rescue-package-card--dark header span {
  background: #212121;
  color: #cecece;
}

.rescue-package-card--dark p {
  color: #bcbcbc;
}

.rescue-package-card--dark ul {
  border-color: #383838;
}

.rescue-package-card--dark li {
  color: #c9c9c9;
}

.rescue-package-card--dark .build-cta-button {
  align-self: flex-start;
  min-width: 190px;
  height: 48px;
  padding: 6px 6px 6px 16px;
  gap: 12px;
  border-radius: 12px;
  background: #ffffff;
  color: #000000;
  box-sizing: border-box;
}

.rescue-package-card--dark .build-cta-button .build-cta-button-text,
.rescue-package-card--dark .build-cta-button .build-cta-button-text-inner {
  height: 36px;
}

.rescue-package-card--dark .build-cta-button .build-cta-button-text-inner span {
  height: 36px;
  line-height: 36px;
  font-size: 14px;
  font-weight: 500;
  color: #000000;
}

.rescue-package-card--dark .build-cta-button .build-cta-button-text-inner span:last-child {
  transform: translateY(-36px);
}

.rescue-package-card--dark .build-cta-button:hover .build-cta-button-text-inner span:first-child,
.rescue-package-card--dark
  .build-cta-button:focus-visible
  .build-cta-button-text-inner
  span:first-child {
  transform: translateY(36px);
}

.rescue-package-card--dark .build-cta-button:hover .build-cta-button-text-inner span:last-child,
.rescue-package-card--dark
  .build-cta-button:focus-visible
  .build-cta-button-text-inner
  span:last-child {
  transform: translateY(0);
}

.rescue-package-card--dark .build-cta-button .build-cta-button-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e33820;
}

#shared-faq {
  background: #fff;
  border-bottom: 1px dashed #cacaca;
}

@media (max-width: 1360px) {
  .rescue-hero-copy {
    width: min(52vw, 580px);
    left: clamp(32px, 4.5vw, 64px);
  }

  .rescue-hero-heading,
  .rescue-hero-title,
  .rescue-hero-bottom {
    width: 100%;
    max-width: 100%;
  }

  .rescue-hero-title {
    font-size: clamp(40px, 3.8vw, 54px);
  }

  .rescue-hero-visual {
    right: clamp(24px, 3.5vw, 60px);
    width: clamp(290px, 30vw, 380px);
    bottom: clamp(48px, 6vw, 89px);
  }
}

@media (max-width: 1100px) {
  .rescue-package-grid {
    grid-template-columns: 1fr;
    border: 0;
    gap: 16px;
  }

  .rescue-package-card {
    border: 1px solid #e8e8e8;
  }
}

@media (max-width: 900px) {
  #rescue-hero,
  .rescue-hero-inner {
    min-height: auto;
  }

  .rescue-hero-inner {
    display: flex;
    flex-direction: column;
    padding: 128px 48px 64px;
  }

  .rescue-hero-copy,
  .rescue-hero-visual {
    position: static;
    width: 100%;
  }

  .rescue-hero-copy {
    gap: 32px;
  }

  .rescue-hero-title {
    max-width: 700px;
    font-size: clamp(46px, 8vw, 64px);
  }

  .rescue-hero-visual {
    max-width: 430px;
    margin: 36px auto 0;
  }

  .rescue-section {
    padding: 72px 48px;
  }

  .rescue-outcome-inner,
  .rescue-process-grid {
    grid-template-columns: 1fr;
  }

  .rescue-outcome-copy {
    min-height: 0;
    gap: 32px;
  }

  .rescue-packages-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .rescue-hero-inner {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    padding: 112px 24px 48px;
  }

  .rescue-hero-copy,
  .rescue-hero-heading,
  .rescue-hero-bottom,
  .rescue-hero-visual {
    min-width: 0;
    width: 100%;
  }

  .rescue-hero-title {
    overflow-wrap: anywhere;
  }

  .rescue-hero-title {
    font-size: 42px;
    line-height: 1.08;
  }

  .rescue-hero-bottom > p {
    font-size: 17px;
  }

  .rescue-hero-bottom .cta-btn-group {
    max-width: 100%;
  }

  .rescue-section {
    padding: 56px 24px;
  }

  .rescue-section h2,
  .rescue-outcome-copy h2,
  .rescue-packages-heading h2 {
    font-size: 34px;
    line-height: 1.2;
  }

  .rescue-outcome-copy p,
  .rescue-section-heading > p,
  .rescue-packages-heading > p {
    font-size: 16px;
  }

  .rescue-panel-bar {
    font-size: 11px;
    padding: 0 12px;
  }

  .rescue-matrix-wrap {
    padding: 8px 10px 4px;
  }

  .rescue-matrix-grid,
  .rescue-matrix-row {
    gap: 2.5px;
  }

  .rescue-scan-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px 12px;
    gap: 8px;
  }

  .rescue-stat-card {
    height: 68px;
    padding: 10px;
  }

  .rescue-stat-card strong {
    font-size: 20px;
  }

  .rescue-stat-card span {
    font-size: 14px;
  }

  .rescue-scan-status {
    padding: 0 12px 14px;
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  .rescue-process-grid {
    gap: 24px;
  }

  .rescue-report {
    height: auto;
    min-height: 0;
  }

  .rescue-package-card {
    min-height: 0;
  }

  .rescue-price strong {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rescue-inline-cta,
  .rescue-package-button {
    transition: none;
  }

  .rescue-scan-beam {
    animation: none;
    left: 44%;
  }

  .rescue-cell--issue {
    animation: none;
  }
}
