/* Resolve inherited spacing conflicts without changing page content or tools. */
:root {
  --pg-sec-y: clamp(64px, 6.2vw, 88px);
  --rd-layout-gap: clamp(28px, 4.2vw, 60px);
  --rd-field-gap: 24px;
  --rd-safe-top: calc(var(--rd-preview-h) + var(--pg-header-h) + 24px);
}

.pg-site .rd-route .pg-section,
.pg-site .rd-route .pg-ctaband { padding-block: var(--pg-sec-y); }
.pg-site .rd-route .pgd-marketing { padding-block: var(--pg-sec-y); }
.pg-site .rd-route .pg-section--tight { padding-block: clamp(26px, 2.3vw, 34px); }
.rd-route .pg-section--tight > .pg-shell > h2.pg-eyebrow {
  font: 700 13px/1.5 var(--pg-body) !important;
  letter-spacing: .07em;
  width: auto;
  max-width: 100%;
  white-space: normal;
  flex-wrap: wrap;
  margin: 0 0 12px !important;
}
.rd-route .pgd-marketing-inner > div { min-width: 0; width: 100%; }

/* The previous section already supplies the space between shared surfaces. */
.rd-route .pg-section:not(.pg-section--tight):not(.pg-section--alt) + .pg-section:not(.pg-section--tight):not(.pg-section--alt),
.rd-route .pg-section:not(.pg-section--tight):not(.pg-section--alt) + .pgd-marketing { padding-top: 0; }
.rd-route main:has(> .pg-section:last-child:not(.pg-section--tight):not(.pg-section--alt)) + .pgd-marketing { padding-top: 0; }
.rd-route .pgd-marketing + .pg-section:not(.pg-section--tight):not(.pg-section--alt) { padding-top: clamp(40px, 4vw, 56px); }

.rd-route .pg-sechead {
  position: relative;
  column-gap: var(--rd-layout-gap);
  row-gap: 22px;
  margin-bottom: 32px;
}
.rd-route .pg-sechead__aside { margin-top: 0; padding-bottom: 0; }
.rd-route [data-scroll-effect=depth] > .pg-shell > .pg-sechead { padding-bottom: 24px; }
.rd-route [data-scroll-effect=depth] > .pg-shell > .pg-sechead::after {
  position: absolute;
  left: 0;
  bottom: 0;
  margin: 0;
}
.rd-route .pg-section > .pg-shell > h2 + .pg-lead { margin-top: 0 !important; }
.rd-route .pg-section .pg-mt-lg { margin-top: 32px; }

/* Process: fill both desktop columns and give every bordered card an inset. */
.rd-route .pg-story {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--rd-layout-gap);
  margin-top: 0;
  align-items: start;
}
.rd-route .pg-story__sticky {
  width: 100%;
  min-width: 0;
  height: clamp(360px, 32vw, 470px);
  aspect-ratio: auto;
  top: var(--rd-safe-top);
  border-radius: 7px;
}
.rd-route .pg-story__sticky .pg-scene {
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}
.rd-route .pg-story__stages { width: 100%; min-width: 0; padding: 0; gap: 20px; }
.rd-route .pg-stage-item {
  min-width: 0;
  min-height: 0;
  padding: 30px;
  border-radius: 7px;
  background: #11161bc4;
}
.rd-route .pg-stage-item__idx { margin: 0; line-height: 1.5; }
.rd-route .pg-stage-item h3 {
  font-size: clamp(36px, 3.6vw, 48px);
  line-height: 1.1;
  margin: 16px 0;
}
.rd-route .pg-stage-item p:last-of-type { margin: 0; }
.rd-route .pg-stage-item .rd-art--stage { height: 82px; margin-top: 20px; }

/* The lead-card variant had a more specific four-pixel caption rule. */
.rd-route .pg-member.pg-member--lead .pg-member__body,
.rd-route .pg-leadcard__meta { padding: 28px; }
.rd-route .pg-member__name { margin-top: 0; }

/* Six workflow steps should form two complete rows, not five plus an orphan. */
.rd-route [data-section-motion=connected-workflow] .pg-values {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rd-route [data-section-motion=working-culture] .pg-values {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.rd-route [data-section-motion=working-culture] .pg-value { grid-column: span 2; }
.rd-route [data-section-motion=working-culture] .pg-value:nth-last-child(-n+2) { grid-column: span 3; }

/* Form columns, standalone fields and consecutive rows use one rhythm. */
.rd-route .pg-formshell .pg-fgrid { gap: var(--rd-field-gap); }
.rd-route .pg-formshell form > .pg-fgrid,
.rd-route .pg-formshell form > .pg-field { margin: 0 0 var(--rd-field-gap); }
.rd-route .pg-formshell .pg-fgrid > .pg-field { margin: 0; }
.rd-route .pg-formshell form > button[type=submit] { margin-top: 4px; }
.rd-route .pg-formshell form > button[type=submit] + a,
.rd-route .pg-formshell form > button[type=submit] + p { display: block; margin-top: 16px; }
.rd-route .pg-formshell .pg-label { line-height: 1.5; }
.rd-route .pg-formshell > .pgjf-ai-help { margin: 18px 0 0; font-size: 14px; line-height: 1.7; }

/* Inner reading shells should not apply the page gutters a second time. */
.rd-route .pg-shell .pg-shell { width: 100%; padding-inline: 0; }
.rd-route .pg-article .pgd-marketing { padding-inline: 0; margin-top: 32px; }
.rd-route .pg-article .pgd-marketing-inner { gap: 28px; }
.rd-route .pg-article .pgd-marketing h2 {
  font-size: clamp(40px, 4.2vw, 56px);
  line-height: 1.06;
  max-width: 20ch;
}
.rd-route .pg-article .pgd-prizmo-marketing { height: 300px; }
.rd-route .pg-doc { column-gap: var(--rd-layout-gap); row-gap: 32px; }
.rd-route .pg-toc { margin: 0; }
.rd-route .pg-doc__body { min-width: 0; }
.rd-route .pg-doc__note { margin: 28px 0 32px; }
.rd-route .pg-doc__body > h2 { margin-bottom: 18px; }

.rd-route :is(section[id], article[id], h2[id], h3[id], .pg-formshell[id]) {
  scroll-margin-top: var(--rd-safe-top);
}

@media (max-width: 960px) {
  .rd-route .pg-story { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rd-route .pg-story__sticky { display: none; }
  .rd-route .pg-story__stages { width: 100%; }
  .rd-route [data-section-motion=connected-workflow] .pg-values,
  .rd-route [data-section-motion=working-culture] .pg-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-route [data-section-motion=working-culture] .pg-value:nth-child(n) { grid-column: auto; }
  .rd-route [data-section-motion=working-culture] .pg-value:last-child { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  :root { --pg-sec-y: 64px; }
  .rd-route .pg-sechead { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .rd-route .pg-doc { gap: 32px; }
}
@media (max-width: 600px) {
  :root { --pg-sec-y: 56px; --rd-field-gap: 22px; }
  .rd-route .pg-sechead { row-gap: 20px; margin-bottom: 28px; }
  .rd-route [data-scroll-effect=depth] > .pg-shell > .pg-sechead { padding-bottom: 20px; }
  .rd-route .pg-stage-item { padding: 24px 22px; }
  .rd-route .pg-stage-item h3 { font-size: 34px; margin: 14px 0 16px; }
  .rd-route .pg-story__stages { gap: 18px; }
  .rd-route .pg-stage-item .rd-art--stage { height: 76px; margin-top: 18px; }
  .rd-route .pg-member.pg-member--lead .pg-member__body,
  .rd-route .pg-leadcard__meta { padding: 24px; }
  .rd-route .pg-section .pg-mt-lg { margin-top: 28px; }
  .rd-route .pg-article .pgd-marketing { margin-top: 28px; }
  .rd-route .pg-article .pgd-marketing h2 { font-size: 42px; }
  .rd-route [data-section-motion=connected-workflow] .pg-values,
  .rd-route [data-section-motion=working-culture] .pg-values { grid-template-columns: minmax(0, 1fr); }
}
