/* =====================================================================
   TRP LEGAL · Standalone stylesheet for /impressum and /datenschutz
   Self-contained — does NOT depend on trp.css. Mirrors brand tokens.
   ===================================================================== */

:root {
  --tl-bg:        #0A0B0D;
  --tl-bg-2:      #0F1012;
  --tl-surface:   #14161A;
  --tl-surface-2: #1A1D22;
  --tl-line:      rgba(255,255,255,0.08);
  --tl-line-2:    rgba(255,255,255,0.14);
  --tl-ink:       #F5F5F4;
  --tl-ink-2:     #D6D6D3;
  --tl-ink-3:     #9CA0A6;
  --tl-ink-4:     #6A6E76;
  --tl-teal:      #2DD4BF;
  --tl-teal-2:    #14B8A6;
  --tl-green:     #16A34A;
  --tl-amber:     #F59E0B;
  --tl-mono:      "JetBrains Mono","SF Mono",ui-monospace,Menlo,monospace;
  --tl-sans:      "Inter",-apple-system,BlinkMacSystemFont,sans-serif;
  --tl-display:   "Manrope","Inter",sans-serif;
}

/* Reset — scoped to legal pages only */
.tl-root, .tl-root * { box-sizing: border-box; }
.tl-root {
  min-height: 100vh;
  background: var(--tl-bg);
  color: var(--tl-ink);
  font-family: var(--tl-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Hard reset of any leaking padding from trp.css on legal routes */
body:has(.tl-root) { padding-top: 0 !important; padding-bottom: 0 !important; }

/* ========================================================== TOPBAR */
.tl-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 28px);
  background: rgba(10,11,13,0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--tl-line);
}
.tl-topbar-back, .tl-topbar-print {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--tl-mono); font-size: 12px;
  letter-spacing: 0.04em; color: var(--tl-ink-3);
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--tl-line);
  background: transparent; cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
  text-decoration: none;
}
.tl-topbar-back:hover, .tl-topbar-print:hover {
  color: var(--tl-ink); border-color: var(--tl-line-2);
  background: rgba(255,255,255,0.03);
}
.tl-topbar-back svg, .tl-topbar-print svg { width: 14px; height: 14px; }
.tl-topbar-brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--tl-display); font-weight: 700; font-size: 15px;
  letter-spacing: -0.01em; color: var(--tl-ink);
  text-decoration: none;
}
.tl-topbar-brand .tl-mark {
  font-family: var(--tl-mono); font-weight: 700;
  letter-spacing: 0.18em; font-size: 13px; color: var(--tl-teal);
}
@media (max-width: 720px) {
  .tl-topbar-brand .tl-gmbh { display: none; }
  .tl-topbar-back span, .tl-topbar-print span { display: none; }
  .tl-topbar-back, .tl-topbar-print { padding: 8px; }
}

/* ========================================================== HERO */
.tl-hero {
  position: relative; overflow: hidden;
  padding: clamp(60px, 9vw, 120px) clamp(16px, 4vw, 32px) clamp(44px, 6vw, 80px);
  border-bottom: 1px solid var(--tl-line);
  background:
    radial-gradient(900px 400px at 12% -10%, rgba(45,212,191,0.10), transparent 60%),
    radial-gradient(700px 300px at 92% 0%, rgba(22,163,74,0.06), transparent 60%),
    linear-gradient(180deg, #0E1013 0%, var(--tl-bg) 100%);
}
.tl-hero-inner { max-width: 1160px; margin: 0 auto; }
.tl-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--tl-mono); font-size: 11.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--tl-teal);
  padding: 7px 12px;
  border: 1px solid rgba(45,212,191,0.30);
  border-radius: 999px;
  background: rgba(45,212,191,0.06);
}
.tl-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tl-teal); display: inline-block;
  box-shadow: 0 0 8px rgba(45,212,191,0.7);
}
.tl-title {
  margin: 22px 0 14px;
  font-family: var(--tl-display);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 800;
}
.tl-lead {
  max-width: 720px;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.55; color: var(--tl-ink-2);
}
.tl-meta {
  margin-top: 26px;
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-family: var(--tl-mono); font-size: 12px;
  color: var(--tl-ink-4); letter-spacing: 0.02em;
}
.tl-meta b { color: var(--tl-ink-2); font-weight: 600; }

/* ========================================================== BODY GRID */
.tl-body {
  max-width: 1160px; margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 32px) clamp(80px, 10vw, 140px);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}
@media (max-width: 960px) {
  .tl-body { grid-template-columns: 1fr; gap: 32px; }
}

/* ========================================================== TOC */
.tl-toc {
  position: sticky; top: 80px; align-self: start;
  font-family: var(--tl-mono); font-size: 12px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.tl-toc-label {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--tl-ink-4); padding-bottom: 14px;
  border-bottom: 1px solid var(--tl-line); margin-bottom: 14px;
}
.tl-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: tl; }
.tl-toc li { counter-increment: tl; }
.tl-toc a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 0; color: var(--tl-ink-4); text-decoration: none;
  border-left: 2px solid transparent; padding-left: 10px; margin-left: -12px;
  transition: color .15s, border-color .15s, background .15s;
  line-height: 1.4;
}
.tl-toc a::before {
  content: counter(tl, decimal-leading-zero);
  color: var(--tl-ink-4); opacity: 0.55; font-size: 10.5px;
}
.tl-toc a:hover { color: var(--tl-ink-2); }
.tl-toc a.is-active {
  color: var(--tl-teal);
  border-left-color: var(--tl-teal);
  background: rgba(45,212,191,0.04);
}
.tl-toc a.is-active::before { color: var(--tl-teal); opacity: 1; }

/* Mobile TOC = collapsible <details> */
@media (max-width: 960px) {
  .tl-toc { position: static; max-height: none; padding: 14px 16px; border: 1px solid var(--tl-line); border-radius: 14px; background: var(--tl-surface); }
  .tl-toc-label { padding: 0; margin: 0; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  .tl-toc-label::after { content: "▾"; font-family: var(--tl-sans); color: var(--tl-ink-3); transition: transform .2s; }
  .tl-toc[open] .tl-toc-label::after { transform: rotate(180deg); }
  .tl-toc ol { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tl-line); }
}

/* ========================================================== SECTIONS */
.tl-sections { min-width: 0; }
.tl-section {
  scroll-margin-top: 80px;
  padding: 28px 30px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--tl-surface) 0%, var(--tl-surface-2) 100%);
  border: 1px solid var(--tl-line);
  border-radius: 18px;
  position: relative;
  transition: border-color .25s, transform .25s;
}
.tl-section:hover { border-color: var(--tl-line-2); }
.tl-section-num {
  position: absolute; top: 22px; right: 24px;
  font-family: var(--tl-mono); font-size: 11px;
  letter-spacing: 0.12em; color: var(--tl-ink-4);
}
.tl-section h2 {
  font-family: var(--tl-display);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.2; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 16px;
  padding-right: 56px;
}
.tl-section h3 {
  font-family: var(--tl-display);
  font-size: 16px; font-weight: 700;
  margin: 22px 0 10px; color: var(--tl-ink);
  letter-spacing: -0.005em;
}
.tl-section p {
  margin: 0 0 14px; color: var(--tl-ink-2);
  font-size: 15px; line-height: 1.7;
}
.tl-section p:last-child { margin-bottom: 0; }
.tl-section strong { color: var(--tl-ink); font-weight: 600; }
.tl-section em { font-style: normal; color: var(--tl-teal); }

.tl-section a {
  color: var(--tl-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(45,212,191,0.35);
  transition: color .15s, text-decoration-color .15s;
}
.tl-section a:hover { color: #5EEAD4; text-decoration-color: var(--tl-teal); }

.tl-section ul {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.tl-section ul li {
  position: relative; padding-left: 20px;
  color: var(--tl-ink-2); font-size: 14.5px; line-height: 1.6;
}
.tl-section ul li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 8px; height: 1px; background: var(--tl-teal);
}

/* Definition card · address blocks etc. */
.tl-card {
  margin: 14px 0;
  padding: 18px 20px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--tl-line);
  border-radius: 12px;
  font-size: 14.5px; line-height: 1.7;
  color: var(--tl-ink-2);
}
.tl-card-label {
  display: block;
  font-family: var(--tl-mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--tl-ink-4); margin-bottom: 8px;
}

/* Tagged label rows (e.g. "Rechtsgrundlage: Art. 6...") */
.tl-tag {
  display: inline-block;
  font-family: var(--tl-mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 8px; margin-right: 8px;
  border-radius: 6px;
  background: rgba(45,212,191,0.10);
  color: var(--tl-teal);
  border: 1px solid rgba(45,212,191,0.20);
}

/* Contact CTA row at end of "Ihre Rechte" */
.tl-cta-row {
  margin-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.tl-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-family: var(--tl-sans); font-weight: 600; font-size: 14px;
  text-decoration: none !important;
  transition: transform .15s, background .15s, border-color .15s;
}
.tl-section a.tl-cta-primary,
.tl-cta.tl-cta-primary {
  background: var(--tl-teal); color: #062321;
}
.tl-section a.tl-cta-primary:hover,
.tl-cta.tl-cta-primary:hover { background: #5EEAD4; color: #062321; transform: translateY(-1px); }
.tl-section a.tl-cta-ghost,
.tl-cta.tl-cta-ghost {
  background: transparent; color: var(--tl-ink);
  border: 1px solid var(--tl-line-2);
}
.tl-section a.tl-cta-ghost:hover,
.tl-cta.tl-cta-ghost:hover { border-color: var(--tl-teal); color: var(--tl-teal); }

/* ========================================================== FOOTER (small) */
.tl-foot {
  border-top: 1px solid var(--tl-line);
  padding: 28px clamp(16px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  max-width: 1160px; margin: 0 auto;
  font-family: var(--tl-mono); font-size: 11.5px;
  color: var(--tl-ink-4); letter-spacing: 0.04em;
}
.tl-foot a { color: var(--tl-ink-3); text-decoration: none; transition: color .15s; }
.tl-foot a:hover { color: var(--tl-teal); }
.tl-foot-links { display: flex; gap: 18px; }

/* ========================================================== PRINT */
@media print {
  .tl-topbar, .tl-toc, .tl-cta-row, .tl-foot { display: none !important; }
  .tl-root { background: #fff !important; color: #000 !important; }
  .tl-hero { background: #fff !important; border-bottom: 2px solid #000; padding: 20px 0 16px; }
  .tl-title, .tl-section h2, .tl-section h3 { color: #000 !important; }
  .tl-section { background: #fff !important; border: none !important; padding: 8px 0 18px; margin: 0; border-radius: 0; break-inside: avoid; }
  .tl-section-num { color: #555 !important; }
  .tl-section p, .tl-section li, .tl-section strong, .tl-card { color: #000 !important; }
  .tl-section a { color: #000 !important; text-decoration: underline; }
  .tl-body { grid-template-columns: 1fr; padding: 12px 24px; max-width: 100%; }
  .tl-eyebrow { border: 1px solid #000; color: #000; background: transparent; }
  .tl-eyebrow-dot { background: #000 !important; box-shadow: none !important; }
}
