/* ============================================================================
   doc.css — Musterangebot, Prüfprotokoll, Schnellcheck
   ============================================================================
   Diese Seiten sind der Beweis für das, was die Startseite verspricht. Sie
   stehen deshalb als Dokument auf einem eigenen Blatt: ein großes Paneel,
   nummerierte Abschnitte, Tabellen mit Kennungen.
   ========================================================================= */

.doc { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--space-sec); }
.doc__inner.wrap {
  width: calc(100% - 2 * var(--gutter));
  max-width: 60rem;
  padding: clamp(1.35rem, 0.8rem + 3.5vw, 3.75rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(157, 143, 255, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  box-shadow: 0 50px 120px -60px rgba(0, 0, 0, 0.9);
}

/* ---- Hinweisband über dem Dokument ---- */
.doc__flag {
  margin: 0 0 1.75rem;
  padding: 0.85rem 1.1rem;
  max-width: none;
  border: 1px solid rgba(200, 255, 60, 0.3);
  border-radius: var(--r);
  background: var(--lime-soft);
  font-size: var(--fs-s);
  color: var(--text-soft);
}
.doc__flag strong { color: var(--lime); }

.doc__head { margin: 0 0 2.5rem; }
.doc__head h1 { font-size: clamp(2.2rem, 1.2rem + 4vw, 4rem); max-width: 20ch; }
.doc__meta {
  display: grid;
  gap: 0;
  margin: 1.75rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.doc__meta > div {
  display: grid;
  gap: 0.1rem 1.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.doc__meta > div:last-child { border-bottom: 0; }
.doc__meta > div:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }
.doc__meta dt {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.doc__meta dd { margin: 0; }
@media (min-width: 40em) {
  .doc__meta > div { grid-template-columns: 12rem minmax(0, 1fr); }
}

/* ---- Nummerierte Abschnitte ---- */
.doc section {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.doc section > h2 {
  display: grid;
  gap: 0.35rem 1.25rem;
  margin: 0 0 1.1rem;
  max-width: none;
  font-size: var(--fs-l);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.doc section > h2 .doc__no {
  justify-self: start;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  -webkit-text-fill-color: var(--lime);
  color: var(--lime);
}
@media (min-width: 46em) {
  .doc section > h2 { grid-template-columns: 4.5rem minmax(0, 1fr); align-items: baseline; }
}

.doc p, .doc li { max-width: var(--measure); }
.doc p { color: var(--text-soft); }
.doc .lede { color: var(--text-soft); }

/* ---- Liefergegenstände und Abnahmekriterien: Kennung + Text ---- */
.doc__items {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.doc__items > li {
  display: grid;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0.95rem 1.1rem;
  max-width: none;
  border-bottom: 1px solid var(--line);
}
.doc__items > li:last-child { border-bottom: 0; }
.doc__items > li:hover { background: var(--glass); }
.doc__items .doc__id {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--lime);
}
.doc__items .doc__how { font-size: var(--fs-s); color: var(--text-dim); max-width: var(--measure); }
@media (min-width: 40em) {
  .doc__items > li { grid-template-columns: 5rem minmax(0, 1fr); }
  .doc__items .doc__id { padding-top: 0.2rem; }
  .doc__items .doc__how { grid-column: 2; }
}

/* ---- Preis- und Zahlungsplanzeilen ---- */
.doc__sum {
  width: 100%;
  margin-top: 0.5rem;
  font-size: var(--fs-base);
}
.doc__sum th, .doc__sum td {
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 0.75rem 1rem 0.75rem 0;
  text-align: left;
  vertical-align: baseline;
  border-bottom: 1px solid var(--line);
}
.doc__sum thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom-color: var(--line-2);
}
.doc__sum td:last-child, .doc__sum th:last-child {
  text-align: right;
  padding-right: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.doc__sum tfoot td {
  border-bottom: 0;
  border-top: 1px solid var(--line-3);
  font-weight: 700;
  color: var(--text);
}
.doc__sum tfoot td:last-child { font-size: var(--fs-m); color: var(--lime); }

/* ---- Prüfprotokoll ---- */
.protocol { width: 100%; margin-top: 1rem; font-size: var(--fs-s); }
.protocol th, .protocol td {
  padding: 0.7rem 1rem 0.7rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.protocol thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom-color: var(--line-2);
}
.protocol td { color: var(--text-soft); }
.protocol td:first-child { font-family: var(--font-mono); white-space: nowrap; color: var(--lime); }
/* Ergebnisspalte trägt die Aussage über das Wort, nicht über eine Farbe */
.protocol .res { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; color: var(--text); }
/* Datentabellen dürfen innerhalb ihres Rahmens waagerecht rollen
   (WCAG 1.4.10 nimmt zweidimensionale Inhalte aus). */
.protocol-wrap, .table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2e38 transparent;
}
.table-scroll { margin-bottom: 1rem; }

/* ---- Schnellcheck ---- */
.check { margin-top: 2rem; }
.check__q {
  margin: 0 0 0.75rem;
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--glass);
  min-inline-size: 0;
  transition: border-color 200ms var(--ease);
}
.check__q:has(input:checked) { border-color: var(--line-2); }
.check__q > legend {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: var(--fs-m);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.check__q > legend + * { clear: both; }
.check__q .doc__how { margin: 0.4rem 0 1rem; padding-top: 0.4rem; font-size: var(--fs-s); color: var(--text-dim); }
.check__opts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
/* Antworten als Pillen: die ganze Fläche ist klickbar */
.check__opt {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.45rem 1rem 0.45rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-size: var(--fs-s);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.check__opt:hover { border-color: var(--line-3); }
.check__opt:has(input:checked) {
  border-color: rgba(200, 255, 60, 0.6);
  background: var(--lime-soft);
  color: var(--text);
}
.check__opt input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--lime); }

.check__bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(14, 15, 20, 0.85);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
          backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.9);
}
.check__count {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-soft);
}

.check__result { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line-2); }
.check__result[hidden] { display: none; }
.check__score {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--fs-price);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}
.check__score span { color: var(--lime); }
.check__findings {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.check__findings li {
  margin: 0;
  padding: 0.95rem 1.1rem;
  max-width: none;
  border-bottom: 1px solid var(--line);
}
.check__findings li:last-child { border-bottom: 0; }
.check__findings b { display: block; color: var(--text); }
.check__findings .doc__id {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--lime);
}
.check__findings p { margin: 0.25rem 0 0; font-size: var(--fs-s); color: var(--text-dim); }

.doc__back {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-s);
}
.doc__back a { text-decoration: none; color: var(--text-soft); }
.doc__back a:hover { color: var(--lime); }

@media print {
  .doc { padding: 0; }
  .doc__inner.wrap { max-width: none; width: auto; padding: 0; border: 0; background: none; }
  .doc section { break-inside: auto; }
  .doc__items > li, .protocol tr { break-inside: avoid; }
  .check__bar, .doc__back { display: none !important; }
}
