.nav__link--featured {
  color: var(--cobalt);
  font-weight: 800;
}

.xerp-video-section {
  background: var(--paper-strong);
}

.xerp-video-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, .8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.video-embed {
  min-width: 0;
}

.video-poster {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--dark);
  box-shadow: 0 18px 48px rgba(8, 36, 58, .16);
  cursor: pointer;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(4rem, 9vw, 6.5rem);
  height: clamp(4rem, 9vw, 6.5rem);
  place-items: center;
  padding-left: .3rem;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  background: var(--cobalt);
  box-shadow: 0 8px 26px rgba(8, 36, 58, .3);
  color: #fff;
  font-size: 2rem;
  transform: translate(-50%, -50%);
  transition: transform .2s ease, background-color .2s ease;
}

.video-poster:hover .video-play {
  background: #155ca9;
  transform: translate(-50%, -50%) scale(1.08);
}

.video-consent {
  margin-top: .85rem;
  color: var(--ink-soft);
  font-size: .85rem;
  line-height: 1.5;
}

.video-consent a,
.video-youtube {
  color: #155ca9;
  text-decoration: underline;
  text-underline-offset: .15em;
}

.chapter-consent-status {
  margin-top: .65rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--cobalt);
  border-radius: 0 8px 8px 0;
  background: var(--acid);
  color: #174c78;
  font-size: .9rem;
}

.video-youtube {
  display: inline-block;
  margin-top: .35rem;
  font-size: .88rem;
  font-weight: 700;
}

.video-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
  background: var(--dark);
  box-shadow: 0 18px 48px rgba(8, 36, 58, .16);
}

.xerp-feature-list {
  display: grid;
  gap: 1.15rem;
  list-style: none;
}

.xerp-feature-list li {
  position: relative;
  padding-left: 2rem;
  line-height: 1.5;
}

.xerp-feature-list li::before {
  position: absolute;
  left: 0;
  color: #155ca9;
  font-size: 1.15rem;
  font-weight: 900;
  content: "✓";
}

.xerp-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}

.xerp-reasons {
  background: var(--paper);
}

.xerp-reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.xerp-reasons-grid article {
  min-height: 180px;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-strong);
  box-shadow: 0 12px 32px rgba(8, 36, 58, .045);
}

.xerp-reasons-grid h3 {
  margin-bottom: .6rem;
  font-size: 1.16rem;
  line-height: 1.3;
}

.xerp-reasons-grid p,
.xerp-context {
  color: var(--ink-soft);
}

.xerp-context {
  margin-top: -1.25rem;
  margin-bottom: 2.5rem;
}

.hero-phone {
  display: inline-block;
  margin-top: 1rem;
  color: #155ca9;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.breadcrumbs {
  padding-top: 1.5rem;
  color: var(--ink-soft);
  font-size: .88rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  list-style: none;
}

.breadcrumbs li + li::before {
  margin-right: .6rem;
  color: var(--ink-soft);
  content: "›";
}

.breadcrumbs a {
  color: #155ca9;
  text-decoration: underline;
  text-underline-offset: .15em;
}

.xerp-page-heading {
  max-width: 950px;
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

.xerp-page-heading h1 {
  max-width: 22ch;
  margin-top: 1rem;
  font-size: clamp(2.45rem, 5.2vw, 4.8rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.xerp-page-heading > p:last-child {
  max-width: 48rem;
  margin-top: 1.35rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.27rem);
}

.xerp-main .xerp-section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}

.video-embed--large {
  max-width: 100%;
}

.chapters-section .section-heading {
  margin-bottom: 2rem;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.chapter-link {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: .8rem;
  padding: .7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-strong);
  text-align: left;
  cursor: pointer;
}

.chapter-link span {
  flex: 0 0 auto;
  color: #155ca9;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.chapter-link:hover {
  border-color: var(--cobalt);
  background: var(--acid);
}

.xerp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-block: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 16px;
  background: var(--dark);
  color: var(--light-on-dark);
}

.xerp-cta h2 {
  max-width: 22ch;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.25;
}

.xerp-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.xerp-cta .button--text {
  border-color: rgba(255, 255, 255, .35);
  background: transparent;
  color: var(--light-on-dark);
}

.transcript {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
}

.transcript summary {
  min-height: 56px;
  padding: 1rem 1.25rem;
  color: #155ca9;
  font-weight: 800;
  cursor: pointer;
}

.transcript-body {
  padding: 0 clamp(1.25rem, 4vw, 3rem) 2rem;
}

.transcript-chapter {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.transcript-chapter h3 {
  margin-bottom: .8rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.4;
}

.transcript-chapter h3 span {
  color: #155ca9;
  font-variant-numeric: tabular-nums;
}

.transcript-chapter p {
  max-width: 78ch;
  margin-top: .75rem;
  color: var(--ink-soft);
}

.xerp-faq .section-heading {
  margin-bottom: 2rem;
}

.partner-note {
  color: var(--ink-soft);
  font-size: .84rem;
}

.partner-note--end {
  margin-block: 1rem 4rem;
}

.footer-partner {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
  color: var(--muted-on-dark);
  font-size: .78rem;
}

.footer__grid {
  grid-template-columns: 1.5fr 1.1fr 1fr 1fr;
}

.mobile-contact-bar {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

body.home .hero__title {
  max-width: 23ch;
  font-size: clamp(2.5rem, 4.1vw, 4.5rem);
  line-height: 1.1;
}

body.home .hero__included {
  display: none;
}

body.home .section-title,
body.home .display-title,
body.home .independence__statement h2,
body.home .contact-section__title {
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 800px) {
  .xerp-video-intro {
    grid-template-columns: 1fr;
  }

  .xerp-reasons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .xerp-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .xerp-page-heading h1 {
    max-width: 20ch;
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  body.home .hero__title {
    max-width: 18ch;
    font-size: clamp(2.8rem, 9vw, 4.4rem);
  }

  body.home .decision-engine__body {
    min-width: 0;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }

  body.home .decision-engine__header {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .5rem;
  }

  body.home .engine-processor,
  body.home .engine-output,
  body.home .engine-processor > div {
    min-width: 0;
  }

  body.home .engine-processor strong,
  body.home .engine-output p,
  body.home .display-title {
    overflow-wrap: anywhere;
  }

  body.home .erp-switch__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home .service-item {
    min-width: 0;
  }

  body.home .migration-map__connections span {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  body.home .hero__title {
    max-width: 18ch;
    font-size: clamp(2.2rem, 10vw, 3.1rem);
  }

  body.home .proof-rail {
    display: block;
    overflow: visible;
  }

  body.home .proof-rail dl {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.home .proof-rail dl > div {
    min-height: 76px;
    padding: .7rem .4rem;
  }

  body.home .proof-rail dt {
    font-size: clamp(1.15rem, 5vw, 1.6rem);
  }

  body.home .proof-rail dd {
    font-size: .5rem;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 68px;
  }

  .mobile-contact-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: grid;
    min-height: 60px;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    padding: .4rem max(1rem, env(safe-area-inset-right)) calc(.4rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: var(--dark);
    box-shadow: 0 -5px 20px rgba(8, 36, 58, .16);
  }

  .mobile-contact-bar a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--paper-strong);
    color: #155ca9;
    font-weight: 800;
  }

  .mobile-contact-bar a:last-child {
    background: var(--cobalt);
    color: #fff;
  }

  .chapter-grid,
  .xerp-reasons-grid {
    grid-template-columns: 1fr;
  }

  body.home .hero__assurances {
    display: grid;
    gap: .55rem;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .xerp-video-actions {
    display: grid;
  }

  .xerp-video-actions .button,
  .xerp-cta__actions .button {
    width: 100%;
  }

  .xerp-cta__actions {
    width: 100%;
  }

  .partner-note--end {
    margin-bottom: 2rem;
  }
}
