.product-page :is(section, [id]) {
  scroll-margin-top: calc(var(--header-height) + var(--space-8));
}

.product-page.product-template {
  margin-top: 0;
}

.product-page :is(.section-header, .page-grid, .pricing-bridge, .comparison-table, .media-frame, .rail, .cta-banner) {
  scroll-margin-top: calc(var(--header-height) + var(--space-10));
}

.product-page .site-header::before {
  display: none;
}

.product-page .site-header {
  inset: 0 0 auto;
  isolation: isolate;
  margin-bottom: 0;
  padding-top: 0;
  top: 0;
}

.product-page .site-header > .container {
  position: relative;
  z-index: 1;
}

.product-page::before {
  display: none;
}

.product-hero.hero--compact {
  padding-bottom: var(--space-7);
}

.product-hero .container.split {
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.product-hero .hero__copy {
  gap: var(--space-5);
}

.product-hero .media-frame {
  display: block;
  margin-top: 0;
}

.product-hero .media-frame__bar {
  min-height: 34px;
  padding-inline: 14px;
}

.product-hero .media-frame__body {
  padding: 10px;
}

.product-hero .media-frame__body.product-hero__visual {
  aspect-ratio: var(--product-hero-image-aspect, 760 / 520);
  background-color: var(--color-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(219, 217, 237, 0.74);
  min-height: 260px;
  padding: 0;
}

.product-hero__visual--image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

#product-problem {
  padding-top: var(--space-8);
}

#product-problem .page-grid {
  align-items: start;
}

#product-problem .page-grid > .stack {
  align-content: start;
}

.proof-panel--capabilities {
  gap: 14px;
  padding: clamp(28px, 3vw, 36px);
}

.proof-panel--capabilities > p {
  color: var(--color-text-muted);
  font-size: var(--font-size-body-sm);
  line-height: 1.45;
  margin: 0;
  max-width: 46ch;
}

.capability-list {
  display: grid;
  gap: 0;
}

.capability-item {
  --capability-accent: var(--color-accent-teal);
  align-items: center;
  background: transparent;
  border-top: 1px solid var(--color-border-alpha-90);
  display: grid;
  gap: 12px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 13px 0;
}

.capability-item:nth-child(2) {
  --capability-accent: var(--color-accent-conversion);
}

.capability-item:nth-child(3) {
  --capability-accent: var(--color-accent-pricing);
}

.capability-item:nth-child(4) {
  --capability-accent: var(--color-accent-ops);
}

.capability-item:last-child {
  padding-bottom: 0;
}

.capability-item__marker {
  align-items: center;
  align-self: start;
  background: color-mix(in srgb, var(--capability-accent) 13%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--capability-accent) 34%, var(--color-border));
  border-radius: 999px;
  color: var(--capability-accent);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  line-height: 1;
  margin-top: 1px;
  width: 26px;
}

.capability-item h4 {
  color: var(--color-text-strong);
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
}

.capability-item p {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.38;
  margin: 4px 0 0;
}

#product-proof .grid--2 {
  align-items: start;
}

#product-proof .card.stack {
  align-content: start;
}

.product-page .breadcrumb {
  align-items: center;
  gap: 6px 8px;
  line-height: 1.35;
}

.product-page .breadcrumb li {
  align-items: center;
}

.product-page .breadcrumb a,
.product-page .breadcrumb span {
  align-items: center;
  display: inline-flex;
  overflow-wrap: break-word;
  word-break: normal;
}

.product-hero .hero__copy > .cluster {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-hero .hero__copy .badge {
  flex: 0 1 auto;
  letter-spacing: 0;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
  width: auto;
  word-break: normal;
}

.section--product-strip {
  padding-block: var(--space-7) 0;
}

.product-hero .review-count {
  color: var(--color-text);
  font-weight: 800;
}

.product-card--related .product-card__actions {
  align-items: stretch;
  flex-direction: column;
}

.product-card--related {
  gap: var(--space-4);
  padding: var(--space-4);
}

.product-card--related .product-card__media--related {
  align-items: stretch;
  aspect-ratio: 16 / 10;
  display: flex;
  min-height: 0;
  padding: 0;
}

.product-card--related .product-card__media-image {
  border-radius: calc(var(--radius-md) - 1px);
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-faq-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-section-header {
  align-items: start;
  gap: var(--space-2);
  grid-template-columns: minmax(0, 1fr);
}

.product-section-header .section-header__copy {
  max-width: none;
  width: 100%;
}

.product-faq-card {
  background: var(--color-surface-muted);
  border: 0;
  display: grid;
  gap: var(--space-5);
  min-height: 320px;
  padding: clamp(28px, 3vw, 36px);
}

.product-faq-card__number {
  color: var(--color-text-strong);
  display: block;
  font-family: var(--font-body);
  font-size: clamp(46px, 5vw, 68px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
}

.product-faq-card h3 {
  color: var(--color-text-strong);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0;
  max-width: 28ch;
}

.product-faq-card p {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.product-page .page-grid .proof-panel .grid--2 {
  gap: 14px;
}

.product-page .page-grid .proof-panel .ui-row {
  --proof-accent: var(--color-accent-teal);
  align-items: start;
  background: linear-gradient(180deg, var(--color-product-row-surface-start), var(--color-product-row-surface-end));
  border: 1px solid var(--color-product-related-flow-border);
  border-left: 4px solid var(--proof-accent);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 var(--color-white-surface-alpha-78);
  display: grid;
  gap: 8px 18px;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  min-height: 0;
  padding: 18px 18px 18px 20px;
}

.product-page .page-grid .proof-panel .ui-row:nth-child(2) {
  --proof-accent: var(--color-accent-conversion);
}

.product-page .page-grid .proof-panel .ui-row:nth-child(3) {
  --proof-accent: var(--color-accent-pricing);
}

.product-page .page-grid .proof-panel .ui-row:nth-child(4) {
  --proof-accent: var(--color-accent-ops);
}

.product-page .page-grid .proof-panel .ui-row span {
  color: var(--color-text-muted);
  font-size: var(--font-size-body-sm);
  line-height: 1.35;
}

.product-page .page-grid .proof-panel .ui-row strong {
  color: var(--color-text-strong);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.24;
  text-align: left;
  text-wrap: balance;
}

.product-card--related .product-card__actions .button {
  justify-content: center;
  min-width: 0;
  overflow-wrap: break-word;
  white-space: normal;
  width: 100%;
  word-break: normal;
}

section:has(.product-card--related) .grid--4 {
  --grid-gap: var(--space-6);
}

.stat-strip--product h3 {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.28;
  word-spacing: 0.05em;
}

.stat-strip--product .stat-strip__item {
  --product-stat-bg: #eef2ff;
  --product-stat-border: #c7d2fe;
  --product-stat-icon-bg: #dfe7ff;
  --product-stat-text: #3730a3;
  background: linear-gradient(180deg, var(--product-stat-bg), var(--color-surface-alpha-96));
  box-shadow: inset 0 3px 0 var(--product-stat-text);
}

.stat-strip--product .stat-strip__item:nth-child(2) {
  --product-stat-bg: #ecfeff;
  --product-stat-border: #a5f3fc;
  --product-stat-icon-bg: #cffafe;
  --product-stat-text: #0e7490;
}

.stat-strip--product .stat-strip__item:nth-child(3) {
  --product-stat-bg: #f5f3ff;
  --product-stat-border: #ddd6fe;
  --product-stat-icon-bg: #ede9fe;
  --product-stat-text: #6d28d9;
}

.stat-strip--product .stat-strip__item:nth-child(4) {
  --product-stat-bg: #fff7ed;
  --product-stat-border: #fdba74;
  --product-stat-icon-bg: #fed7aa;
  --product-stat-text: #b45309;
}

.stat-strip--product .stat-strip__item:nth-child(5) {
  --product-stat-bg: #ecfdf5;
  --product-stat-border: #86efac;
  --product-stat-icon-bg: #bbf7d0;
  --product-stat-text: #15803d;
}

.stat-strip--product .stat-strip__item + .stat-strip__item {
  border-left-color: var(--product-stat-border);
}

.stat-strip--product .icon-box {
  background: var(--product-stat-icon-bg);
  border: 1px solid var(--product-stat-border);
  color: var(--product-stat-text);
}

.stat-strip--product h3 {
  color: var(--product-stat-text);
}

.ui-window--product-showcase [data-product-list="showcaseRows"] .ui-row {
  gap: 8px;
  padding-inline: 10px;
}

.ui-window--product-showcase [data-product-list="showcaseRows"] .ui-row strong {
  flex: 1 1 auto;
  font-size: 15px;
  min-width: 0;
  white-space: nowrap;
}

.ui-window--product-showcase [data-product-list="showcaseRows"] .ui-row span {
  flex: 0 0 auto;
  font-size: 15px;
}

.ui-window--product-showcase [data-product-list="showcaseStats"] .card--soft strong {
  font-size: 14px;
  line-height: 1.22;
  overflow-wrap: break-word;
}

.cta-banner--product .button {
  min-width: 0;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: normal;
}

.cta-banner--product {
  background: #382fa3;
  border-radius: clamp(20px, 2.4vw, 28px);
  box-shadow: 0 28px 70px rgba(42, 36, 130, 0.2);
  color: #fff;
  display: block;
  padding: clamp(2.1rem, 5vw, 4rem);
}

.cta-banner--product .section-header {
  align-items: start;
  gap: var(--space-6);
}

.cta-banner--product .section-header > .stack {
  align-content: start;
}

.cta-banner--product .button--inverse {
  color: var(--color-primary);
}

.cta-banner--product__primary {
  justify-content: center;
  width: 100%;
}

.product-final-cta {
  min-height: clamp(360px, 34vw, 490px);
}

.product-final-cta__eyebrow {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  min-height: 30px;
  padding: 0.48rem 0.78rem;
  text-transform: uppercase;
}

.product-final-cta__title {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.8rem);
  line-height: 1.14;
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  max-width: 1100px;
}

.product-final-cta__copy {
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  margin: 1.15rem 0 0;
  max-width: 820px;
}

.product-final-cta__details {
  display: grid;
  gap: 1.15rem;
  justify-items: start;
  margin-top: clamp(1.55rem, 3vw, 2.2rem);
}

.product-final-cta__badge {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: rgba(31, 27, 96, 0.75);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  min-height: 32px;
  padding: 0.55rem 0.9rem;
}

.product-final-cta__price {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.product-final-cta__guarantee {
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.5;
  margin: 0;
}

.product-final-cta__button {
  background: #fff;
  border-color: #fff;
  border-radius: 999px;
  box-shadow: none;
  color: #3029a0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  margin-top: clamp(1.55rem, 3vw, 2rem);
  min-height: 46px;
  padding: 0.9rem 1.25rem;
  width: 100%;
}

.product-final-cta__button:hover,
.product-final-cta__button:focus-visible {
  background: #f6f5ff;
  border-color: #f6f5ff;
  color: #3029a0;
}

.comparison-table--stack-mobile {
  overflow-x: visible;
}

.comparison-table--stack-mobile table {
  min-width: 0;
  width: 100%;
}

.comparison-table--stack-mobile td {
  overflow-wrap: break-word;
  word-break: normal;
}

.trust-note__list li {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 18px 1fr;
}

.trust-note__list li::before {
  border: solid var(--color-accent-green);
  border-width: 0 2px 2px 0;
  content: "";
  height: 10px;
  margin: 2px 0 0 5px;
  transform: rotate(45deg);
  width: 5px;
}

@media (min-width: 1121px) {
  section:has(.product-card--related) .grid--4 {
    align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 980px) and (min-width: 641px) {
  .stat-strip--product .stat-strip__item:last-child {
    grid-column: 1 / -1;
  }

  .product-faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .product-page::before {
    height: var(--space-3);
  }

  .product-faq-grid {
    grid-template-columns: 1fr;
  }

  .product-faq-card {
    min-height: 0;
    padding: var(--space-6);
  }

  .product-page .site-header {
    margin-bottom: calc(-1 * var(--space-3));
    padding-top: var(--space-3);
  }

  .product-hero .hero__actions .button--ghost {
    display: none;
  }

  .product-page .hero .media-frame {
    display: none;
  }

  .product-page .hero__copy,
  .product-page .hero__copy h1,
  .product-page .hero__copy p,
  .product-page .hero__copy .badge,
  .product-page .hero__copy .trust-note,
  .product-page .hero__copy .trust-note__list {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .product-page .hero__copy h1,
  .product-page .hero__copy p,
  .product-page .hero__copy .badge {
    overflow-wrap: anywhere;
    text-wrap: pretty;
  }

  .product-page .hero__actions {
    align-items: stretch;
  }

  .product-page .hero__actions .button {
    max-width: 100%;
    width: 100%;
  }

  .product-page .hero__copy > .cluster,
  .product-page .trust-note__list li {
    grid-template-columns: 1fr;
  }

  .product-page .trust-note__list li::before {
    display: none;
  }

  .comparison-table--stack-mobile {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .comparison-table--stack-mobile table,
  .comparison-table--stack-mobile thead,
  .comparison-table--stack-mobile tbody,
  .comparison-table--stack-mobile tr,
  .comparison-table--stack-mobile th,
  .comparison-table--stack-mobile td {
    display: block;
  }

  .comparison-table--stack-mobile thead {
    display: none;
  }

  .comparison-table--stack-mobile tbody {
    display: grid;
    gap: 14px;
  }

  .comparison-table--stack-mobile tr {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .comparison-table--stack-mobile td {
    border-bottom: 0;
    font-size: 15px;
    hyphens: none;
    line-height: 1.58;
    padding: 0;
  }

  .comparison-table--stack-mobile td:first-child {
    border-bottom: 1px solid var(--color-divider);
    color: var(--color-text-strong);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    padding: 17px 18px 13px;
  }

  .comparison-table--stack-mobile td:not(:first-child) {
    display: grid;
    gap: 7px;
    padding: 15px 18px;
  }

  .comparison-table--stack-mobile td + td:not(:first-child) {
    border-top: 1px solid var(--color-divider);
  }

  .comparison-table--stack-mobile td:nth-child(2)::before,
  .comparison-table--stack-mobile td:nth-child(3)::before {
    color: var(--color-text-muted);
    content: "1 year";
    font-size: var(--font-size-caption);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .comparison-table--stack-mobile td:nth-child(3)::before {
    content: "2 years";
  }
}
