/* Final responsive and hierarchy overrides for the 08/04 homepage. */
.value-content--priority {
  width: min(1200px, calc(100% - 48px));
}
.value-content--priority .value-header {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 900px) {
  .value-content--priority {
    width: min(1200px, calc(100% - 40px));
  }

  .capability-story--journey {
    padding-inline: 24px;
  }

  .capability-story--journey .capability-shell,
  .capability-story--journey .capability-heading,
  .capability-workspace--journey {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .capability-story--journey .capability-heading h2 {
    max-width: 100%;
    font-size: clamp(36px, 7vw, 52px);
    overflow-wrap: anywhere;
  }

  .capability-workspace--journey {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  .capability-workspace--journey .capability-steps {
    grid-row: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 92px);
  }

  .capability-workspace--journey .capability-steps li:last-child {
    grid-column: 2 / 3;
  }

  .capability-workspace--journey .capability-map-stage {
    grid-row: 2;
    min-height: 420px;
  }

  .capability-workspace--journey .sku-inspector {
    grid-row: 3;
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .value-content--priority {
    width: calc(100% - 32px);
  }

  .capability-story--journey {
    padding: 68px 20px 54px;
  }

  .capability-story--journey .capability-heading {
    margin-bottom: 22px;
  }

  .capability-story--journey .capability-heading h2 {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.045em;
  }

  .capability-workspace--journey {
    gap: 16px;
  }

  .capability-workspace--journey .capability-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, 96px);
    gap: 8px;
  }

  .capability-workspace--journey .capability-steps li:last-child {
    grid-column: 1 / -1;
  }

  .capability-workspace--journey .capability-steps button {
    min-height: 0;
    padding: 16px 10px 8px;
    gap: 8px;
  }

  .capability-workspace--journey .capability-steps button > .step-icon {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
  }

  .capability-workspace--journey .capability-steps button > span {
    position: static;
    inset: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .capability-workspace--journey .capability-steps button strong {
    max-width: none;
    font-size: 12px;
    line-height: 1.1;
  }

  .capability-workspace--journey .capability-map-stage {
    min-height: 330px;
  }

  .capability-workspace--journey .sku-inspector {
    width: 100%;
    padding: 22px;
  }
}

/* Keep the five journey steps readable at a glance across viewport sizes. */
.capability-workspace--journey .capability-steps strong {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .capability-workspace--journey .capability-steps button > span {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 2px;
  }

  .capability-workspace--journey .capability-steps strong {
    font-size: 12.5px;
    line-height: 1.12;
  }
}

/* Keep pricing stable while the five journey steps replace their content. */
.capability-workspace--journey .sku-price strong {
  min-height: 29px;
  font-size: clamp(23px, 1.85vw, 26px);
  line-height: 1.12;
  white-space: nowrap;
}

.capability-workspace--journey .sku-price small {
  min-height: 13px;
  display: block;
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Prevent longer product names, especially Autocomplete API, from changing
   the inspector or documentation-action height between journey steps. */
.capability-workspace--journey .sku-doc-link {
  min-height: 44px;
  height: 44px;
}

.capability-workspace--journey .sku-doc-link span {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .capability-workspace--journey .sku-inspector {
    min-height: 440px;
    height: 440px;
  }
}

/* Banner height set to 800px. */
.first-screen {
  min-height: 800px;
  height: auto;
  overflow: visible;
}

.first-screen .hero {
  min-height: 800px;
  height: auto;
}

/* The capability matrix keeps its desktop comparison width on phones, but it
   must scroll inside its own panel rather than widening the entire page. */
@media (max-width: 620px) {
  .advantage-priority-grid,
  .advantage-summary,
  .stack-matrix {
    min-width: 0;
    max-width: 100%;
  }

  .advantage-summary {
    width: 100%;
  }

  .stack-matrix {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
}
