/* ═══════════════════════════════════════════════════
   InfiniSync — legal.css
   Shared by impressum.html and datenschutz.html
   ═══════════════════════════════════════════════════ */

/* ─── LAYOUT ─── */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
}

/* ─── PAGE LABEL ─── */
.page-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ─── HEADINGS ─── */
h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

/* ─── LINKS ─── */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── SECTION (shared by both pages) ─── */
.section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 80px;
}

/* impressum-style h2 (uppercase label) */
.section h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* datenschutz-style h2 (numbered with border) */
.section.numbered h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-num {
  background: rgba(64,77,255,0.15);
  color: var(--accent);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.75;
}

address { font-style: normal; }

ul {
  margin: 0.5rem 0 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

li {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

/* ─── INFO BLOCK ─── */
.info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
}

.info-block p { margin-bottom: 0.25rem; }
.info-block p:last-child { margin-bottom: 0; }

/* ─── TABLE OF CONTENTS ─── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.toc p {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc li {
  counter-increment: toc;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin: 0;
}

.toc li::before {
  content: counter(toc) ".";
  color: var(--accent);
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 18px;
}

.toc a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.toc a:hover { color: var(--accent); text-decoration: none; }

/* ─── RIGHTS GRID ─── */
.rights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.right-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.right-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--accent);
}

.right-card p { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* ─── COOKIE TABLE ─── */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.cookie-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.cookie-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.cookie-table tr:last-child td { border-bottom: none; }

/* ─── BADGES ─── */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-required { background: rgba(0,229,192,0.12); color: #00e5c0; }
.badge-optional  { background: rgba(255,95,126,0.12); color: #ff5f7e; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  main { padding: 6rem 1.25rem 3rem; }

  h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }

  .toc { padding: 1.25rem 1.5rem; }

  .info-block { padding: 1.25rem 1.5rem; }

  .rights-grid { grid-template-columns: 1fr 1fr; }

  .cookie-table { font-size: 0.8rem; }
  .cookie-table th,
  .cookie-table td { padding: 0.5rem 0.6rem; }
}

@media (max-width: 480px) {
  main { padding: 5.5rem 1rem 2.5rem; }

  .info-block { padding: 1rem 1.25rem; }

  /* TOC list */
  .toc ol { gap: 0.5rem; }

  /* Rights — 1 column on very small */
  .rights-grid { grid-template-columns: 1fr; }

  /* Cookie table — hide Laufzeit column to fit */
  .cookie-table th:nth-child(3),
  .cookie-table td:nth-child(3) { display: none; }

  /* Section heading smaller */
  .section.numbered h2 { font-size: 1.05rem; }
  .section h2 { font-size: 0.85rem; }
}
