/* ============================================================
   Digital Experts - legal pages (Privacy, Customer Terms, End User
   Terms), 2026.10.09 v2, in the dx system. Scoped to main.dx-legal-page.

   Forest hero (no image) with the title in wide caps and a mustard
   serif reply, the update date, and a small "product of Nice Wolf"
   line. Then a white reading section on the 12 column grid: a sticky
   contents list in the first quarter, the document from column 5.
   Clauses are numbered like the source documents, 1. / 1.1 / (a) /
   (i) / (A), with hanging numbers. The footer already uses .de-legal
   for its link row, so nothing here uses that class.
   ============================================================ */

/* --- Hero ----------------------------------------------------- */
.dx-legal-page .dx-legal-hero { min-height: min(62svh, 600px); background: var(--dx-forest); }
.dx-legal-page .dx-legal-hero::after { display: none; }
.dx-legal-page .dx-legal-kicker { color: var(--dx-mustard); margin-bottom: var(--dx-gap-s); }
.dx-legal-page .dx-legal-hero .dx-hero-title { font-size: clamp(40px, 5.6vw, 84px); }
/* The reply in the serif italic voice. Hero title spans pick up the
   wide caps from sitewide rules, so every property is reset here. */
.dx-legal-page .dx-legal-hero .dx-hero-title .dx-reply {
  display: block;
  max-width: 24ch;
  margin-top: 0.3em;
  font-family: var(--dx-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-variation-settings: normal;
  font-size: var(--dx-t-reply);
  text-transform: none;
  letter-spacing: -0.005em;
  line-height: 1.08;
  color: var(--dx-mustard);
}
.dx-legal-page .dx-legal-hero .dx-hero-foot { align-items: center; }
.dx-legal-page .dx-legal-hero .dx-hero-foot > .dx-body { font-size: 15px; color: var(--dx-cream-70); }
.dx-legal-page .dx-legal-by {
  margin: 0;
  font-family: var(--dx-sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--dx-cream-70);
  text-align: right;
}

/* --- Reading section ------------------------------------------ */
.dx-legal-page .dx-legal { padding-top: var(--dx-gap-l); }
.dx-legal-page .dx-legal .dx-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
}

/* Contents */
.dx-legal-page .dx-legal-toc {
  grid-column: 1 / span 3;
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 136px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.dx-legal-page .dx-legal-toc .dx-label { color: var(--dx-green); margin-bottom: 14px; }
.dx-legal-page .dx-legal-toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dx-burgundy); }
.dx-legal-page .dx-legal-toc li { margin: 0; border-bottom: 1px solid var(--dx-ink-line); }
.dx-legal-page .dx-legal-toc a {
  display: grid;
  grid-template-columns: 2.1em 1fr;
  padding: 9px 0;
  font-family: var(--dx-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--dx-ink-78);
  text-decoration: none;
  transition: color 0.15s ease;
}
.dx-legal-page .dx-legal-toc a span { color: var(--dx-orange); font-weight: 600; }
.dx-legal-page .dx-legal-toc a:hover { color: var(--dx-burgundy); }

/* Document */
.dx-legal-page .dx-legaldoc {
  grid-column: 5 / -1;
  max-width: 720px;
  font-family: var(--dx-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dx-ink-78);
}
.dx-legal-page .dx-legaldoc p { margin: 0 0 12px; font-size: inherit; line-height: inherit; }
.dx-legal-page .dx-legaldoc strong { font-weight: 600; color: var(--dx-burgundy); }
.dx-legal-page .dx-legaldoc a { color: var(--dx-green); text-decoration: underline; text-underline-offset: 3px; }
.dx-legal-page .dx-legaldoc a:hover { color: var(--dx-burgundy); }
.dx-legal-page .dx-legaldoc ol { list-style: none; margin: 0; padding: 0; }
.dx-legal-page .dx-legaldoc li { position: relative; margin: 0; }

/* Key terms (the two terms pages) */
.dx-legal-page .lgd-key {
  margin: 0 0 20px;
  padding: clamp(24px, 3vw, 36px);
  background: rgba(237, 228, 211, 0.55);
  border-top: 1px solid var(--dx-burgundy);
}
.dx-legal-page .lgd-key-h {
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dx-orange);
  margin-bottom: 18px !important;
}
.dx-legal-page .lgk { counter-reset: lgk; }
.dx-legal-page .lgk > li { counter-increment: lgk; padding-left: 2em; }
.dx-legal-page .lgk > li::before { content: counter(lgk, upper-alpha) "."; position: absolute; left: 0; top: 0; font-weight: 600; color: var(--dx-burgundy); }
.dx-legal-page .lgk > li:last-child > p { margin-bottom: 0; }
.dx-legal-page .lgd-updated { font-size: 14px !important; margin: 0 0 8px !important; }

/* Clauses */
.dx-legal-page .lg1 { counter-reset: lg1; }
.dx-legal-page .lg1 > li {
  counter-increment: lg1;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--dx-ink-line);
  scroll-margin-top: 112px;
}
.dx-legal-page .lgd-updated + .lg1 > li:first-child { margin-top: 40px; }
.dx-legal-page .dx-legaldoc > .lg1:first-child > li:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.dx-legal-page .lg1 > li > p:first-child {
  margin-bottom: 18px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--dx-burgundy);
  text-wrap: balance;
}
.dx-legal-page .lg1 > li > p:first-child strong { font-weight: inherit; }
.dx-legal-page .lg1 > li > p:first-child::before {
  content: counter(lg1, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--dx-orange);
}
.dx-legal-page .lg2 { counter-reset: lg2; }
.dx-legal-page .lg2 > li { counter-increment: lg2; padding-left: 3em; }
.dx-legal-page .lg2 > li::before { content: counter(lg1) "." counter(lg2); position: absolute; left: 0; top: 0; font-weight: 600; color: var(--dx-burgundy); }
.dx-legal-page .lg3 { counter-reset: lg3; margin-bottom: 12px; }
.dx-legal-page .lg3 > li { counter-increment: lg3; padding-left: 2.4em; }
.dx-legal-page .lg3 > li::before { content: "(" counter(lg3, lower-alpha) ")"; position: absolute; left: 0; top: 0; }
.dx-legal-page .lg4 { counter-reset: lg4; margin-bottom: 12px; }
.dx-legal-page .lg4 > li { counter-increment: lg4; padding-left: 2.6em; }
.dx-legal-page .lg4 > li::before { content: "(" counter(lg4, lower-roman) ")"; position: absolute; left: 0; top: 0; }
.dx-legal-page .lg5 { counter-reset: lg5; margin-bottom: 12px; }
.dx-legal-page .lg5 > li { counter-increment: lg5; padding-left: 2.4em; }
.dx-legal-page .lg5 > li::before { content: "(" counter(lg5, upper-alpha) ")"; position: absolute; left: 0; top: 0; }

/* --- Responsive ----------------------------------------------- */
@media (max-width: 900px) {
  .dx-legal-page .dx-legal-toc { display: none; }
  .dx-legal-page .dx-legaldoc { grid-column: 1 / -1; }
  .dx-legal-page .dx-legal-hero .dx-hero-foot > div { grid-column: 1 / -1; }
  .dx-legal-page .dx-legal-by { text-align: left; }
}
@media (max-width: 600px) {
  .dx-legal-page .dx-legal-hero { min-height: 0; padding-top: 136px; }
  .dx-legal-page .dx-legaldoc { font-size: 15px; }
  .dx-legal-page .lg2 > li { padding-left: 2.6em; }
  .dx-legal-page .lg3 > li, .dx-legal-page .lg4 > li, .dx-legal-page .lg5 > li { padding-left: 2.1em; }
}
