/*
 * Privacy, Terms, and Legal Scope.
 * Route-loaded after the shared theme so long-form legal content keeps a
 * readable centered rail, restrained geometry, and uncropped object artwork.
 */

.pa-legal-document-page,
.pa-legal-scope-page {
  --pa-legal-rail: var(--pa-rail-wide);
  --pa-legal-paper: #ffffff;
  --pa-legal-ink: #122233;
  --pa-legal-copy: #435668;
  --pa-legal-muted: #617486;
  --pa-legal-line: #d5e6eb;
  --pa-legal-soft: #eef8fa;
  color: var(--pa-legal-copy);
}

/* Privacy and Terms use the same editorial document composition. */
.pa-family-document .pa-legal-document-page > .pa-page-hero {
  min-height: clamp(29rem, 38vw, 34rem) !important;
  padding: clamp(2.25rem, 5vw, 4.5rem)
    max(1rem, calc((100vw - 84rem) / 2)) !important;
  grid-template-columns: minmax(0, 0.95fr) minmax(24rem, 0.78fr) !important;
  gap: clamp(2rem, 5vw, 5rem) !important;
  align-items: center;
}

.pa-legal-document-page > .pa-page-hero > div:first-child {
  max-width: 45rem;
}

.pa-legal-document-page > .pa-page-hero h1 {
  max-width: 12ch;
  margin-block: 0.65rem 0.9rem;
  font-size: clamp(2.75rem, 4.7vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.pa-legal-document-page > .pa-page-hero p {
  max-width: 64ch;
  line-height: 1.65;
}

.pa-legal-document-page > .pa-page-hero .pa-hero-media-frame.is-legal-object {
  display: grid !important;
  width: 100%;
  height: clamp(19rem, 27vw, 25rem) !important;
  min-height: 0 !important;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(8, 127, 140, 0.15) !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 53% 48%, rgba(179, 232, 238, 0.72), transparent 10rem),
    linear-gradient(145deg, #ffffff, #e9f7fa) !important;
  box-shadow: 0 22px 54px rgba(12, 50, 61, 0.11) !important;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.pa-legal-document-page > .pa-page-hero .pa-hero-media-frame.is-legal-object::after {
  background: none !important;
}

.pa-legal-document-page > .pa-page-hero .pa-hero-media-frame.is-legal-object img {
  width: min(100%, 29rem) !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 21rem !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: drop-shadow(0 20px 28px rgba(8, 127, 140, 0.16)) !important;
  transform: none !important;
}

.pa-family-document .pa-legal-document-page > .pa-legal-story-band {
  width: min(calc(100vw - 2rem), 82rem) !important;
  max-width: 82rem !important;
  height: clamp(19rem, 28vw, 23rem) !important;
  min-height: clamp(19rem, 28vw, 23rem);
  margin: clamp(1.75rem, 4vw, 3rem) auto clamp(2.25rem, 5vw, 4rem) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(19rem, 0.75fr) !important;
  overflow: hidden;
  border: 1px solid #bdd7dc;
  border-radius: 8px !important;
  background: #08242d;
  box-shadow: 0 24px 54px rgba(12, 50, 61, 0.12);
}

.pa-legal-document-page > .pa-legal-story-band::after {
  background: none !important;
}

.pa-legal-document-page > .pa-legal-story-band > img {
  order: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: clamp(19rem, 28vw, 23rem) !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
}

.pa-legal-document-page > .pa-legal-story-band > figcaption {
  position: static !important;
  z-index: 1;
  width: auto !important;
  min-width: 0;
  display: flex !important;
  flex-direction: column;
  justify-content: end;
  gap: 0.65rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) !important;
  color: #d8e8e8 !important;
  background:
    linear-gradient(150deg, rgba(18, 71, 80, 0.45), transparent 62%),
    #08242d !important;
}

.pa-legal-document-page > .pa-legal-story-band > figcaption span {
  color: #8fe8e4 !important;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pa-legal-document-page > .pa-legal-story-band > figcaption strong {
  max-width: 24ch;
  color: #ffffff !important;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.16;
}

.pa-family-document .pa-legal-document-page > .pa-doc-layout.is-two-column {
  width: 100% !important;
  max-width: var(--pa-legal-rail) !important;
  margin: 0 auto clamp(3rem, 6vw, 6rem) !important;
  grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr) !important;
  gap: clamp(1.25rem, 3vw, 2.75rem) !important;
  align-items: start;
}

.pa-legal-document-page .pa-doc-layout > .pa-toc-card {
  top: 6.5rem;
  border: 1px solid var(--pa-legal-line);
  border-radius: 8px;
  background: #f5fbfc;
  box-shadow: none;
  padding: 1.15rem;
}

.pa-legal-document-page .pa-toc-card :is(h2, a) {
  color: var(--pa-legal-ink) !important;
}

.pa-legal-document-page .pa-toc-card a:hover,
.pa-legal-document-page .pa-toc-card a:focus-visible {
  color: #087f8c !important;
}

.pa-family-document .pa-legal-document-page .pa-doc-content {
  width: 100% !important;
  max-width: none !important;
  border: 1px solid var(--pa-legal-line);
  border-radius: 8px;
  background: var(--pa-legal-paper);
  box-shadow: 0 20px 48px rgba(18, 34, 51, 0.07);
  padding: clamp(1.35rem, 3.25vw, 3rem);
}

.pa-legal-document-page .pa-doc-section {
  padding-block: clamp(1.25rem, 2.8vw, 2rem);
  border-color: var(--pa-legal-line);
}

.pa-legal-document-page .pa-doc-section :is(h2, h3, strong) {
  color: var(--pa-legal-ink) !important;
}

.pa-legal-document-page .pa-doc-section :is(p, li) {
  max-width: 82ch !important;
  color: var(--pa-legal-copy) !important;
  font-size: 0.98rem;
  line-height: 1.72;
}

.pa-legal-document-page .pa-doc-section a {
  color: #066f7b !important;
  text-underline-offset: 0.16em;
}

.pa-legal-document-page .pa-doc-callout {
  border: 1px solid #badde2;
  border-radius: 8px;
  background: var(--pa-legal-soft);
}

.pa-legal-document-page .pa-doc-callout :is(p, li) {
  color: #334b5a !important;
}

/* Legal Scope keeps its darker boundary-setting hero and clean icon language. */
.pa-family-document .pa-legal-scope-page > .pa-legal-hero {
  min-height: clamp(28rem, 38vw, 34rem) !important;
  padding: clamp(2.25rem, 5vw, 4.5rem)
    max(1rem, calc((100vw - 84rem) / 2)) !important;
  grid-template-columns: minmax(0, 0.92fr) minmax(24rem, 0.78fr) !important;
  gap: clamp(2rem, 5vw, 5rem) !important;
  background:
    radial-gradient(circle at 77% 22%, rgba(21, 174, 181, 0.18), transparent 23rem),
    linear-gradient(125deg, #071c25, #0b3138) !important;
}

.pa-legal-scope-page > .pa-legal-hero :is(h1, strong) {
  color: #ffffff !important;
}

.pa-legal-scope-page > .pa-legal-hero p {
  color: #cfdfdf !important;
}

.pa-legal-scope-page > .pa-legal-hero .pa-legal-operator {
  width: fit-content;
  margin-top: 1rem;
  border-left: 3px solid #56d4d0;
  background: rgba(255, 255, 255, 0.07);
  color: #d7e7e7 !important;
  padding: 0.7rem 0.85rem;
}

.pa-legal-scope-page > .pa-legal-hero .pa-legal-operator strong {
  color: #ffffff !important;
}

.pa-legal-scope-page > .pa-legal-hero .pa-legal-proof-strip span {
  border-color: rgba(180, 229, 228, 0.24);
  background: rgba(255, 255, 255, 0.055);
  color: #d7e7e7 !important;
}

.pa-legal-scope-page > .pa-legal-hero .pa-legal-proof-strip i {
  color: #72e1dd !important;
}

.pa-legal-scope-page > .pa-legal-hero .pa-legal-hero-visual {
  min-height: clamp(19rem, 27vw, 25rem);
  border: 1px solid rgba(157, 229, 229, 0.18);
  border-radius: 8px;
  overflow: hidden;
}

.pa-family-document .pa-legal-scope-page > .pa-theme-story-band {
  width: min(calc(100vw - 2rem), 82rem) !important;
  max-width: 82rem !important;
  height: clamp(17rem, 26vw, 22rem) !important;
  margin: clamp(1.75rem, 4vw, 3rem) auto !important;
  border: 1px solid #c4dde2;
  border-radius: 8px !important;
  box-shadow: 0 22px 48px rgba(12, 50, 61, 0.1);
}

.pa-legal-scope-page > .pa-theme-story-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pa-family-document .pa-legal-scope-page > .pa-legal-scope-map {
  width: 100% !important;
  max-width: var(--pa-legal-rail) !important;
  margin: clamp(2.25rem, 5vw, 4rem) auto !important;
  border: 1px solid var(--pa-legal-line);
  border-radius: 8px;
  background: var(--pa-legal-paper);
  box-shadow: 0 20px 48px rgba(18, 34, 51, 0.07);
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.pa-legal-scope-page .pa-legal-scope-map .pa-section-intro :is(h2, h3) {
  color: var(--pa-legal-ink) !important;
}

.pa-legal-scope-page .pa-legal-scope-map .pa-section-intro {
  width: 100%;
  max-width: none !important;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(20rem, 0.36fr);
  grid-template-areas:
    "kicker copy"
    "title copy";
  align-items: start;
  gap: 0.55rem clamp(2rem, 5vw, 5rem);
}

.pa-legal-scope-page .pa-legal-scope-map .pa-section-intro .pa-kicker {
  grid-area: kicker;
}

.pa-legal-scope-page .pa-legal-scope-map .pa-section-intro h2 {
  grid-area: title;
  max-width: 21ch;
  margin: 0;
}

.pa-legal-scope-page .pa-legal-scope-map .pa-section-intro p {
  grid-area: copy;
  color: var(--pa-legal-copy) !important;
  line-height: 1.65;
}

.pa-legal-scope-page .pa-legal-icon-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.pa-legal-scope-page .pa-legal-icon-grid article {
  min-height: 14rem;
  border: 1px solid var(--pa-legal-line);
  border-radius: 8px;
  background: #f6fbfc;
  padding: 1.1rem;
}

.pa-legal-scope-page .pa-legal-scope-icon {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid #b9dce1;
  border-radius: 8px;
  background: #e6f5f7;
  color: #087f8c;
  font-size: 1.35rem;
}

.pa-legal-scope-page .pa-legal-icon-grid h3 {
  margin-top: 1.5rem;
  color: var(--pa-legal-ink) !important;
  font-size: 1rem;
}

.pa-legal-scope-page .pa-legal-icon-grid p {
  color: var(--pa-legal-copy) !important;
  font-size: 0.84rem;
  line-height: 1.58;
}

.pa-family-document .pa-legal-scope-page > .pa-doc-layout {
  width: 100% !important;
  max-width: var(--pa-legal-rail) !important;
  margin: 0 auto clamp(3rem, 6vw, 6rem) !important;
  grid-template-columns: minmax(14rem, 16rem) minmax(0, 1fr) minmax(14rem, 16rem) !important;
  gap: clamp(1rem, 2.5vw, 2rem) !important;
}

.pa-legal-scope-page .pa-doc-layout > :is(.pa-toc-card, .pa-side-card) {
  border: 1px solid var(--pa-legal-line);
  border-radius: 8px;
  background: #f5fbfc;
  box-shadow: none;
}

.pa-family-document .pa-legal-scope-page .pa-doc-content {
  width: 100% !important;
  max-width: none !important;
  border: 1px solid var(--pa-legal-line);
  border-radius: 8px;
  background: var(--pa-legal-paper);
  box-shadow: 0 20px 48px rgba(18, 34, 51, 0.07);
  padding: clamp(1.25rem, 2.8vw, 2.5rem);
}

.pa-legal-scope-page .pa-doc-layout :is(h2, h3, strong) {
  color: var(--pa-legal-ink) !important;
}

.pa-legal-scope-page .pa-doc-layout :is(p, li) {
  color: var(--pa-legal-copy) !important;
  line-height: 1.68;
}

.pa-legal-scope-page .pa-legal-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.pa-legal-scope-page .pa-legal-mini-grid .pa-info-card {
  border: 1px solid var(--pa-legal-line);
  border-radius: 8px;
  background: #f7fbfc;
}

@media (max-width: 1180px) {
  .pa-family-document .pa-legal-document-page > .pa-doc-layout.is-two-column {
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr) !important;
  }

  .pa-legal-scope-page .pa-legal-icon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pa-family-document .pa-legal-scope-page > .pa-doc-layout {
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr) !important;
  }

  .pa-legal-scope-page .pa-doc-layout > .pa-side-card {
    grid-column: 2;
  }
}

@media (max-width: 991.98px) {
  .pa-family-document .pa-legal-document-page > .pa-page-hero,
  .pa-family-document .pa-legal-scope-page > .pa-legal-hero {
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pa-legal-document-page > .pa-page-hero > div:first-child,
  .pa-legal-scope-page > .pa-page-hero > div:first-child {
    max-width: 48rem;
  }

  .pa-legal-document-page > .pa-page-hero .pa-hero-media-frame.is-legal-object,
  .pa-legal-scope-page > .pa-legal-hero .pa-legal-hero-visual {
    height: clamp(18rem, 52vw, 24rem) !important;
  }

  .pa-family-document .pa-legal-document-page > .pa-doc-layout.is-two-column,
  .pa-family-document .pa-legal-scope-page > .pa-doc-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pa-legal-document-page .pa-doc-layout > .pa-toc-card,
  .pa-legal-scope-page .pa-doc-layout > .pa-toc-card {
    position: static;
  }

  .pa-legal-scope-page .pa-doc-layout > .pa-side-card {
    grid-column: auto;
  }
}

@media (max-width: 767.98px) {
  .pa-family-document .pa-legal-document-page > .pa-page-hero,
  .pa-family-document .pa-legal-scope-page > .pa-legal-hero {
    padding: 2.5rem 2rem !important;
    gap: 1.6rem !important;
  }

  .pa-legal-document-page > .pa-page-hero h1,
  .pa-legal-scope-page > .pa-page-hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.5rem);
  }

  .pa-legal-document-page > .pa-page-hero .pa-hero-media-frame.is-legal-object,
  .pa-legal-scope-page > .pa-legal-hero .pa-legal-hero-visual {
    height: 16rem !important;
    min-height: 16rem;
  }

  .pa-family-document .pa-legal-document-page > .pa-legal-story-band {
    width: calc(100vw - 2rem) !important;
    height: auto !important;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pa-legal-document-page > .pa-legal-story-band > img {
    min-height: 14rem !important;
    height: 14rem !important;
  }

  .pa-legal-document-page > .pa-legal-story-band > figcaption {
    min-height: 10rem;
    justify-content: center;
  }

  .pa-family-document .pa-legal-scope-page > .pa-theme-story-band {
    width: calc(100vw - 2rem) !important;
    height: 14rem !important;
  }

  .pa-legal-scope-page .pa-legal-scope-map .pa-section-intro {
    display: block;
  }

  .pa-legal-scope-page .pa-legal-scope-map .pa-section-intro p {
    margin-top: 0.75rem;
  }

  .pa-legal-scope-page .pa-legal-icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pa-legal-scope-page .pa-legal-icon-grid article {
    min-height: 0;
  }

  .pa-legal-document-page .pa-doc-content,
  .pa-legal-scope-page .pa-doc-content {
    padding: 1.15rem !important;
  }
}

/* Terms closure: retain the authored Light composition while bringing the two
   narrowly failing hero colors over the strict contrast threshold and giving
   the story caption a deterministic surface for contrast analysis. */
html[data-pa-theme="light"] .pa-terms-page > .pa-page-hero .pa-eyebrow {
  color: #066f7b !important;
}

html[data-pa-theme="light"]
  .pa-terms-page > .pa-page-hero > div:first-child > p:not(.pa-legal-operator) {
    color: #435668 !important;
}

html[data-pa-theme="light"] .pa-terms-page > .pa-legal-story-band > figcaption {
  background: #08242d !important;
}

/* Terms uses the same wide legal story composition as Privacy. In Dark, keep
   both children inside the global bounded-media row instead of leaving the
   taller Light minimums clipped behind it. The long legal paper is a solid
   canonical surface so its text has one deterministic background. */
html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
  #main-content#main-content#main-content
  .pa-terms-page .pa-doc-content {
    background: #152935 !important;
    background-image: none !important;
}

html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
  #main-content#main-content#main-content
  .pa-terms-page > .pa-legal-story-band > img[data-pa-theme-media="content"] {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
}

html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
  #main-content#main-content#main-content
  .pa-terms-page > .pa-legal-story-band > figcaption {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    justify-content: center;
    gap: 0.5rem;
    background: #0f1e27 !important;
    padding: 1.15rem 1.5rem !important;
}

html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
  #main-content#main-content#main-content
  .pa-terms-page > .pa-legal-story-band > figcaption > strong {
    max-width: none;
    font-size: clamp(1.25rem, 1.55vw, 1.4rem);
    line-height: 1.22;
    padding-block: 0.2rem;
}

@media (max-width: 767.98px) {
  html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
    #main-content#main-content#main-content
    .pa-terms-page > .pa-legal-story-band {
      height: auto !important;
      max-height: none !important;
    }

  html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
    #main-content#main-content#main-content
    .pa-terms-page > .pa-legal-story-band > img[data-pa-theme-media="content"] {
      height: 11rem !important;
      max-height: 11rem !important;
    }

  html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
    #main-content#main-content#main-content
    .pa-terms-page > .pa-legal-story-band > figcaption {
      height: auto !important;
      min-height: 10rem !important;
      max-height: none !important;
    }

  html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
    #main-content#main-content#main-content
    .pa-terms-page #warranties > p:nth-child(3) {
      padding-inline-end: 0.125rem;
    }
}

@media (max-width: 479.98px) {
  .pa-legal-scope-page .pa-legal-icon-grid,
  .pa-legal-scope-page .pa-legal-mini-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pa-legal-document-page *,
  .pa-legal-scope-page * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Privacy closure: keep the Light document intact while clearing its narrowly
   failing text contrast and giving Axe a deterministic story-caption surface. */
html[data-pa-theme="light"] .pa-privacy-page > .pa-page-hero .pa-eyebrow {
  color: #066f7b !important;
}

html[data-pa-theme="light"]
  .pa-privacy-page > .pa-page-hero > div:first-child > p:not(.pa-legal-operator) {
    color: #435668 !important;
}

html[data-pa-theme="light"] .pa-privacy-page > .pa-legal-story-band > figcaption {
  background: #08242d !important;
}

html[data-pa-theme="light"] .pa-privacy-page .btn-outline-danger {
  border-color: #b42333 !important;
  color: #b42333 !important;
}

html[data-pa-theme="light"] .pa-privacy-page .btn-outline-danger:is(:hover, :focus-visible) {
  background: #b42333 !important;
  color: #ffffff !important;
}

/* The global Dark media limit intentionally keeps wide story imagery below a
   quarter viewport. Align Privacy's children to that bounded row so they do
   not retain taller Light-theme minimums behind the clipping boundary. */
html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
  #main-content#main-content#main-content
  .pa-privacy-page > .pa-legal-story-band > img[data-pa-theme-media="content"] {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
}

html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
  #main-content#main-content#main-content
  .pa-privacy-page > .pa-legal-story-band > figcaption {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    background: #0f1e27 !important;
}

@media (max-width: 767.98px) {
  html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
    #main-content#main-content#main-content
    .pa-privacy-page > .pa-legal-story-band {
      height: auto !important;
      max-height: none !important;
    }

  html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
    #main-content#main-content#main-content
    .pa-privacy-page > .pa-legal-story-band > img[data-pa-theme-media="content"] {
      height: 11rem !important;
      max-height: 11rem !important;
    }

  html[data-pa-theme="dark"] body.pa-body.pa-family-document:not(.pa-protected-workspace)
    #main-content#main-content#main-content
    .pa-privacy-page > .pa-legal-story-band > figcaption {
      height: auto !important;
      min-height: 10rem !important;
      max-height: none !important;
    }
}
