/* IT-Jäger – „Team im Einsatz“ (Startseite, Abschnitt „Team“; Rat 25.11.2026, Bauplan F–K in entwuerfe/it-jaeger-einsatz/RAT-EMPFEHLUNG.md).
   Zweck: ein kleiner Alltagsauftrag zwischen der Überschrift „Menschen, die sich kümmern.“ und den Namenskarten – Gruppenfoto, Arbeitsfoto,
   eine Glas-Textkarte und zum Schluss eine kleine Leiterbahn, die einmal aufleuchtet und zum Kontakt führt („Wo soll Ihr Anschluss hin?“).
   Fassungen – dieselbe Datei für alle, die Fassung entsteht nur im HTML (welche figure da ist, Klasse am Baustein):
   - .einsatz              „voll“: Gruppenfoto | Montage-Foto, darunter Textkarte | Schlusskarte mit „Fertig“, Leiterbahn und Link
   - .einsatz.ohne-hand    „start“: Gruppenfoto | Textkarte, darunter eine Schluss-Leiste mit Rohr-Bild, Leiterbahn und Link
   - .einsatz.ohne-team    Ersatz ohne Gruppenfoto: Montage-Foto | Textkarte, darunter die Schluss-Leiste mit „Fertig“
   Abhängigkeiten:
   - site.css: Farben und Maße (--petrol-3, --signal, --text, --text-2, --text-3, --linie, --flaeche, --rund, --rund-klein, --kurve,
     --bw-ein-aus), Grenzen 920/640 px, Einblenden .enthuellen/.sichtbar (site.js setzt .js, .sichtbar und --verz), ba-ruhig/ba-kontrast
     (barrierefrei.js), Schriftgröße per zoom auf p/figcaption/h3 (ba-gross, ba-sehr-gross).
   - site.js, Großansicht <dialog class="lichtbild">: jeder Knopf mit data-foto steht direkt in seiner figure, daneben eine figcaption
     mit <b> und <span> (sonst Skriptfehler); angezeigt wird „b · span (n/N)“ – Unterschriften darum ohne Schlusspunkt. data-foto zeigt
     denselben Ausschnitt wie das Vorschaubild (kein object-fit-Beschnitt; Ausnahme: am Handy ist das Vorschaubild der engere Handy-Ausschnitt).
     Nicht die Klasse .foto verwenden (deren Unterschrift liegt als Glasschild auf dem Bild).
   - glasseite.css: Glas der Karten = Regel für .person (dort Zeilen 39–43), nachgebildet unter html:not(.ba-kontrast).
   - „Die Leitung“ (leitung.css/leitung.js) bleibt unberührt, solange: kein neuer Abschnitt, keine Klasse .ueber im Baustein (die erste
     Überzeile in #team bleibt „Team“), Baustein in .breite ohne negative Ränder, #kontakt unverändert. Der Abschnitt wird höher – nach
     jeder Änderung werkzeuge/it-jaeger/pruefung/leitung-test.mjs in Chrome und Firefox laufen lassen. Alle Bilder haben ein festes
     Seitenverhältnis (nichts springt beim Nachladen, sonst misst die Leitung falsch).
   Bewegung: Der Grundzustand ist der fertige, ruhige (alles da, Licht voll). Einzige eigene Bewegung, einmalig: Wird die Schlusskarte
   sichtbar, läuft das Licht 0,9 s durch die kleine Leiterbahn, danach geht der Endpunkt an – nur mit JavaScript, ohne „Bewegungen
   reduzieren“ und ohne die Systemeinstellung. Kontrast, erzwungene Farben, „mehr Kontrast“, Druck: Leiterbahn weg, Glas weg, Link bleibt.
   Kein Rot, keine Inline-Styles, kein eigenes JavaScript. */

/* ---------- Raster ---------- */
.einsatz {
    display: grid; gap: 14px; margin-top: 40px;
    /* Spalten im Verhältnis der Bildformate 1080:590 und 970:746 → beide Fotos genau gleich hoch, keines beschnitten (≈ 7 : 5) */
    grid-template-columns: minmax(0, 1.8305fr) minmax(0, 1.3003fr);
    grid-template-areas: "team hand" "karte schluss";
}
.einsatz + .team { margin-top: 28px; }
.einsatz-team { grid-area: team; }
.einsatz-hand { grid-area: hand; }
.einsatz-karte { grid-area: karte; }
.einsatz-schluss { grid-area: schluss; }
.einsatz.ohne-hand { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "team karte" "schluss schluss"; }
.einsatz.ohne-team { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "hand karte" "schluss schluss"; }

/* ---------- Fotos: Knopf öffnet die Großansicht ---------- */
.einsatz-bild { margin: 0; min-width: 0; }
/* overflow am Knopf, nicht an der figure – sonst würde der Fokusring abgeschnitten */
.einsatz-bild button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--rund); overflow: hidden; isolation: isolate;
    background: var(--linie); box-shadow: var(--schatten); cursor: zoom-in; }
html:not(.ba-kontrast) .einsatz-bild button { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6), 0 18px 36px -24px rgba(5, 47, 67, .55); }
.einsatz-bild picture { display: block; width: 100%; height: 100%; }
.einsatz-bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
.einsatz-team button { aspect-ratio: 1080 / 590; }
.einsatz-hand button { aspect-ratio: 970 / 746; }
.einsatz-fertig button { aspect-ratio: 300 / 375; border-radius: var(--rund-klein); }
.einsatz-rohr button { aspect-ratio: 340 / 572; border-radius: var(--rund-klein); }

/* Unterschriften als normaler Text unter dem Bild; große Bilder einzeilig mit „ · “, kleine (Fertig, Rohr) zweizeilig daneben */
.einsatz-bild figcaption { margin-top: 10px; padding-inline: 4px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.einsatz-bild figcaption b { color: var(--text); font-size: 15.5px; font-weight: 700; }
/* Der Punkt ist nur Schmuck; das Leerzeichen danach steht im HTML (</b> <span>), damit Textauszug und Bildschirmleser die Wörter trennen */
:is(.einsatz-team, .einsatz-hand) figcaption b::after { content: "\a0·"; content: "\a0·" / ""; font-weight: 400; color: var(--text-3); }
/* min-width: 0, sonst ist die Unterschrift als Flex-Kind nie schmaler als „Netzwerkanschluss“ (641–700 px mit großer Schrift ragte es aus der Karte) */
:is(.einsatz-fertig, .einsatz-rohr) figcaption { margin: 0; padding: 0; min-width: 0; overflow-wrap: break-word; }
html:is(.ba-gross, .ba-sehr-gross) :is(.einsatz-fertig, .einsatz-rohr) figcaption { hyphens: auto; }
:is(.einsatz-fertig, .einsatz-rohr) figcaption :is(b, span) { display: block; }

/* ---------- Textkarte und Schlusskarte: weiße Fläche mit Linie, ohne „Kontrast erhöhen“ Glas wie .person ---------- */
.einsatz-karte, .einsatz-schluss { min-width: 0; margin: 0; padding: 26px 28px 28px; border-radius: var(--rund); background: var(--flaeche); border: 1px solid var(--linie); }
html:not(.ba-kontrast) :is(.einsatz-karte, .einsatz-schluss) {
    background: linear-gradient(155deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .48));
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(67, 196, 236, .12), 0 1px 0 rgba(5, 47, 67, .04), 0 18px 40px -26px rgba(5, 47, 67, .45);
}
.einsatz-karte { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
/* Marke: runde Plakette wie .neu-marke – bewusst keine Überzeile (.ueber gehört der „Leitung“) */
.einsatz-marke { margin: 0 0 14px; padding: 3px 11px; border-radius: 999px; background: var(--petrol-3); color: #fff;
    font-size: 12.5px; font-weight: 700; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; }
.einsatz-karte h3 { margin: 0 0 12px; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -.015em; font-weight: 600; color: var(--text); }
.einsatz-karte h3 span { display: block; color: var(--petrol-3); }
/* Zeilen ausgleichen statt „Garage.“ allein in der letzten Zeile; keine Silbentrennung (site.css trennt bei „Schrift größer“ sonst „Gara-ge.“) */
.einsatz .einsatz-karte h3 { text-wrap: balance; hyphens: manual; }
.einsatz-karte > p:last-child { margin: 0; max-width: 62ch; color: var(--text-2); font-size: 17px; line-height: 1.6; }

/* Schluss: „Fertig“ (bzw. Rohr) mit Unterschrift, darunter Leiterbahn und Link */
.einsatz-schluss { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 22px 24px 20px; }
.einsatz-schluss .einsatz-bild { display: flex; align-items: center; gap: 18px; }
.einsatz-fertig button { flex: none; width: 112px; }
.einsatz-rohr button { flex: none; width: 56px; }
/* Leiste (Fassungen „start“ und „ohne-team“): alles in einer Zeile über die ganze Breite */
.einsatz:is(.ohne-hand, .ohne-team) .einsatz-schluss { flex-direction: row; align-items: center; gap: 28px; padding: 16px 28px 16px 18px; }
.einsatz:is(.ohne-hand, .ohne-team) .einsatz-schluss .einsatz-bild { flex: none; gap: 16px; }
.einsatz:is(.ohne-hand, .ohne-team) .einsatz-fertig button { width: 64px; }
.einsatz:is(.ohne-hand, .ohne-team) .einsatz-weiter { flex: 1 1 auto; }

.einsatz-weiter { display: flex; align-items: center; gap: 14px; margin: 0; }
.einsatz-weiter a { flex: 0 1 auto; padding-block: 6px; color: var(--petrol-3); font-size: 17px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.einsatz-weiter a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }

/* Leiterbahn: 2-px-Linie in Petrol, Lötauge am Anfang, darüber das Licht in Signal-Cyan, am Ende der Lichtpunkt mit hellem Hof.
   Schmuck (aria-hidden im HTML), ohne Zeiger-Ereignisse. */
.einsatz-faser { position: relative; flex: 1 1 auto; min-width: 36px; height: 12px; pointer-events: none;
    background: linear-gradient(var(--petrol-3), var(--petrol-3)) 5px 50% / calc(100% - 10px) 2px no-repeat; }
.einsatz-faser::before, .einsatz-faser::after { content: ""; position: absolute; top: 1px; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; }
.einsatz-faser::before { left: 0; z-index: 1; border: 2px solid var(--petrol-3); background: var(--flaeche); }
.einsatz-faser::after { right: 0; z-index: 1; background: var(--signal); box-shadow: 0 0 0 3px rgba(67, 196, 236, .22), 0 0 10px 1px rgba(67, 196, 236, .75); }
.einsatz-faser i { position: absolute; left: 5px; right: 5px; top: 5px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--petrol-3), var(--signal)); transform-origin: 0 50%; }

/* ---------- Bewegung (nur wenn erwünscht) ---------- */
@media (prefers-reduced-motion: no-preference) {
    /* Startzustand „leer“ nur, solange die Schlusskarte noch nicht erschienen ist; mit .sichtbar läuft das Licht einmal durch */
    html.js:not(.ba-ruhig) .einsatz-schluss.enthuellen:not(.sichtbar) .einsatz-faser i { transform: scaleX(0); }
    html.js:not(.ba-ruhig) .einsatz-schluss.enthuellen:not(.sichtbar) .einsatz-faser::after { opacity: 0; }
    html.js:not(.ba-ruhig) .einsatz-schluss.enthuellen.sichtbar .einsatz-faser i { transition: transform .9s var(--bw-ein-aus) calc(var(--verz, 0s) + .5s); }
    html.js:not(.ba-ruhig) .einsatz-schluss.enthuellen.sichtbar .einsatz-faser::after { transition: opacity .35s var(--kurve) calc(var(--verz, 0s) + 1.4s); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    /* Maus: leichtes Heranzoomen wie in der Galerie */
    html:not(.ba-ruhig) .einsatz-bild img { transition: transform .7s var(--kurve); }
    html:not(.ba-ruhig) .einsatz-bild button:is(:hover, :focus-visible) img { transform: scale(1.04); }
}

/* ---------- Darstellungshilfen ---------- */
html.ba-kontrast .einsatz-faser { display: none; }
/* „Links hervorheben“: der schwarze Hof aus site.css (html.ba-links :focus-visible) – sonst gewinnt der Schatten der Fotoknöpfe */
html.ba-links .einsatz-bild button:focus-visible { box-shadow: 0 0 0 6px #000; }
@media (forced-colors: active), (prefers-contrast: more) { .einsatz-faser { display: none; } }
@media (forced-colors: active) {
    html .einsatz :is(.einsatz-karte, .einsatz-schluss) { background: Canvas; border: 1px solid CanvasText; box-shadow: none; }
    .einsatz-marke { border: 1px solid CanvasText; }
}

/* ---------- Tablet (641–920 px): Gruppenfoto und Textkarte über beide Spalten, darunter Foto | Schlusskarte ---------- */
@media (max-width: 920px) {
    .einsatz { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "team team" "karte karte" "hand schluss"; }
    .einsatz.ohne-hand { grid-template-columns: minmax(0, 1fr); grid-template-areas: "team" "karte" "schluss"; }
    .einsatz.ohne-team { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "hand karte" "schluss schluss"; }
}

/* ---------- Handy (bis 640 px): eine Spalte in Quelltext-Reihenfolge, Text und Schluss ohne Rahmen ---------- */
@media (max-width: 640px) {
    .einsatz, .einsatz.ohne-hand, .einsatz.ohne-team { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 20px; margin-top: 32px; }
    .einsatz > * { grid-area: auto; }
    .einsatz-bild button { border-radius: 14px; }
    .einsatz-team button { aspect-ratio: 4 / 3; }   /* Handy-Ausschnitt gruppe-h.jpg (Gesichter größer) */
    .einsatz-bild figcaption { margin-top: 8px; }
    .einsatz-bild figcaption b { display: block; }
    :is(.einsatz-team, .einsatz-hand) figcaption b::after { content: none; }
    .einsatz-karte, .einsatz-schluss, html:not(.ba-kontrast) :is(.einsatz-karte, .einsatz-schluss) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .einsatz-karte h3 { font-size: 22px; }
    .einsatz-karte > p:last-child { font-size: 16px; }
    /* Schluss: Bild links (umflossen), rechts Unterschrift, darunter kurze Leiterbahn und Link */
    .einsatz-schluss, .einsatz:is(.ohne-hand, .ohne-team) .einsatz-schluss { display: flow-root; padding: 0; }
    .einsatz-schluss .einsatz-bild, .einsatz:is(.ohne-hand, .ohne-team) .einsatz-schluss .einsatz-bild { display: block; }
    .einsatz-schluss .einsatz-bild button { float: left; margin-right: 14px; }
    .einsatz-fertig button, .einsatz:is(.ohne-hand, .ohne-team) .einsatz-fertig button { width: 76px; }
    .einsatz-schluss figcaption { padding-top: 4px; }
    .einsatz-weiter { margin-top: 10px; gap: 12px; }   /* flex = eigener Block neben dem umflossenen Bild */
    .einsatz-weiter a { font-size: 16px; }
}

/* ---------- Druck: Fotos und Text untereinander, nichts geteilt ---------- */
@media print {
    .einsatz { display: block; margin-top: 24px; }
    .einsatz > * { margin: 0 0 14px; break-inside: avoid; page-break-inside: avoid; }
    .einsatz .enthuellen { opacity: 1 !important; transform: none !important; }
    .einsatz-faser { display: none; }
    .einsatz-karte, .einsatz-schluss { background: #fff !important; border: 1px solid #8399a8 !important; box-shadow: none !important; }
    .einsatz-bild button { box-shadow: none !important; }
    .einsatz-team, .einsatz-hand { max-width: 150mm; }
    /* Hintergründe druckt der Browser meist nicht – Marke dann als Schrift mit Rand statt weißer Schrift auf Petrol */
    .einsatz-marke { background: none; color: var(--petrol-3); border: 1px solid currentColor; }
}
