/* =========================================================
   HPS Rechtstexte: Impressum, Datenschutz, AGB, Haftungsausschluss
   Loads after styles.css and uses its tokens. Dark head, light sheet
   like the rest of the site. From 901 px: legal navigation on the
   left, the text in a readable column on the right.
   ========================================================= */

/* ---------- head ---------- */
.lhead { background: var(--ink); color: var(--on-dark); padding: calc(76px + clamp(40px, 6vw, 72px)) 0 calc(clamp(40px, 6vw, 72px) + var(--overlap)); }
.lhead__title { hyphens: manual; }
.lhead__meta { margin-top: 16px; color: var(--on-dark-muted); font-size: var(--fs-small); }

/* ---------- document ---------- */
.ldoc { padding-bottom: clamp(80px, 9vw, 128px); }
.ldoc__grid { display: grid; grid-template-columns: minmax(0, 1fr); }

/* phones and tablets: the footer already links the legal pages, the text starts right away */
.ldoc__nav { display: none; font-size: var(--fs-small); }
.ldoc__nav li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); text-decoration: none; }
.ldoc__nav li a:hover { color: var(--text); }
.ldoc__nav li a[aria-current="page"] { color: var(--text); font-weight: 700; }
.ldoc__toc { display: none; }

.ldoc__body { max-width: 680px; }
.ldoc__body > section + section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.ldoc__body h2 {
  margin-bottom: 16px; font-size: var(--fs-h3); font-stretch: 112%; font-weight: 750; letter-spacing: -.02em; line-height: 1.2;
  scroll-margin-top: 100px;
}
.ldoc__body h3 { margin: 24px 0 8px; font-size: var(--fs-body); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.ldoc__body p, .ldoc__body li, .ldoc__body address, .ldoc__body dd { font-size: var(--fs-body); font-style: normal; line-height: 1.6; }
.ldoc__body p + p, .ldoc__body p + ul, .ldoc__body ul + p, .ldoc__body address + p, .ldoc__body p + address { margin-top: 16px; }
.ldoc__body ul { margin: 0; padding-left: 1.15em; list-style: disc; }
.ldoc__body p, .ldoc__body address, .ldoc__dl { margin-block: 0; }
.ldoc__body li + li { margin-top: 4px; }
.ldoc__body li::marker { color: var(--text-muted); }
.ldoc__body a { color: var(--cta); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ldoc__body a:hover { color: var(--cta-hover); }
.ldoc__lead { font-size: var(--fs-h3) !important; line-height: 1.4 !important; letter-spacing: -.015em; }
.ldoc__muted { color: var(--text-muted); }

/* Impressum: label and value rows */
.ldoc__dl { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.ldoc__dl dt { padding-top: 16px; color: var(--text-muted); font-size: var(--fs-small); }
.ldoc__dl dd { margin: 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ldoc__dl dd:last-child { border-bottom: 0; }

/* the objection right has to stand apart from the rest (Art. 21 Abs. 4 DSGVO) */
.ldoc__box { margin-top: 24px; padding: 24px; border-radius: var(--r-md); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.ldoc__box h3 { margin-top: 0; }

/* AGB: one row per PDF, the whole row opens the document */
.ldoc__body .ldoc__files { margin-top: 24px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ldoc__body .ldoc__files li { margin: 0; border-bottom: 1px solid var(--line); }
.ldoc__body .ldoc__files a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 0; color: var(--text); text-decoration: none; overflow-wrap: normal;
}
.ldoc__file-t { display: block; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; transition: color .2s; }
.ldoc__file-d { display: block; margin-top: 4px; color: var(--text-muted); font-size: var(--fs-small); line-height: 1.5; }
.ldoc__file-m { display: block; margin-top: 8px; color: var(--text-muted); font-size: var(--fs-micro); }
.ldoc__files .icon { width: 18px; height: 18px; color: var(--cta); opacity: .45; transition: opacity .25s, transform .35s var(--ease-out); }
.ldoc__body .ldoc__files a:hover { color: var(--text); }
.ldoc__files a:hover .ldoc__file-t { color: var(--cta); }
.ldoc__files a:hover .icon, .ldoc__files a:focus-visible .icon { opacity: 1; transform: translateX(3px); }

@media (min-width: 561px) {
  .ldoc__dl { grid-template-columns: 11rem minmax(0, 1fr); column-gap: 24px; }
  .ldoc__dl dt, .ldoc__dl dd { padding-block: 16px; border-bottom: 1px solid var(--line); }
  .ldoc__dl dt:nth-last-child(2), .ldoc__dl dd:last-child { border-bottom: 0; }
}

@media (min-width: 901px) {
  .ldoc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 680px); column-gap: 64px; }
  .ldoc__nav {
    display: block; grid-column: 1; grid-row: 1; align-self: start; position: sticky; top: 100px;
    max-height: calc(100svh - 124px); overflow-y: auto; overscroll-behavior: contain;
  }
  .ldoc__nav ul { display: grid; }
  .ldoc__nav li a { min-height: 36px; }
  .ldoc__toc { display: block; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 300px; }
  .ldoc__toc p { margin-bottom: 4px; font-weight: 700; color: var(--text); }
  .ldoc__toc li a { min-height: 32px; }
  .ldoc__body { grid-column: 2; grid-row: 1; }
}
