/* druck.css — Teilnahmebestätigung (B6, 15.10.2026), nur auf /fortschritt/nachweis/ geladen.
   Bildschirm: Namensfeld und Blatt mit den Tokens aus stil.css. Druck: nur das Blatt, hell, eine A4-Seite für „Als PDF sichern“.
   Keine Hexwerte: im Druck gelten die Systemfarben Canvas/CanvasText (Bauregeln: Tokens, keine Hexwerte in Bauteilen). */

.nachweis-name {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}
.nachweis-name label { flex-basis: 100%; font-weight: 600; }
.nachweis-name input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
.nachweis-name input:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.nachweis-name .knopf[disabled] { opacity: 0.6; cursor: not-allowed; }

.nachweis-blatt {
  max-width: 46rem;
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
.nachweis-blatt h2 { margin-top: 0; }
.nachweis-liste { padding-left: 1.4rem; }
.nachweis-liste li { margin: 0.35rem 0; }
.nachweis-summe code { overflow-wrap: anywhere; word-break: break-all; }
.nachweis-ehrlich {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--linie);
  color: var(--leise);
  font-size: 0.92em;
}

@page { size: A4; margin: 18mm 16mm; }

@media print {
  /* 16.10.2026 (Leitung, nach M6/M7): seit B2 ist die Vorgabe dunkel über `:root:not([data-theme="hell"])` (0,2,0) — ein bloßes
     `:root` (0,1,0) verlor beim Druck, und ein PDF ohne data-theme druckte schwarz (M7, 18:09). Gleiche Spezifität, später im Strom → hell. */
  :root, :root[data-theme], :root:not([data-theme="hell"]) {
    color-scheme: light;
    --grund: Canvas; --flaeche: Canvas; --text: CanvasText; --leise: CanvasText; --linie: CanvasText;
  }
  body { background: Canvas; color: CanvasText; }
  /* .fortschritt-werkzeug: Export/Import, von kern.js auf jeder Seite mit data-seite="fortschritt" eingesetzt — am Schirm
     nützlich (die Prüfsumme gehört zur exportierten Datei), auf dem Blatt nicht (Druckbild 15.10.2026). */
  .kopf, .fuss, .sprung, .ziele, .frag, .nachweis-bedienung, .fortschritt-werkzeug, main > h1, noscript { display: none !important; }
  main { padding: 0; margin: 0; max-width: none; }
  .nachweis-blatt { max-width: none; border: 0; padding: 0; }
  .nachweis-liste li { break-inside: avoid; }
  a { color: CanvasText; text-decoration: none; }
}

/* ── Mappe als Seite (MAPPE-1, 17.10.2026): /mappe/ und /mappe/<slug>/, Gestalt der Blätter aus /mappe/schulung.css.
   Die Seite hat EIN h1 im Mappe-Kopf; die Teile tragen h2, ihre Lektionen h3 (schulung-bauen.mjs mappeWeb, „tiefer“) — darum
   stehen die h2-Regeln aus schulung.css hier für h3. Bildschirm: Auflösungen in <details>. Druck: hell (Block oben), jede Lektion
   auf neuer Seite, Auflösungen offen. */
.mappe-web { max-width: 62rem; }
.mappe-web .mappe-kopf h1 { margin: 4px 0; }
.mappe-web .mappe-teil { margin: 0 0 40px; }
.mappe-web .mappe-teil > h2 { padding-top: 12px; border-top: 3px solid var(--linie); }
.mappe-web .lektion-blatt > h3, .mappe-web .blatt-aufgabe > h3, .mappe-web .blatt-aufloesung > h3 { padding-top: 12px; border-top: 2px solid var(--linie); }
.mappe-web .blatt-aufloesung > h3 { color: var(--leise); }
.mappe-web .ablauf h4 { margin: 0 0 4px; }
.mappe-druck { color: var(--leise); font-size: .92rem; }
.aufloesung-auf { margin: 0 0 32px; border: 1px solid var(--linie); border-radius: var(--radius); }
.aufloesung-auf > summary { display: flex; align-items: center; min-height: 44px; padding: 4px 14px; cursor: pointer; font-weight: 600; }
.aufloesung-auf > summary:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.aufloesung-auf > .blatt-aufloesung { margin: 0; padding: 0 14px 8px; }
.aufloesung-auf > .blatt-aufloesung > h3 { border-top: 0; }
.mappe-karte > h2 { display: flex; align-items: center; gap: 8px; }
.mappe-lektionen { padding-left: 1.4rem; }
.mappe-lektionen li { margin: 0 0 4px; }

@media print {
  .mappe-web .mappe-kopf nav, .mappe-druck { display: none !important; }
  .mappe-web .mappe-teil { margin: 0; }
  .mappe-web .mappe-teil + .mappe-teil { break-before: page; }
  .mappe-web .mappe-teil > h2 { border-top: 0; padding-top: 0; break-after: avoid; }
  /* Je Lektion eine neue Seite: Handout, Aufgabe und Auflösung, Trainer-Notiz. */
  .mappe-web .lektion-blatt + .lektion-blatt, .mappe-web .blatt-aufgabe + .blatt-aufgabe, .mappe-web .aufloesung-auf + .blatt-aufgabe,
  .mappe-web .aufloesung-auf { break-before: page; }
  .mappe-web .lektion-blatt > h3, .mappe-web .blatt-aufgabe > h3 { border-top: 0; padding-top: 0; break-after: avoid; }
  /* Auflösungen im Druck offen: der Inhalt eines geschlossenen <details> wird sichtbar (::details-content, Chrome 131+, Safari 18.4+). */
  .aufloesung-auf { border: 0; }
  .aufloesung-auf > summary { display: none; }
  .aufloesung-auf::details-content { content-visibility: visible; display: contents; }
  .aufloesung-auf > .blatt-aufloesung { padding: 0; }
}
