/* inhalte.css */
/* inhalte.css – Inhaltsseiten AW-07 (Speditionen & Logistik, Handel & Produktion; die Seiten Software und Technik & Voraussetzungen entfallen, B98, B107),
   nach Muster A3 („Was Palettenkonto kann“, Kacheln der Zusatzmodule). Farben nur aus werte.css, Abfragen nur über Namen. */

/* Kopf der Seite */
/* Überschriften nie abschneiden (Halt E, Runde 1, Nr. 2): Größe an die Spaltenbreite gebunden (Container-Einheit cqi,
   wie AW-05). N cqi = 100 / (breitestes Wort in em × 1,06), gemessen mit Inter: „Voraussetzungen“ 8,3 em (h1),
   „(Web-Bestätigungen)“ 10,1 em (Kasten-h2), „Web-Bestätigungen“ 9,6 em (Modul-h3), „Wiedervorlagen“ 7,6 em (Reihe),
   „Tauschpartnern“ 7,5 em (Modul-h2). overflow-wrap bricht nur, wenn ein Wort trotzdem nicht passt. */
.in-kopf > .wrap, .in-reihe-text, .in-kasten, .in-modul, .in-einstieg { container-type: inline-size; }
.in-kopf h1, .in-reihe h2, .in-reihe h3, .in-kasten h2, .in-modul h2, .in-modul h3, .in-einstieg h2 { overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual; }
.in-kasten h2 { font-size: min(clamp(2rem, 1.5rem + 1.8vw, 2.9rem), 9cqi); }
.in-einstieg h2 { font-size: min(clamp(2rem, 1.5rem + 1.8vw, 2.9rem), 9cqi); }
.in-reihe h2 { font-size: min(clamp(2rem, 1.5rem + 1.8vw, 2.9rem), 9cqi); }

/* Kopf der Seite */
.in-kopf { padding-bottom: 56px; }
.in-kopf h1 { font-size: min(clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem), 11cqi); line-height: 1.1; letter-spacing: -.035em; font-weight: 800; margin-top: 16px; max-width: 24ch; }
.in-einleitung { font-size: 1.125rem; line-height: 1.6; color: var(--text-2); margin-top: 20px; max-width: 62ch; }
@media (min-width: 720px) { .in-einleitung { font-size: 1.1875rem; } }
.in-einleitung p + p { margin-top: .6em; }

/* Wege (F10) */
.in-wege { margin-top: 32px; }
.in-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.in-weg-klein { margin-top: 18px; font-size: .9375rem; }

/* Fließtext, Listen, Links */
.in-lead { font-size: 1.125rem; line-height: 1.6; color: var(--text-2); margin-top: 16px; }
.in-text { font-size: 1.0625rem; line-height: 1.65; color: var(--text-2); margin-top: 14px; max-width: 60ch; }
.in-text p + p { margin-top: .7em; }
.in-text ul + p { margin-top: 18px; }
.in-text ul, .in-punkte ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 18px; }
.in-punkte { margin-top: 18px; max-width: 64ch; }
.in-punkte ul { margin-top: 0; }
.in-text li, .in-punkte li { position: relative; padding-left: 28px; font-size: .98rem; line-height: 1.55; color: var(--text); }
.in-text li::before, .in-punkte li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 14px; height: 3px; border-radius: 2px; background: var(--blau); }
.in-link { margin-top: 22px; }
.platzhalter--block { margin-top: 20px; max-width: 64ch; }

/* Symbol über einer Überschrift */
.in-symbol { width: 44px; height: 44px; border-radius: 12px; background: var(--blau-50); color: var(--blau); display: grid; place-items: center; flex: none; }
.in-symbol .s { width: 22px; height: 22px; }
.in-symbol--wb { background: var(--indigo-50); color: var(--indigo); }

/* Text und Programmbild nebeneinander (Funktionsliste, Abschnitte der Branchenseiten) */
.in-funktionen { list-style: none; display: flex; flex-direction: column; gap: 72px; }
@media (min-width: 1024px) { .in-funktionen { gap: 112px; } }
.in-reihe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.in-reihe h2, .in-reihe h3 { margin-top: 20px; }
.in-reihe-text > h2:first-child, .in-reihe-text > h3:first-child { margin-top: 0; }
.in-reihe h3 { font-size: min(clamp(1.5rem, 1.2rem + 1vw, 2rem), 8cqi); line-height: 1.15; letter-spacing: -.025em; font-weight: 750; }
.in-reihe-bild { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (min-width: 1024px) {
  .in-reihe { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .in-funktionen > .in-reihe:nth-child(even), .in-reihe--bild-links { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .in-funktionen > .in-reihe:nth-child(even) .in-reihe-bild, .in-reihe--bild-links .in-reihe-bild { order: -1; }
  .in-reihe-bild--schmal { max-width: 460px; justify-self: center; }
}
.in-reihe--ohne-bild { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .in-funktionen > .in-reihe.in-reihe--ohne-bild { grid-template-columns: minmax(0, 1fr); } }

/* Kasten: ein Abschnitt mit Symbol, Überschrift und Text in Lesebreite */
.in-kasten { max-width: 760px; }
.in-kasten h2 { margin-top: 20px; }
.in-abschnitt--knapp { padding: 64px 0; }
@media (min-width: 720px) { .in-abschnitt--knapp { padding: 80px 0; } }
.in-spalten { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 28px; }
@media (min-width: 720px) { .in-spalten { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; } }
.in-spalten h3 { font-size: min(1.125rem, 8cqi); line-height: 1.35; font-weight: 700; }
.in-spalten .in-punkte { margin-top: 14px; }

/* Zusatzmodule: getrennte Karten, jede mit eigener Bedingung */
.in-module { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 720px) { .in-module { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* Allein stehende Kachel (Software bei Schalter „aus“) nimmt die ganze Zeile, ohne leere Spalte (Halt E, Runde 1, Nr. 1). */
.in-module > .in-modul:only-child { grid-column: 1 / -1; max-width: 720px; }
.in-modul { background: var(--karte); border: 1px solid var(--rahmen); border-radius: var(--r-xl); box-shadow: var(--schatten-1); padding: 26px 22px 28px; display: flex; flex-direction: column; }
@media (min-width: 720px) { .in-modul { padding: 32px 34px 34px; } }
.abschnitt .in-modul h2 { margin-top: 20px; font-size: min(clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem), 9cqi); }
.in-modul-kopf { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.in-modul-kopf h3 { font-size: min(1.5rem, 8cqi); line-height: 1.2; letter-spacing: -.02em; font-weight: 750; }
.in-modul-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.in-modul-unter { font-size: 1.0625rem; line-height: 1.55; color: var(--text-2); margin-top: 14px; }
.in-text--modul { max-width: none; }
.in-text--modul p:last-child { font-size: .8125rem; }
.in-bedingung { margin-top: 24px; font-size: .9375rem; line-height: 1.5; color: var(--text-2); }
.in-bedingung--wb { font-weight: 600; color: var(--text); }
.in-marke { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--indigo-800); background: var(--indigo-50); border: 1px solid var(--indigo-200); border-radius: 999px; padding: .15rem .6rem; margin-right: .35rem; }
.in-modul--wb .in-modul-kopf .in-marke { margin-right: 0; }

/* Schluss der Branchenseiten */
.in-einstieg { max-width: 760px; }
.in-einstieg h2 { margin-top: 20px; }

@media print {
  .in-symbol { display: none; }
  .in-reihe, .in-funktionen > .in-reihe:nth-child(even), .in-reihe--bild-links { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .in-reihe-bild { order: 0; }
  .in-funktionen { gap: 32px; }
  .in-modul { box-shadow: none; }
  /* Listenstriche ohne Hintergrundgrafik (Druck ohne Hintergründe, Halt E, Runde 1, Nr. 3; wie AW-05). */
  .in-text li::before, .in-punkte li::before { background: none; height: 0; border-top: 3px solid var(--blau); border-radius: 0; }
  .in-module { grid-template-columns: minmax(0, 1fr); }
}
/* programmbild.css */
/* programmbild.css – Baustein programmbild(…) (AW-01): Fläche mit feinem Punktraster, Bild oder Nachbau */
.programmbild { margin: 0; }
.programmbild-flaeche { background-color: var(--flaeche); background-image: var(--punkte); background-size: 20px 20px; border: 1px solid var(--flaeche-rand); border-radius: 20px; padding: 28px 14px; display: grid; place-items: center; }
@media (min-width: 720px) { .programmbild-flaeche { border-radius: var(--r-xl); padding: 40px 32px; } }
.programmbild-flaeche img { display: block; border-radius: 10px; box-shadow: var(--schatten-2); }
.programmbild-unterschrift { margin-top: 12px; font-size: .875rem; color: var(--text-2); }
/* messung.css */
/* messung.css – Fenster zur Einwilligung in die Anzeigen-Messung (teile/messung.njk; B76, B86, B90, K68; AW-15, AW-17).
   Präfix mb-. Vorgeschobenes Fenster (<dialog>, showModal) in der Mitte; die Seite dahinter ist abgedunkelt und gesperrt
   (kein Klick, kein Rollen). Zwei Ebenen im selben Fenster, je mit rollendem Text und festem Knopfbereich: Passt bis
   320 px und 24 px Standardschrift in den Bildschirm, zu langer Text rollt im Fenster, die Knöpfe bleiben sichtbar.
   Knöpfe je Ebene gleich groß; schmal (auch 390 px) untereinander, breit nebeneinander (Container-Abfragen in em).
   Ohne JavaScript bleibt der <dialog> zu; deshalb steht display nur an .mb[open] und an sichtbaren Ebenen. */
.mb { container: mb / inline-size; width: min(40rem, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: var(--r-l); background: var(--weiss); color: var(--text); box-shadow: var(--schatten-2); overflow: hidden; }
.mb[open] { display: flex; flex-direction: column; }
.mb::backdrop { background: var(--abdunkelung); }
/* Fokus beim Öffnen steht auf dem Fenster bzw. dem Titel der zweiten Ebene; beide sind keine Bedienelemente, daher ohne Rahmen */
.mb:focus, .mb-titel:focus { outline: none; }
.mb-ebene:not([hidden]) { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.mb-text { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 24px 8px; font-size: .9375rem; line-height: 1.55; color: var(--text-2); overflow-wrap: break-word; }
.mb-titel { font-size: 1.1875rem; line-height: 1.3; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.mb-knoepfe { flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 24px 24px; }
.mb-knoepfe .knopf { width: 100%; min-width: 0; padding-inline: .75rem; overflow-wrap: anywhere; }

/* zweite Ebene: Arten von Speicherung mit Titel und Status bzw. Schalter */
.mb-art { border-top: 1px solid var(--rahmen); padding-top: 14px; margin-top: 14px; }
.mb-art > * + * { margin-top: 6px; }
.mb-art-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mb-art-titel { min-width: 0; font-weight: 700; color: var(--text); }
label.mb-art-titel { cursor: pointer; }
.mb-art code { font-size: .875em; }
/* Schalter: echtes Kontrollkästchen (role="switch") unsichtbar über der gezeichneten Spur, damit Klick und Tastatur wirken */
.mb-schalter-ort { position: relative; flex: none; width: 44px; height: 26px; }
.mb-schalter-feld { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mb-schalter { position: absolute; inset: 0; border-radius: 13px; background: var(--knopf-rahmen); transition: background-color .15s; }
.mb-schalter::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--weiss); box-shadow: var(--schatten-1); transition: transform .15s var(--ease); }
.mb-schalter-feld:checked + .mb-schalter { background: var(--blau); }
.mb-schalter-feld:checked + .mb-schalter::before { transform: translateX(18px); }
.mb-schalter-feld:focus-visible + .mb-schalter { outline: 3px solid var(--blau); outline-offset: 2px; }

/* breiter: erste Ebene zwei Hauptknöpfe nebeneinander, „Einstellungen“ darunter über die volle Breite;
   zweite Ebene drei Knöpfe nebeneinander */
@container mb (min-width: 30em) {
  .mb-text { padding: 32px 32px 8px; }
  .mb-knoepfe { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 32px 32px; }
  .mb-mehr { grid-column: 1 / -1; }
}
@container mb (min-width: 36em) { .mb-knoepfe--drei { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container mb (min-width: 30em) and (max-width: 35.99em) { .mb-knoepfe--drei { grid-template-columns: minmax(0, 1fr); } }

/* Seite hinter dem offenen Fenster rollt nicht (nur am Bildschirm, damit der Druck nichts abschneidet) */
@media screen { :root:has(.mb[open]) { overflow: hidden; } }
/* sanftes Einblenden nur ohne Wunsch nach reduzierter Bewegung; in der ruhigen Fassung keine Bewegung */
@media (prefers-reduced-motion: no-preference) {
  .mb[open], .mb[open]::backdrop { animation: mb-ein .18s ease-out; }
}
@media (prefers-reduced-motion: reduce) { .mb-schalter, .mb-schalter::before { transition: none; } }
@keyframes mb-ein { from { opacity: 0; } }
@media print { .mb, .mb::backdrop { display: none !important; } }
/* Nach der Wahl steht der Fokus am Anfang der Seite (messung.js setzt ihn kurz auf body); ohne Rahmen um die ganze Seite */
body[tabindex="-1"]:focus { outline: none; }