/* Trusted Partner Agreement — page scoped */

.tpa-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #001e4d;
}

.tpa-hero__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2172 / 724;
  object-fit: cover;
  object-position: 56% center;
}

.tpa-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(253, 249, 243, 0.97) 0%,
    rgba(253, 249, 243, 0.92) 26%,
    rgba(253, 249, 243, 0.72) 40%,
    rgba(253, 249, 243, 0.32) 54%,
    transparent 66%
  );
}

.tpa-hero__copy {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: var(--layout-max-width, 1400px);
  margin-inline: auto;
  padding-inline: var(--layout-gutter, clamp(20px, 4vw, 48px));
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
}

.tpa-hero__copy h1 {
  max-width: 34rem;
  font-size: clamp(2rem, 3.8vw, 3.35rem);
}

.tpa-hero__title {
  color: var(--partner-deep, #001e4d);
}

.tpa-hero__subtitle {
  max-width: 34rem;
  margin-top: 0.55rem;
  color: var(--partner-deep, #001e4d);
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
}

.tpa-page .tpa-agreement {
  padding: clamp(2rem, 3.8vw, 3.25rem) 0 clamp(2.4rem, 4vw, 3.5rem);
  background: #fff;
}

.tpa-agreement__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 2.08fr);
  gap: clamp(1.35rem, 2.8vw, 2.5rem);
  align-items: start;
}

.tpa-overview {
  padding: clamp(1.25rem, 2.2vw, 1.65rem);
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 1.15rem;
  background: var(--partner-cream, #fdf9f3);
  box-shadow: 0 14px 32px -26px rgba(0, 30, 77, 0.35);
  text-align: center;
}

.tpa-overview__head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.tpa-review__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.tpa-overview__title,
.tpa-review__title {
  margin: 0;
  color: var(--partner-deep, #001e4d);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.2;
}

.tpa-overview__text,
.tpa-review__intro {
  margin: 0;
  color: #243447;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.6;
}

.tpa-overview__highlights-title {
  margin: 1.25rem 0 0.65rem;
  color: var(--partner-navy, #003479);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.tpa-overview .partner-checks.tpa-overview__checks {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: left;
}

.tpa-viewer {
  box-sizing: border-box;
  margin-top: 1.15rem;
  min-height: clamp(36rem, 62vh, 50rem);
  max-height: min(960px, calc(100vh - 7rem));
  overflow: auto;
  border: 1px solid rgba(0, 52, 121, 0.16);
  border-radius: 1rem;
  background: linear-gradient(180deg, #fff 0%, #fffefa 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 28px -24px rgba(0, 30, 77, 0.28);
  scroll-behavior: smooth;
}

.tpa-viewer:focus-visible {
  outline: 2px solid var(--partner-navy, #003479);
  outline-offset: 2px;
}

.tpa-viewer__inner {
  padding: clamp(1.35rem, 2.4vw, 1.85rem) clamp(1.15rem, 2.2vw, 1.75rem) clamp(1.5rem, 2.4vw, 1.9rem);
  color: #243447;
  font-size: clamp(0.94rem, 1.05vw, 1rem);
  font-weight: 500;
  line-height: 1.72;
}

.tpa-viewer__brand {
  margin-bottom: 1.15rem;
}

.tpa-viewer__brand-grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, 25%) minmax(0, 75%);
  gap: clamp(0.85rem, 2vw, 1.35rem);
  align-items: center;
}

.tpa-viewer__logo {
  display: block;
  width: min(100%, 9.75rem);
  height: auto;
  margin: 0;
}

.tpa-viewer__brand-copy {
  text-align: left;
}

.tpa-viewer__brand-rule {
  margin: 0.95rem 0 0;
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.55);
}

.tpa-page .tpa-viewer h3.tpa-viewer__doc-title {
  margin: 0;
  color: var(--partner-navy, #003479);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
}

.tpa-viewer__motto {
  margin: 0.35rem 0 0;
  color: var(--partner-ocean, #006d77);
  font-style: italic;
  font-weight: 600;
}

.tpa-viewer__promise {
  margin: 0.2rem 0 0;
  color: #3d5268;
  font-size: 0.88rem;
}

.tpa-viewer__version {
  margin: 0.65rem 0 0;
  color: #5a6d82;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

.tpa-viewer__section + .tpa-viewer__section {
  margin-top: 1.45rem;
}

.tpa-page .tpa-viewer h3.tpa-viewer__section-title {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 0.35rem;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0.08) 100%);
  color: var(--partner-deep, #001e4d);
  font-family: var(--font-body);
  font-size: var(--font-size-body, 1.125rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
}

.tpa-viewer__section p {
  margin: 0.85rem 0 0;
  max-width: 62rem;
}

.tpa-viewer__placeholder {
  margin: 1.25rem 0 0;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid var(--partner-teal, #41c0c9);
  background: rgba(65, 192, 201, 0.08);
  color: #3d5268;
  font-size: 0.9rem;
  font-style: italic;
}

.tpa-accept {
  margin-top: 1.35rem;
}

.tpa-accept__check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  color: var(--partner-deep, #001e4d);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
}

.tpa-accept__check input {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--partner-navy, #003479);
}

.tpa-accept__status {
  min-height: 1.35rem;
  margin: 0.65rem 0 0;
  color: var(--partner-ocean, #006d77);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.tpa-accept__status:empty {
  display: none;
}

.tpa-accept__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.tpa-accept__btn {
  flex: 1 1 12rem;
  min-width: min(100%, 14rem);
  justify-content: center;
  text-align: center;
}

.tpa-accept__btn:disabled,
.tpa-accept__btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: saturate(0.7);
  box-shadow: none;
}

.tpa-accept__btn.modern-btn--ghost:disabled {
  background: #f5f7fa;
  border-color: rgba(0, 52, 121, 0.14);
  color: rgba(0, 52, 121, 0.55);
}

.tpa-accept__btn.modern-btn--navy:disabled {
  border-color: rgba(0, 30, 77, 0.35);
  background: linear-gradient(180deg, #8fa8c8 0%, #6b84a6 100%);
  color: rgba(255, 255, 255, 0.92);
}

.tpa-page .tpa-next.collective-close {
  margin-top: 0;
  padding: clamp(1.15rem, 2vw, 1.45rem) 0 clamp(1.25rem, 2.1vw, 1.55rem);
}

.tpa-page .tpa-next > .partner-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tpa-page .tpa-next__banner {
  display: grid;
  grid-template-columns: auto auto minmax(0, max-content);
  gap: clamp(1.5rem, 2vw, 2rem);
  align-items: center;
  width: fit-content;
  max-width: min(100%, 58rem);
  min-height: clamp(9.5rem, 12vw, 11.5rem);
  margin-inline: auto;
}

.tpa-page .tpa-next__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpa-page .tpa-next__shield {
  display: block;
  width: clamp(6.25rem, 7.5vw, 7.5rem);
  height: auto;
  object-fit: contain;
}

.tpa-page .tpa-next__divider {
  align-self: stretch;
  width: 1px;
  min-height: 4.5rem;
  max-height: 6.5rem;
  margin-block: auto;
  background: linear-gradient(
    180deg,
    rgba(212, 175, 55, 0) 0%,
    rgba(212, 175, 55, 0.85) 18%,
    rgba(248, 227, 164, 0.95) 50%,
    rgba(212, 175, 55, 0.85) 82%,
    rgba(212, 175, 55, 0) 100%
  );
}

.tpa-page .tpa-next__label {
  margin: 0;
  color: var(--brand-gold, #d4af37);
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.tpa-page .tpa-next__content {
  max-width: min(42rem, 100%);
  text-align: left;
}

.tpa-page .tpa-next__text {
  margin: 0.45rem 0 0;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.15vw, 1.1875rem);
  font-weight: 500;
  line-height: 1.58;
}

.tpa-page .tpa-next__accent {
  color: var(--brand-gold, #d4af37);
  font-weight: 600;
}

@media (max-width: 960px) {
  .tpa-agreement__grid {
    grid-template-columns: 1fr;
  }

  .tpa-viewer {
    min-height: clamp(22rem, 48vh, 28rem);
    max-height: min(640px, 72vh);
  }

  .tpa-viewer__brand-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .tpa-viewer__brand-copy {
    text-align: center;
  }

  .tpa-hero__image {
    min-height: 12.5rem;
    max-height: none;
    object-position: 58% center;
  }

  .tpa-hero__shade {
    background: linear-gradient(
      180deg,
      rgba(253, 249, 243, 0.92) 0%,
      rgba(253, 249, 243, 0.78) 42%,
      rgba(253, 249, 243, 0.22) 68%,
      rgba(253, 249, 243, 0.05) 100%
    );
  }

  .tpa-hero__copy {
    position: relative;
    inset: auto;
    background: var(--partner-cream, #fdf9f3);
    padding-block: clamp(1.25rem, 4vw, 1.75rem);
  }

  .tpa-accept__actions {
    flex-direction: column;
  }

  .tpa-accept__btn {
    width: 100%;
    flex: none;
  }

  .tpa-page .tpa-next__banner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.85rem;
    min-height: 0;
    width: 100%;
    max-width: 36rem;
  }

  .tpa-page .tpa-next__divider {
    display: none;
  }

  .tpa-page .tpa-next__icon {
    justify-self: center;
  }

  .tpa-page .tpa-next__shield {
    width: clamp(5.5rem, 24vw, 6.5rem);
  }

  .tpa-page .tpa-next__content {
    width: 100%;
    text-align: left;
  }
}