/* AGB-Seite (DE/FR) – eigene Klassen, unabhängig vom fest kompilierten site.css. */

.agb { --agb-accent: #febd0f; --agb-card: #111827; --agb-line: rgba(255, 255, 255, .08); }

/* Kopf */
.agb-hero { padding: 9rem 1.5rem 3.5rem; border-bottom: 1px solid var(--agb-line);
  background: radial-gradient(ellipse at top, rgba(254, 189, 15, .07), transparent 60%); }
.agb-hero__inner { max-width: 72rem; margin: 0 auto; }
.agb-hero__eyebrow { margin-bottom: .75rem; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--agb-accent); }
.agb-hero__title { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; font-weight: 700; color: #fff; }
.agb-hero__meta { margin-top: 1rem; font-size: .9375rem; color: #9ca3af; }
.agb-print { color: #d1d5db; text-decoration: underline; text-underline-offset: 3px; }
.agb-print:hover, .agb-print:focus-visible { color: var(--agb-accent); outline: none; }

/* Raster: Inhaltsverzeichnis links, Text rechts */
.agb-layout { max-width: 72rem; margin: 0 auto; padding: 3rem 1.5rem 6rem; display: grid; gap: 2.5rem; }
@media (min-width: 1024px) {
  .agb-layout { grid-template-columns: 17rem minmax(0, 1fr); gap: 4rem; }
  .agb-toc { position: sticky; top: 8rem; align-self: start; max-height: calc(100vh - 10rem); overflow-y: auto; }
}

.agb-toc__box { border: 1px solid var(--agb-line); border-radius: 1rem; background: var(--agb-card); padding: 1rem 1.25rem; }
.agb-toc__title { cursor: pointer; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9ca3af; list-style: none; }
.agb-toc__title::-webkit-details-marker { display: none; }
.agb-toc__title::after { content: '+'; float: right; color: var(--agb-accent); }
.agb-toc__box[open] .agb-toc__title::after { content: '–'; }
.agb-toc__list { margin-top: .75rem; list-style: none; padding: 0; }
.agb-toc__link { display: flex; gap: .5rem; padding: .35rem .5rem; margin: 0 -.5rem; border-radius: .5rem; font-size: .875rem; line-height: 1.4; color: #d1d5db; }
.agb-toc__link:hover, .agb-toc__link:focus-visible { background: rgba(254, 189, 15, .08); color: #fff; outline: none; }
.agb-toc__link.is-active { color: var(--agb-accent); }
.agb-toc__nr { flex-shrink: 0; min-width: 1.6rem; color: #6b7280; font-variant-numeric: tabular-nums; }

/* Text */
.agb-body { min-width: 0; max-width: 46rem; }
.agb-chapter { scroll-margin-top: 8rem; padding-bottom: 2.25rem; margin-bottom: 2.25rem; border-bottom: 1px solid var(--agb-line); }
.agb-chapter:last-of-type { border-bottom: 0; }
.agb-chapter__title { margin-bottom: 1rem; font-size: 1.375rem; line-height: 1.3; font-weight: 700; color: #fff; }
.agb-chapter__nr { color: var(--agb-accent); margin-right: .25rem; }
.agb-clause + .agb-clause, .agb-clause__text + .agb-clause { margin-top: 1rem; }
.agb-clause__head { margin-bottom: .35rem; font-weight: 700; color: #fff; }
.agb-clause__nr { color: var(--agb-accent); font-weight: 700; font-variant-numeric: tabular-nums; margin-right: .35rem; }
.agb-clause__text { font-size: 1rem; line-height: 1.75; color: #d1d5db; hyphens: auto; -webkit-hyphens: auto; }
.agb-footnote { margin-top: 1rem; font-size: .8125rem; color: #6b7280; }

/* Tabelle CAD-Abo */
.agb-table-wrap { margin-top: .75rem; overflow-x: auto; border: 1px solid var(--agb-line); border-radius: .75rem; }
.agb-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .875rem; }
.agb-table th, .agb-table td { padding: .7rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--agb-line); }
.agb-table thead th { font-size: .75rem; font-weight: 700; line-height: 1.35; color: var(--agb-accent); background: rgba(255, 255, 255, .02); hyphens: auto; -webkit-hyphens: auto; }
.agb-table tbody th { color: #fff; font-weight: 700; }
.agb-table td { color: #d1d5db; }
.agb-table td:nth-child(2) { white-space: nowrap; }
.agb-table tbody tr:last-child th, .agb-table tbody tr:last-child td { border-bottom: 0; }

/* Entwurf */
.agb-chapter--draft { position: relative; padding: 1.5rem; border: 1px dashed rgba(254, 189, 15, .5); border-radius: 1rem; background: rgba(254, 189, 15, .03); }
.agb-draft-note { margin-bottom: 1rem; font-size: .8125rem; font-weight: 600; color: var(--agb-accent); }
.agb-draft-badge { display: inline-block; margin-left: .25rem; padding: 0 .4rem; border-radius: 9999px; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #05080f; background: var(--agb-accent); vertical-align: middle; }
.agb-offen { padding: 0 .3rem; border-radius: .25rem; font-weight: 700; color: #05080f; background: var(--agb-accent); }

/* Druck */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff !important; color: #000 !important; }
  #site-header, footer, #cookie-banner, #cookie-toggle-btn, .agb-no-print, .agb-toc { display: none !important; }
  .agb-hero { padding: 0 0 6mm; border: 0; background: none; }
  .agb-hero__eyebrow, .agb-chapter__nr, .agb-clause__nr { color: #000; }
  .agb-hero__title, .agb-chapter__title, .agb-clause__head { color: #000; }
  .agb-hero__title { font-size: 20pt; }
  .agb-hero__meta, .agb-footnote { color: #333; }
  .agb-layout { display: block; padding: 0; max-width: none; }
  .agb-body { max-width: none; }
  .agb-chapter { padding-bottom: 4mm; margin-bottom: 4mm; border-color: #ccc; }
  .agb-chapter__title { font-size: 12.5pt; margin-bottom: 2mm; break-after: avoid; page-break-after: avoid; }
  .agb-clause__text { font-size: 10pt; line-height: 1.45; color: #000; }
  .agb-clause { break-inside: avoid; page-break-inside: avoid; }
  .agb-table-wrap { overflow: visible; border-color: #999; }
  .agb-table { min-width: 0; font-size: 9pt; }
  .agb-table th, .agb-table td { border-color: #ccc; color: #000 !important; background: none !important; }
  .agb-chapter--draft { border-color: #999; background: none; }
  .agb-draft-note, .agb-offen { color: #000; background: none; border: 1px solid #000; }
}

@media (prefers-reduced-motion: no-preference) { html:has(.agb) { scroll-behavior: smooth; } }
