/* Document reading layer. The legal text and its original markup remain authoritative. */
body.legal-ds82 {
  background: #030712;
  color: var(--text-primary);
}

.legal-ds82 #main-content {
  overflow: clip;
  background:
    radial-gradient(ellipse 45rem 30rem at 8% 7%, rgba(112, 132, 255, .15), transparent 72%),
    radial-gradient(ellipse 35rem 24rem at 97% 23%, color-mix(in srgb, var(--gold) 8%, transparent), transparent 76%),
    #030712;
}

.legal-ds82 #main-content > .sec-hero-v4 {
  position: relative;
  padding: clamp(8.5rem, 13vw, 12rem) 1.25rem clamp(3.75rem, 8vw, 7rem) !important;
  background: transparent;
}

.legal-ds82 #main-content > .sec-hero-v4::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: 0;
  width: min(44vw, 36rem);
  aspect-ratio: 1;
  border: 1px solid rgba(112, 132, 255, .2);
  transform: rotate(24deg);
  pointer-events: none;
}

.legal-ds82 #main-content > .sec-hero-v4 .sec-narrow {
  position: relative;
  z-index: 1;
  text-align: left;
  margin-inline: auto;
}

.legal-ds82 #main-content > .sec-hero-v4 h1 {
  max-width: 18ch;
  margin-left: 0;
  font-family: var(--font-sans);
  font-size: clamp(3.25rem, 8vw, 6.6rem);
  line-height: .98;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.legal-ds82 #main-content > .sec-hero-v4 h1 span {
  font-family: var(--font-display);
  font-weight: 500;
}

.legal-ds82 #main-content > .sec-hero-v4 .fs-body-lg,
.legal-ds82 #main-content > .sec-hero-v4 .fs-annot {
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left;
}

.legal-ds82 .eb-label {
  color: var(--primary-soft);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-ds82 .legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  width: min(1240px, calc(100% - 2.5rem));
  margin-inline: auto;
  padding-top: clamp(2rem, 5vw, 4rem) !important;
}

.legal-ds82 .legal-wrap {
  min-width: 0;
  width: 100%;
  max-width: 840px;
  margin: 0;
  padding: 0;
}

.legal-ds82 .legal-body {
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.78;
}

.legal-ds82 .legal-body p,
.legal-ds82 .legal-body li {
  font-size: inherit;
  line-height: inherit;
}

.legal-ds82 .legal-body > p:first-of-type {
  color: var(--text-secondary);
  font-size: 1.13em;
}

.legal-ds82 .legal-body a {
  color: var(--primary-soft);
  text-underline-offset: .2em;
}

.legal-ds82 .legal-body a:hover {
  color: var(--gold);
}

.legal-ds82 .legal-section {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  scroll-margin-top: 7rem;
}

.legal-ds82 .legal-section .fs-h2 {
  margin: .35rem 0 1.4rem;
  padding-left: .9rem;
  border-left: 3px solid var(--primary);
  color: var(--text-primary);
  font-size: clamp(1.65rem, 3.3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.legal-ds82 .legal-meta,
.legal-ds82 .legal-highlight {
  border-radius: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.legal-ds82 .legal-meta {
  border: 1px solid rgba(112, 132, 255, .24);
  border-left: 3px solid var(--primary);
  background: rgba(112, 132, 255, .07);
}

.legal-ds82 .legal-highlight {
  border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 7.000000000000001%, transparent);
}

.legal-ds82 .legal-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  scrollbar-color: var(--primary) #101729;
}

.legal-ds82 .legal-body th,
.legal-ds82 .legal-body td {
  min-width: 8rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(112, 132, 255, .2);
  vertical-align: top;
}

.legal-ds82 .legal-body th {
  background: #172037;
  color: var(--text-primary);
}

.legal-ds82 .legal-toc {
  align-self: start;
  min-width: 0;
  border: 1px solid rgba(112, 132, 255, .2);
  background: rgba(13, 19, 48, .72);
}

.legal-ds82 .legal-toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.25rem;
  padding: .8rem 1rem;
  border: 0;
  color: var(--text-primary);
  background: transparent;
  font: 700 .86rem var(--font-sans);
  text-align: left;
  cursor: pointer;
}

.legal-ds82 .legal-toc__toggle::after {
  content: "+";
  color: var(--primary-soft);
  font-size: 1.25rem;
}

.legal-ds82 .legal-toc__toggle[aria-expanded="true"]::after { content: "−"; }

.legal-ds82 .legal-toc__links {
  display: grid;
  max-height: min(55vh, 32rem);
  overflow-y: auto;
  padding: .3rem .5rem .7rem;
}

.legal-ds82 .legal-toc__links[hidden] { display: none; }

.legal-ds82 .legal-toc__links a {
  display: block;
  padding: .6rem .7rem;
  border-left: 2px solid transparent;
  color: var(--text-secondary);
  font-size: .83rem;
  line-height: 1.35;
  text-decoration: none;
}

.legal-ds82 .legal-toc__links a:hover,
.legal-ds82 .legal-toc__links a[aria-current="location"] {
  border-color: var(--primary);
  color: var(--text-primary);
  background: rgba(112, 132, 255, .12);
}

.legal-ds82 .legal-reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 1200;
  width: var(--legal-progress, 0%);
  height: 3px;
  background: var(--primary);
  pointer-events: none;
}

.legal-ds82 :is(a, button):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (min-width: 1060px) {
  .legal-ds82 .legal-layout {
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  }
  /* The layout class is in the HTML: the text holds column 2 from the first paint and the
     sommaire inserted by detail-ds82.js fills column 1 without moving it (CLS 0.113). */
  .legal-ds82 .legal-layout > .legal-wrap { grid-column: 2; }
  .legal-ds82 .legal-layout > .legal-toc { grid-column: 1; grid-row: 1; }
  .legal-ds82 .legal-toc {
    position: sticky;
    top: 6rem;
    border: 0;
    border-left: 1px solid rgba(112, 132, 255, .25);
    background: transparent;
  }
  .legal-ds82 .legal-toc__toggle { display: none; }
  .legal-ds82 .legal-toc__links { display: grid; }
}

@media (max-width: 700px) {
  .legal-ds82 #main-content > .sec-hero-v4 h1 { font-size: clamp(2.9rem, 13vw, 4.7rem); }
  .legal-ds82 .legal-layout { width: min(100% - 2rem, 42rem); }
  .legal-ds82 .legal-body th,
  .legal-ds82 .legal-body td { min-width: 9rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .legal-ds82 .legal-toc__links a { transition: color .2s ease, background .2s ease, border-color .2s ease; }
}
