/* Shared editorial cards for the dark article and site-document experience. */
html:not([data-theme="light"]) body :is(
  .article-card,
  .article-reading-card,
  .legal-document-hero,
  .legal-content--editorial
) {
  border: 1px solid rgba(210, 160, 109, 0.28) !important;
  border-radius: 0 !important;
  background: #151817 !important;
  background-color: #151817 !important;
  background-image: none !important;
  box-shadow: none !important;
}

html:not([data-theme="light"]) body .article-card::before {
  display: block !important;
  background-image: var(--article-card-image) !important;
  filter: saturate(0.5) contrast(1.08) brightness(0.44) !important;
  opacity: 0.3 !important;
  content: "" !important;
}

html:not([data-theme="light"]) body .article-card::after,
html:not([data-theme="light"]) body .article-card:hover::after,
html:not([data-theme="light"]) body .article-card:focus-visible::after {
  display: none !important;
  background: none !important;
  background-image: none !important;
  content: none !important;
}

html:not([data-theme="light"]) body .article-card:is(:hover, :focus-visible) {
  border-color: rgba(210, 160, 109, 0.48) !important;
  background: #151817 !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: translateY(-2px);
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card {
  grid-template-columns: 54px minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto auto auto !important;
  min-height: 250px !important;
  gap: 10px 24px !important;
  align-content: start !important;
  padding: 20px 26px 24px !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-index {
  grid-column: 1 !important;
  grid-row: 1 / -1 !important;
  align-self: start !important;
  padding-top: 3px;
  color: #b77d45 !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-icon {
  display: none !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card h2 {
  grid-column: 2 / -1 !important;
  grid-row: 1 !important;
  max-width: 980px;
  margin: 0 !important;
  color: #f4efe7 !important;
  font-size: clamp(1.35rem, 2.15vw, 1.9rem) !important;
  line-height: 1.16 !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-category {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: start;
  width: fit-content;
  padding: 6px 10px !important;
  border: 1px solid rgba(183, 125, 69, 0.36);
  border-radius: 999px;
  color: #c28b54 !important;
  font-size: 0.68rem !important;
  line-height: 1 !important;
  letter-spacing: 0.08em !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-meta {
  grid-column: 3 !important;
  grid-row: 2 !important;
  align-self: center;
  justify-self: end;
  color: rgba(244, 239, 231, 0.64) !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card > p {
  grid-column: 2 / -1 !important;
  grid-row: 3 !important;
  max-width: 980px;
  margin: 0 !important;
  color: rgba(244, 239, 231, 0.76) !important;
  font-size: 0.98rem !important;
  line-height: 1.62 !important;
}

html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-link {
  grid-column: 2 / -1 !important;
  grid-row: 4 !important;
  display: flex !important;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 16px !important;
  border: 1px solid rgba(183, 125, 69, 0.3);
  color: #c28b54 !important;
}

/* Legal documents use the same number-and-copy card composition. */
html:not([data-theme="light"]) body .legal-document-hero {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  min-height: 0 !important;
  gap: 0 24px !important;
  align-items: start !important;
  margin-top: clamp(24px, 3vw, 36px) !important;
  margin-bottom: 18px !important;
  padding: 20px 26px 24px !important;
  overflow: hidden !important;
}

html:not([data-theme="light"]) body .legal-document-hero::before,
html:not([data-theme="light"]) body .legal-document-hero::after {
  display: none !important;
  background: none !important;
  content: none !important;
}

html:not([data-theme="light"]) body .legal-document-heading {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

html:not([data-theme="light"]) body .legal-document-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 10px !important;
  padding: 6px 10px;
  border: 1px solid rgba(183, 125, 69, 0.36);
  border-radius: 999px;
  color: #c28b54 !important;
  font-size: 0.68rem !important;
  line-height: 1 !important;
}

html:not([data-theme="light"]) body .legal-document-hero h1 {
  margin: 0 !important;
  color: #f4efe7 !important;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.025em !important;
}

html:not([data-theme="light"]) body .legal-document-lede {
  max-width: 900px;
  margin: 14px 0 0 !important;
  color: rgba(244, 239, 231, 0.76) !important;
  font-size: 0.98rem !important;
  line-height: 1.62 !important;
}

html:not([data-theme="light"]) body .legal-document-stamp {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: block !important;
  min-height: 0 !important;
  padding: 3px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
}

html:not([data-theme="light"]) body .legal-document-stamp > :not(strong) {
  display: none !important;
}

html:not([data-theme="light"]) body .legal-document-stamp strong {
  display: block;
  color: #b77d45 !important;
  font: 700 0.84rem/1 "Plus Jakarta Sans", sans-serif !important;
}

html:not([data-theme="light"]) body .legal-document-layout {
  padding: 0 0 clamp(64px, 8vw, 100px) !important;
}

html:not([data-theme="light"]) body .legal-content--editorial {
  width: 100% !important;
  max-width: none !important;
  padding: clamp(26px, 4vw, 48px) !important;
}

html:not([data-theme="light"]) body .legal-content--editorial h2 {
  margin-top: clamp(38px, 5vw, 58px) !important;
  padding-top: 20px !important;
  border-top-color: rgba(183, 125, 69, 0.28) !important;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem) !important;
}

@media (max-width: 720px) {
  html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto auto !important;
    min-height: 0 !important;
    gap: 10px 14px !important;
    padding: 18px !important;
  }

  html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card h2 {
    grid-column: 2 !important;
  }

  html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-category {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-meta {
    grid-column: 2 !important;
    grid-row: 3 !important;
    justify-self: start;
    flex-wrap: wrap;
  }

  html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card > p {
    grid-column: 2 !important;
    grid-row: 4 !important;
  }

  html:not([data-theme="light"]) body.article-archive-catalog-page .article-directory-card .article-card-link {
    grid-column: 2 !important;
    grid-row: 5 !important;
  }

  html:not([data-theme="light"]) body .legal-document-hero {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 0 14px !important;
    padding: 18px !important;
  }

  html:not([data-theme="light"]) body .legal-content--editorial {
    padding: 26px 20px !important;
  }
}

/* Win the legacy high-specificity decoration cascade without changing the
 * shared rules used by unrelated pages. */
html:not([data-theme="light"]) body:not(#editorial-card-surface) main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .article-card.article-card {
  border-color: rgba(210, 160, 109, 0.3) !important;
  background: #151817 !important;
  background-image: none !important;
  box-shadow: none !important;
}

html:not([data-theme="light"]) body:not(#editorial-card-surface) main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .article-card.article-card::before {
  display: block !important;
  background-image: var(--article-card-image) !important;
  filter: saturate(0.45) contrast(1.06) brightness(0.42) !important;
  opacity: 0.22 !important;
  content: "" !important;
}

html:not([data-theme="light"]) body:not(#editorial-card-surface) main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .article-card.article-card::after {
  display: none !important;
  background: none !important;
  content: none !important;
}

html:not([data-theme="light"]) body:not(#editorial-card-surface) main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-document-hero.legal-document-hero {
  min-height: 0 !important;
  height: auto !important;
  margin-top: clamp(24px, 3vw, 36px) !important;
  margin-bottom: 18px !important;
  padding: 20px 26px 24px !important;
  overflow: hidden !important;
  border-color: rgba(210, 160, 109, 0.3) !important;
  background: #151817 !important;
  background-image: none !important;
  box-shadow: none !important;
}

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

html:not([data-theme="light"]) body:not(#editorial-card-surface) main#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(151, 101, 61, 0.52) !important;
  background: #1a1713 !important;
  background-color: #1a1713 !important;
  background-image: none !important;
  box-shadow: inset 0 1px 0 rgba(210, 160, 109, 0.055) !important;
}

/* Site-document headers return to the same full-width faceted treatment as
 * the other internal pages. The reading card below keeps the deep bronze tone. */
html:not([data-theme="light"]) body:not(#editorial-card-surface) main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-document-hero.legal-document-hero {
  position: relative !important;
  isolation: isolate !important;
  min-height: clamp(350px, 30vw, 390px) !important;
  margin-top: -24px !important;
  margin-bottom: clamp(32px, 3vw, 42px) !important;
  padding: clamp(28px, 2.5vw, 36px) clamp(30px, 4vw, 52px) !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

html:not([data-theme="light"]) body:not(#editorial-card-surface) main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
  .legal-document-hero.legal-document-hero::before {
  position: absolute !important;
  top: calc(-1 * var(--internal-heading-top-extension)) !important;
  right: auto !important;
  bottom: 0 !important;
  left: calc(50% + var(--internal-heading-rail-extension) / 2) !important;
  z-index: 0 !important;
  display: block !important;
  width: calc(100vw + var(--internal-heading-rail-extension)) !important;
  height: auto !important;
  background-color: var(--internal-heading-surface) !important;
  background-image: var(--internal-heading-art) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  content: "" !important;
  pointer-events: none !important;
  transform: translateX(-50%) !important;
}

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

html:not([data-theme="light"]) body .legal-document-hero > * {
  position: relative !important;
  z-index: 1 !important;
}

html:not([data-theme="light"]) body .legal-document-hero h1 {
  font-size: clamp(2.5rem, 4.25vw, 4.15rem) !important;
  line-height: 1.04 !important;
}

html:not([data-theme="light"]) body .legal-content--editorial h2 {
  border-top-color: rgba(151, 101, 61, 0.48) !important;
  color: #ead8c2 !important;
}

html:not([data-theme="light"]) body .legal-content--editorial h3 {
  color: #dfc3a3 !important;
}

@media (max-width: 760px) {
  html:not([data-theme="light"]) body:not(#editorial-card-surface) main#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top#top
    .legal-document-hero.legal-document-hero {
    min-height: 300px !important;
    margin-top: -12px !important;
    margin-bottom: 34px !important;
    padding: 26px 20px 32px !important;
  }

  html:not([data-theme="light"]) body .legal-document-hero h1 {
    font-size: clamp(2.1rem, 10vw, 3rem) !important;
  }
}
