/* Legal documents share the same editorial canvas and reading measure as articles. */
body.legal-document-page .legal-page-inner {
  width: min(calc(100% - (var(--gutter) * 2)), 1280px) !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
}

/* Keep the document trail available while the reader moves through long policies. */
body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-page-inner > .breadcrumbs {
  position: sticky !important;
  top: 78px !important;
  z-index: 45 !important;
  width: fit-content !important;
  max-width: min(100%, calc(100vw - 36px)) !important;
  margin-bottom: -8px !important;
  -webkit-backdrop-filter: blur(16px) saturate(108%) !important;
  backdrop-filter: blur(16px) saturate(108%) !important;
}

html[data-theme="light"] body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-page.legal-page--editorial {
  background: #f8fafb !important;
  background-color: #f8fafb !important;
  background-image: none !important;
}

html[data-theme="light"] body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-page.legal-page--editorial::before {
  display: none !important;
  content: none !important;
}

html[data-theme="light"] body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-page-inner > .breadcrumbs {
  border-color: rgba(42, 78, 99, 0.14) !important;
  background: rgba(248, 250, 251, 0.9) !important;
  color: #465f6d !important;
  box-shadow: 0 9px 24px rgba(25, 54, 64, 0.1) !important;
}

html:not([data-theme="light"]) body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-page.legal-page--editorial {
  background: #151817 !important;
  background-color: #151817 !important;
  background-image: none !important;
}

html:not([data-theme="light"]) body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-page.legal-page--editorial::before {
  display: none !important;
  content: none !important;
}

html:not([data-theme="light"]) body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-page-inner > .breadcrumbs {
  border-color: rgba(210, 160, 109, 0.22) !important;
  background: rgba(21, 24, 23, 0.92) !important;
  color: rgba(244, 239, 231, 0.78) !important;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.28) !important;
}

body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-document-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  gap: 0 !important;
  margin-inline: auto !important;
  padding: 0 0 clamp(72px, 9vw, 124px) !important;
}

body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-content--editorial.legal-content--editorial {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  gap: 20px !important;
  margin-inline: auto !important;
  padding: clamp(24px, 5vw, 64px) !important;
  border-radius: 8px !important;
}

html[data-theme="light"] body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-content--editorial.legal-content--editorial {
  border-color: rgba(53, 78, 92, 0.2) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  background-image: none !important;
  box-shadow: 0 20px 52px rgba(23, 42, 54, 0.12) !important;
}

html:not([data-theme="light"]) body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-content--editorial.legal-content--editorial {
  border-color: rgba(210, 160, 109, 0.28) !important;
  background: #151817 !important;
  background-image: none !important;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.3) !important;
}

body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-content--editorial.legal-content--editorial > * {
  width: min(100%, 760px) !important;
  margin-inline: auto !important;
}

@media (max-width: 680px) {
  body.legal-document-page .legal-page-inner {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
    .legal-page-inner > .breadcrumbs {
    top: 68px !important;
    max-width: calc(100vw - 24px) !important;
  }

  /* Grid items default to min-width: auto. In the dark theme the document's
     intrinsic text width could therefore expand the reading card past its
     mobile container. Keep the full legal canvas inside the same measure as
     the light theme. */
  body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
    .legal-document-layout {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
    .legal-content--editorial.legal-content--editorial {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 22px 18px 28px !important;
    border-radius: 6px !important;
  }
}

/* Legal-document hero: keep document metadata readable without the heavy stamp. */
body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-document-hero.legal-document-hero {
  grid-template-columns: minmax(0, 1fr) !important;
}

.legal-document-updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin: clamp(20px, 3vw, 34px) 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-document-updated .material-symbols-outlined {
  color: #ad693d;
  font-size: 17px;
}

html[data-theme="light"] .legal-document-updated {
  color: rgba(30, 55, 68, 0.68);
}

html:not([data-theme="light"]) .legal-document-updated {
  color: rgba(244, 239, 231, 0.7);
}

html[data-theme="light"] body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-document-hero.legal-document-hero::before {
  background-color: #e7eaed !important;
  background-image:
    linear-gradient(90deg, rgba(67, 84, 95, 0.035), rgba(67, 84, 95, 0.075)),
    var(--section-faceted-strata) !important;
  background-blend-mode: normal, normal !important;
  filter: saturate(0.9) contrast(1.12) !important;
}

html[data-theme="light"] body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-document-hero.legal-document-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: 50%;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: 1px;
  margin-inline: -50vw;
  pointer-events: none;
  background: rgba(183, 105, 59, 0.5);
}

@media (max-width: 680px) {
  html[data-theme="light"] body.legal-document-page main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
    .legal-document-hero.legal-document-hero::before {
    background-position: center, 42% center !important;
    background-size: auto, auto 100% !important;
  }
}
