/* Pfotenheft – Bausteine für Rechtliches (Nutzungsbedingungen, AGB, Datenschutz) */

.legal__card { max-width: 920px; }
.legal .lead { margin-top: 16px; font-size: 1.08rem; line-height: 1.65; color: #3E4348; }
.legal h2 { scroll-margin-top: 110px; }
.legal h2 .num {
  display: inline-grid;
  place-items: center;
  min-width: 1.9em;
  height: 1.9em;
  margin-right: 10px;
  padding: 0 .4em;
  border-radius: 10px;
  background: var(--ink);
  color: var(--lime);
  font-size: .78em;
  vertical-align: .12em;
}
.legal .i-sm { width: 1.1em; height: 1.1em; vertical-align: -.18em; }
.legal svg.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Kopfzeile mit Stand und Geltung */
.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.legal .meta-chips { padding-left: 0; }
.meta-chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: .86rem;
  font-weight: 500;
}
.meta-chips svg { width: 16px; height: 16px; }

/* Vertrauens-Kacheln */
.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.trust__tile {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out), border-color .35s;
}
.trust__tile:hover { transform: translateY(-3px); border-color: #d6d6cc; box-shadow: var(--shadow-card); }
.trust__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--lime);
  color: var(--ink);
}
.trust__icon svg { width: 22px; height: 22px; }
.trust__tile strong { display: block; margin-top: 12px; font-size: 1rem; letter-spacing: -.01em; color: var(--ink); }
.trust__tile span { display: block; margin-top: 4px; font-size: .88rem; line-height: 1.5; color: var(--gray); }
.trust__tile:nth-child(4n+2) .trust__icon { background: #E6E0FF; color: var(--violet); }
.trust__tile:nth-child(4n+3) .trust__icon { background: #FFE4DB; color: #D9532F; }
.trust__tile:nth-child(4n+4) .trust__icon { background: var(--ink); color: var(--lime); }

/* Inhaltsverzeichnis */
.toc {
  margin-top: 30px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--soft);
}
.toc p { margin: 0 0 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.legal .toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.toc li { margin: 0 !important; counter-increment: toc; }
.toc a {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  color: var(--ink);
  font-size: .94rem;
  text-decoration: none;
}
.toc a::before { content: counter(toc); min-width: 1.4em; color: var(--gray); font-variant-numeric: tabular-nums; }
.toc a:hover { text-decoration: underline; }

/* Datenweg: Gerät → verschlüsselt → Frankfurt */
.flow {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 22px;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--ink);
  color: #fff;
  isolation: isolate;
}
.flow::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(123, 97, 255, .55), transparent);
  z-index: -1;
}
.flow::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -10%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 122, 89, .35), transparent);
  z-index: -1;
}
.flow__node { display: flex; align-items: center; gap: 12px; }
.flow__node b { display: block; font-size: .98rem; }
.flow__node small { display: block; color: var(--on-dark); font-size: .82rem; }
.flow__badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--lime);
}
.flow__badge svg { width: 22px; height: 22px; }
.flow__node--end .flow__badge { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.flow__line {
  position: relative;
  width: 2px;
  height: 34px;
  margin: 6px 0 6px 22px;
  background: repeating-linear-gradient(180deg, rgba(205, 245, 100, .55) 0 6px, transparent 6px 12px);
}
.flow__line::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px 2px rgba(205, 245, 100, .8);
  animation: flow-y 2.4s var(--ease-out) infinite;
}
.flow__line:nth-of-type(4)::after { animation-delay: 1.2s; }
@keyframes flow-y { from { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { top: 100%; opacity: 0; } }
.legal .flow p { margin: 14px 0 0; color: var(--on-dark); font-size: .86rem; }
@media (min-width: 720px) {
  .flow { grid-template-columns: auto 1fr auto 1fr auto; align-items: center; padding: 26px 28px; }
  .flow__line {
    width: auto;
    height: 2px;
    margin: 0 16px;
    background: repeating-linear-gradient(90deg, rgba(205, 245, 100, .55) 0 6px, transparent 6px 12px);
  }
  .flow__line::after { top: 50%; left: 0; margin: -4px 0 0; animation-name: flow-x; }
  @keyframes flow-x { from { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { left: 100%; opacity: 0; } }
  .flow p { grid-column: 1 / -1; }
}

/* Serverstandorte */
.servers { width: 100%; margin-top: 18px; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.legal .servers__note { margin-top: 10px; color: var(--gray); font-size: .82rem; }
.servers th {
  padding: 10px 12px;
  background: var(--soft);
  color: var(--gray);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
}
.servers th:first-child { border-radius: 12px 0 0 12px; }
.servers th:last-child { border-radius: 0 12px 12px 0; }
.servers td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: #3E4348; }
.servers tr:last-child td { border-bottom: 0; }
.servers td:first-child { color: var(--ink); }
.servers td:first-child b { display: block; font-weight: 600; }
.servers td:first-child small { display: block; margin-top: 2px; color: var(--gray); font-size: .82rem; }
.loc { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.loc small { display: block; font-weight: 400; color: var(--gray); white-space: normal; }
.loc__code {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--lime);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.loc__code--world { background: #E6E0FF; color: var(--violet); }
.dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3FB950;
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2.2s var(--ease-out) infinite;
}
.dot--world { background: var(--violet); }
@keyframes ping { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }
.tag {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .76rem;
  font-weight: 500;
  white-space: nowrap;
}
.tag--ok { background: #EAF8D2; border-color: #D3EFA6; color: #3B5A07; }
@media (max-width: 699.98px) {
  .servers thead { display: none; }
  .servers, .servers tbody, .servers tr, .servers td { display: block; width: 100%; }
  .servers tr { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; }
  .servers td { padding: 4px 0; border: 0; }
  .servers td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-top: 6px;
    color: var(--gray);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
}

@media (max-width: 559.98px) {
  .trust { gap: 8px; }
  .trust__tile { display: grid; grid-template-columns: 42px 1fr; column-gap: 14px; align-items: start; padding: 14px; }
  .trust__icon { grid-row: span 2; }
  .trust__tile strong { margin-top: 0; }
}

/* KI: Mensch entscheidet */
.ai-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
  counter-reset: ai;
}
.legal .ai-steps { padding-left: 0; }
.ai-steps li {
  position: relative;
  margin: 0 !important;
  padding: 16px;
  border-radius: 18px;
  background: var(--soft);
  counter-increment: ai;
  font-size: .9rem;
}
.ai-steps li::before {
  content: counter(ai);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: .82rem;
}
.ai-steps li b { display: block; color: var(--ink); }
@media (max-width: 559.98px) {
  .ai-steps { gap: 6px; }
  .ai-steps li { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; }
  .ai-steps li::before { grid-row: span 2; margin: 0; }
}
.ai-steps li.is-human { background: var(--lime); }
.ai-steps li.is-human::before { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.ai-steps li.is-ai { background: #EEEAFF; }
.ai-steps li.is-ai::before { content: "KI"; background: var(--violet); color: #fff; border-color: var(--violet); font-size: .7rem; }

/* Hinweis-Kästen */
/* .legal davor, weil style.css .callout für die App-Hinweise auf der Startseite unsichtbar und absolut setzt */
.legal .callout {
  position: static;
  display: flex;
  gap: 14px;
  width: auto;
  max-width: none;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 20px;
  background: #F6FBE8;
  border: 1px solid #E2F2B8;
  color: inherit;
  font: inherit;
  box-shadow: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.callout > svg { flex: none; width: 24px; height: 24px; margin-top: 2px; color: #4E7A00; }
.legal .callout p { margin-top: 0; }
.legal .callout p + p { margin-top: 8px; }
.legal .callout--violet { background: #F3F0FF; border-color: #E0D8FF; }
.callout--violet > svg { color: var(--violet); }
.legal .callout--coral { background: #FFF3EF; border-color: #FFDCD0; }
.callout--coral > svg { color: #D9532F; }

/* Haken-Liste */
.legal ul.checks { padding-left: 0; list-style: none; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121417' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.legal ul.crosses { padding-left: 0; list-style: none; }
.crosses li { position: relative; padding-left: 30px; }
.crosses li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFE4DB url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9532F' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Zwei-Spalten-Raster für Kurzfakten */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 16px; }
.facts > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; }
.facts b { display: block; color: var(--ink); font-size: .95rem; }
.legal .facts p { margin-top: 4px; font-size: .9rem; }

/* Teil-Trenner (AGB / AVV) */
.part {
  margin-top: 56px;
  padding: 22px 24px;
  border-radius: 22px;
  background: var(--ink);
  color: #fff;
}
.part .eyebrow { color: var(--lime); }
.legal .part h2 { margin-top: 6px; color: #fff; }
.legal .part p { margin-top: 8px; color: var(--on-dark); }

/* Querverweise unten */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 40px; }
.related a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color .25s, transform .3s var(--ease-spring);
}
.related a:hover { border-color: var(--ink); transform: translateY(-2px); }
.related a small { display: block; font-weight: 400; color: var(--gray); font-size: .8rem; }
.related svg { flex: none; width: 22px; height: 22px; }
.related a[aria-current="page"] { background: var(--soft); pointer-events: none; }

/* Häufige Fragen auf /hilfe */
.faq { margin-top: 14px; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: #fff; scroll-margin-top: 110px; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.3rem; line-height: 1; color: var(--gray); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 14px; }
.legal .faq details > div p { margin-top: 8px; }
.legal .faq details > div p:first-child { margin-top: 0; }

/* Fuß der Rechtsseiten */
.footer__legal a { margin-left: 2px; }

@media print {
  .nav, .flow::before, .flow::after, .related, .skip-link { display: none !important; }
  .legal { padding-top: 0; }
  .legal__card { border: 0; padding: 0; }
  .flow { background: #fff; color: var(--ink); border: 1px solid var(--line); }
}
