/* Kapitel der Startseite im Aussehen des neuen Einstiegs. Wird nach start.css geladen und nimmt dem Schulbuch Tisch, Buchseiten und Griffmarken.
   Aufbau: breite Abschnitte auf Weiß, Hellgrau oder Tief-Petrol. Jeder Abschnitt setzt seine Farben als Variablen, die Bausteine darin lesen sie nur aus. */

/* ---------- Grundwerte ---------- */
.tisch, .rueckseite, .leiste {
  --tief: #0A5A62; --boden: #07464D; --hell: #D9F0F2; --kante: #8FD9DE;
  --aktion: #C2185B; --aktion-d: #A8134D; --aktion-k: #8A0F40;
  --zeile: #F1F4F5; --zeile2: #E4E9EC; --feld: #5F6B74;
  --rand: clamp(20px, 4vw, 64px);
  /* Seitlicher Abstand wie .einstieg .e-innen: Inhalt höchstens 1560 px breit, darin der Rand */
  --innen: max(var(--rand), calc((100% - 1560px) / 2 + var(--rand)));
}
body { background: #fff; }
html { scrollbar-color: var(--einband-tief) #F1F4F5; }

/* ---------- Abschnitte statt Buchseiten ---------- */
.tisch { display: block; max-width: none; margin: 0; padding: 0; background: #fff; }
.tisch .buch { display: block; }
.tisch .bogen {
  --grund: #fff; --flaeche: var(--zeile); --schrift: var(--tinte); --neben: var(--grau); --strich: var(--linie);
  --fokus: var(--tinte); --zeichen: var(--tief); --rahmen: var(--feld); --schimmer: var(--zeile2);
  --zweitknopf: var(--tinte); --zweitknopf-h: #33393F; --zweitknopf-k: #000; --zweitknopf-s: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 104px); align-items: start;
  padding: clamp(56px, 7vw, 112px) var(--innen); background: var(--grund); color: var(--schrift);
  border-radius: 0; box-shadow: none;
}
.tisch .bogen::after { display: none; }
/* Rhythmus: Hellgrau, Weiß, Petrol, Weiß, Hellgrau, Weiß, Hellgrau, Weiß, Petrol */
.tisch #angebot, .tisch #woche, .tisch #schultraeger { --grund: var(--zeile); --flaeche: #fff; --schimmer: var(--zeile); }
.tisch #muster, .tisch #rueckruf {
  --grund: var(--tief); --flaeche: #fff; --schrift: #fff; --neben: var(--hell); --strich: rgba(255, 255, 255, .26);
  --fokus: #fff; --zeichen: var(--marker); --rahmen: var(--kante); --schimmer: rgba(255, 255, 255, .13);
  --zweitknopf: #fff; --zweitknopf-h: var(--hell); --zweitknopf-k: var(--kante); --zweitknopf-s: var(--tinte);
}
.tisch .seite { padding: 0; }
.tisch .seite > * + * { margin-top: 1.25rem; }
.tisch .kopf, .tisch .fuss { display: none; }
.tisch .seite > .kopf + * { margin-top: 0; }
/* Sprungmarken landen unter der klebenden Leiste */
.tisch [id] { scroll-margin-top: 80px; }
.tisch .bogen[id] { scroll-margin-top: 57px; }
.tisch :focus-visible { outline: 3px solid var(--fokus, var(--tinte)); outline-offset: 3px; }
.tisch a { text-underline-offset: 5px; }

/* ---------- Schrift ---------- */
.tisch .titel { max-width: 17em; font: 700 clamp(2rem, 3.6vw, 3.5rem)/1.06 var(--titel); letter-spacing: -.014em; text-wrap: balance; }
.tisch .titel + * { margin-top: clamp(18px, 1.8vw, 28px); }
.tisch .titel + p { max-width: 31em; font-size: clamp(1.1875rem, 1.5vw, 1.3125rem); line-height: 1.5; }
.tisch .loesung, .tisch .steck-titel { color: inherit; font: 700 clamp(1.5rem, 2.1vw, 1.875rem)/1.2 var(--titel); text-wrap: balance; }
.tisch .klein, .tisch .quelle, .tisch .plan-hinweis { color: var(--neben); }
.tisch .abb:not(.film) figcaption { color: var(--neben); }
.tisch .abb.klein { margin-top: 2.25rem; }
.tisch .abb.klein img { border-radius: 14px; }

/* ---------- Knöpfe und Links ---------- */
.tisch .knopf { --k-kante: var(--aktion-k); min-height: 58px; background: var(--aktion); box-shadow: 0 3px 0 var(--k-kante); }
.tisch .knopf:hover { background: var(--aktion-d); }
.tisch .knopf:active { box-shadow: 0 0 0 var(--k-kante); }
.tisch .knopf.tinte { --k-kante: var(--zweitknopf-k); background: var(--zweitknopf); color: var(--zweitknopf-s); }
.tisch .knopf.tinte:hover { background: var(--zweitknopf-h); }
.tisch .knopfzeile { gap: 10px 28px; margin-top: 1.75rem !important; }
.tisch .zweit { display: inline-flex; align-items: center; min-height: 48px; padding: 0; font: 700 1.1875rem/1.3 var(--text); }
.tisch .loesung-zeile .zweit { font-size: 1.0625rem; }

/* ---------- Listen ---------- */
.tisch .haken { gap: 10px; }
.tisch .haken li { padding-left: 36px; }
.tisch .haken li::before { top: .2em; width: 24px; height: 24px; background: var(--zeichen); }

/* Schritte: große Ziffer, darüber eine Linie */
.tisch .schritte { gap: 0; margin-top: clamp(24px, 2.6vw, 40px) !important; }
.tisch .schritte li { grid-template-columns: clamp(36px, 3.4vw, 52px) minmax(0, 1fr); column-gap: clamp(10px, 1.2vw, 18px); max-width: none; padding: 22px 0 26px; border-top: 1px solid var(--strich); }
.tisch .schritte li::before { place-items: start; width: auto; height: auto; border-radius: 0; background: none; color: var(--zeichen); font: 700 clamp(2.25rem, 3.2vw, 3rem)/.92 var(--titel); }
.tisch .schritte h3 { align-self: start; }
.tisch .schritte p { max-width: 34em; }

/* Zeilen mit Linien statt Wechselstreifen */
.tisch .dazu, .tisch .namensliste { border-radius: 0; overflow: visible; }
.tisch .dazu div, .tisch .dazu div:nth-child(even) { padding: 16px 0 18px; background: none; border-top: 1px solid var(--strich); }
.tisch .dazu .kostet small { color: var(--neben); }
.tisch .namensliste li, .tisch .namensliste li:nth-child(even) { padding: 12px 0; background: none; border-top: 1px solid var(--strich); }
.tisch .namensliste span, .tisch .ref-bilder figcaption span { color: var(--neben); }
.tisch .fakten { gap: 0; margin-top: 2rem !important; }
.tisch .fakten div { padding: 18px 0 20px; border-top: 1px solid var(--strich); }
.tisch .fakten dd { max-width: 34em; }
.tisch .steckbrief { margin-top: 1rem !important; padding: 6px clamp(18px, 2vw, 28px); background: var(--flaeche); border-radius: 14px; overflow: visible; }
.tisch .steckbrief div, .tisch .steckbrief div:nth-child(even) { padding: 16px 0; background: none; }
.tisch .steckbrief div + div { border-top: 1px solid var(--strich); }
.tisch .steckbrief dt { color: inherit; }
.tisch .steckbrief dd { color: var(--zeichen); font-size: 1.75rem; }

/* ---------- Karten ---------- */
.tisch .aufgabe { padding: clamp(22px, 2.6vw, 36px); background: var(--flaeche); border-radius: 14px; margin-top: 2rem !important; }
.tisch .aufgabe > h3, .tisch .aufgabe legend { gap: 0; color: inherit; font: 700 1.5rem/1.2 var(--titel); }
.tisch .nr { display: none; }
.tisch .merke { padding: clamp(20px, 2.2vw, 30px); background: var(--hell); border-radius: 14px; margin-top: 2rem !important; }
.tisch .merke h3 { margin-bottom: 6px; font-size: 1.3125rem; }
.tisch .schema { padding: clamp(18px, 2vw, 28px); background: var(--flaeche); border-radius: 14px; }
.tisch .schema-zeile { border-radius: 9px; box-shadow: inset 0 0 0 1px var(--strich); }
.tisch .schema-zeile.neu { box-shadow: none; }
.tisch .schema-plus { border-radius: 9px; color: var(--tief); box-shadow: inset 0 0 0 2px var(--tief); }
.tisch .mini { border-radius: 14px; box-shadow: 0 0 0 1px var(--linie), 0 30px 48px -32px rgba(2, 28, 32, .55); }

/* ---------- Auswahl: Muster, Farbe, Ankreuzen ---------- */
.tisch .wahl span, .tisch .tupfer .t-frei { background: transparent; box-shadow: inset 0 0 0 2px var(--rahmen); color: var(--schrift); font: 700 1.0625rem/1 var(--titel); transition: background-color .15s, box-shadow .15s; }
.tisch .wahl label:hover span, .tisch .tupfer label:hover span { transform: none; }
.tisch .wahl label:hover span, .tisch .tupfer label:hover .t-frei { background: var(--schimmer); box-shadow: inset 0 0 0 2px var(--schrift); }
.tisch .wahl input:checked + span, .tisch .tupfer input:checked + .t-frei { background: var(--marker); box-shadow: inset 0 0 0 2px var(--marker); color: var(--tinte); }
.tisch .wahl input:focus-visible + span, .tisch .tupfer input:focus-visible + span { outline: 3px solid var(--fokus); outline-offset: 3px; }
.tisch .tupfer span:not(.t-frei):not(.vh) { position: relative; border: 3px solid #fff; box-shadow: none; }
.tisch .tupfer input:checked + span:not(.t-frei) { border-color: var(--marker); box-shadow: 0 0 0 3px var(--grund), 0 0 0 6px var(--marker); }
.tisch .tupfer input:checked + span:not(.t-frei)::after { content: ""; position: absolute; inset: 8px; background: #fff; -webkit-mask: var(--haken) center / contain no-repeat; mask: var(--haken) center / contain no-repeat; }
.tisch .eigenfarbe span { color: var(--neben); }
.tisch .eigenfarbe input { background: transparent; border-color: var(--rahmen); }
.tisch .kreuze { gap: 2px 24px; margin-top: 12px; }
.tisch .kreuze input { width: 28px; height: 28px; background: #fff; border: 2px solid var(--feld); border-radius: 6px; transition: background-color .15s, border-color .15s; }
.tisch .kreuze label:hover input { background: #fff; border-color: var(--tinte); }
.tisch .kreuze input:checked, .tisch .kreuze label:hover input:checked { background: var(--tief) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat; border-color: var(--tief); }

/* Vorschau-Fenster wie der Bildschirm im Einstieg: dunkler Rahmen, helle Adresszeile */
.tisch .schau { padding: clamp(6px, .8vw, 10px); background: #14181B; border-radius: 14px; box-shadow: 0 34px 60px -26px rgba(2, 28, 32, .7); }
.tisch .schau-leiste { padding: 7px 12px; background: var(--zeile2); border-radius: 6px 6px 0 0; color: var(--grau); }
.tisch .schau-leiste i { background: #9AA5AD; }
.tisch .schau-leiste b { flex: 0 1 auto; padding: 3px 14px; border-radius: 99px; color: var(--grau); font-weight: 600; }
.tisch .schau-fenster { border-radius: 0 0 6px 6px; }

/* ---------- Formular ---------- */
.tisch .feld { margin-top: 18px; }
.tisch .feld input, .tisch .feld select { min-height: 54px; border: 2px solid var(--feld); border-radius: 9px; color: var(--tinte); font: 400 1.1875rem/1.3 var(--text); }
.tisch .feld input:hover, .tisch .feld select:hover { border-color: var(--tinte); }
.tisch .feld input[aria-invalid="true"] { border-color: var(--rotstift); border-width: 3px; }
.tisch .danke { background: var(--hell); border-radius: 9px; }
.tisch .aufgabe > .knopf { margin-top: 1.6rem; }

/* ---------- Die Kapitel im Einzelnen ---------- */
/* Muster: Auswahl steht frei auf Petrol wie unter der Bühne */
.tisch #muster .aufgabe { padding: 0; background: none; border-radius: 0; }
.tisch #muster .breit { max-width: 31em !important; }
.tisch #muster .loesung-zeile { gap: 8px 24px; }
.tisch #muster .daneben { margin-block: 8px; color: var(--neben); }

/* Eine Woche: Stundenplan mit ruhigen Kopfzeilen */
.tisch .legende { gap: 8px 26px; margin-top: 2rem !important; }
.tisch .legende li::before { width: 18px; height: 18px; border-radius: 4px; }
.tisch .plan-std { color: var(--neben); }
.tisch .tag li { border-radius: 9px; }

/* Preise: der Preis als Petrol-Tafel, rechts ein grauer Kasten mit dem Umfang */
.tisch .aufgabe.preis { padding: clamp(24px, 2.8vw, 40px); background: var(--tief); color: #fff; margin-top: 1.75rem !important; }
.tisch .preis-zeile { color: var(--hell); font: 700 1.3125rem/1.25 var(--titel); }
.tisch .preis-zeile .nie-trennen { display: block; margin-top: 6px; color: #fff; font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.014em; }
.tisch .preis-luecke { display: inline; min-width: 0; margin: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; }
.tisch .preis-jahr { margin-top: 12px; font-weight: 400; }
.tisch .preis + .bleistift { margin-top: .75rem !important; }
.tisch .bleistift { color: var(--neben); font: 400 1.0625rem/1.45 var(--text); transform: none; }
.tisch #preise .seite + .seite { padding: clamp(24px, 3vw, 44px); background: var(--flaeche); border-radius: 14px; }
.tisch #preise .dazu { margin-top: .75rem !important; }

/* Referenzen */
.tisch .ref-bilder { gap: 22px 18px; }
.tisch .ref-bilder img { border-radius: 9px; box-shadow: 0 0 0 1px var(--linie); }
.tisch .ref-bilder figure:hover img, .tisch .ref-bilder figure:focus-within img { box-shadow: 0 0 0 3px var(--tinte); }
.tisch .ref-bilder a::after { border-radius: 9px; }

/* Rückruf: weißes Formular auf Petrol */
.tisch #rueckruf .aufgabe { --schrift: var(--tinte); --neben: var(--grau); --strich: var(--linie); --fokus: var(--tinte); --zeichen: var(--tief); color: var(--tinte); }

/* ---------- Kapitel-Leiste ---------- */
@media (min-width: 1100px) {
  .tisch .marken { position: sticky; top: 0; z-index: 15; flex-direction: row; flex-wrap: wrap; align-items: stretch; --lp: clamp(9px, .95vw, 15px); gap: 0; margin: 0; padding: 0 calc(var(--innen) - var(--lp)); background: #fff; border-block: 1px solid var(--linie); }
  .tisch .marken a, .tisch .marken a:hover, .tisch .marken a[aria-current] { width: auto; }
  .tisch .marken a { position: relative; min-height: 56px; padding: 0 var(--lp); background: none; border-radius: 0; box-shadow: none; color: var(--tinte); font: 700 1.0625rem/1.15 var(--titel); white-space: nowrap; transition: color .15s, background-color .15s; }
  .tisch .marken a::after { content: ""; position: absolute; left: var(--lp); right: var(--lp); bottom: -1px; height: 3px; background: var(--tief); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--leicht); }
  .tisch .marken a:hover { background: var(--zeile); }
  .tisch .marken a[aria-current] { color: var(--tief); }
  .tisch .marken a[aria-current]::after { transform: scaleX(1); }
  .tisch .marken a:focus-visible { outline-color: var(--tinte); outline-offset: -4px; }
  .tisch .marken .nur-schmal { display: flex; margin-left: auto; }
}
@media (max-width: 1099px) {
  .leiste { box-shadow: 0 1px 0 var(--linie); }
  .leiste .wortmarke { min-height: 48px; }
  .tisch .marken { top: 74px; left: 12px; right: 12px; max-height: calc(100vh - 86px); max-height: calc(100dvh - 86px); overflow-y: auto; padding: 8px; border-radius: 14px; box-shadow: 0 0 0 1px var(--linie), 0 24px 48px -16px rgba(2, 28, 32, .5); }
  .tisch .marken a, .tisch .marken a:hover, .tisch .marken a[aria-current] { flex: none; width: 100%; min-height: 52px; padding: 8px 14px; background: none; border-radius: 9px; box-shadow: none; color: var(--tinte); font-size: 1.1875rem; }
  .tisch .marken a::before { display: none; }
  .tisch .marken a:hover { background: var(--zeile); }
  .tisch .marken a[aria-current] { background: var(--zeile); color: var(--tief); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
  .tisch .marken a:focus-visible { outline-color: var(--tinte); outline-offset: -3px; }
  .tisch .marken .nur-schmal { margin-top: 8px; border-top: 1px solid var(--linie); border-radius: 0 0 9px 9px; box-shadow: none; }
  .tisch .bogen[id] { scroll-margin-top: 68px; }
  .tisch [id] { scroll-margin-top: 88px; }
}

/* ---------- Breiten ---------- */
@media (min-width: 620px) {
  .tisch .fakten div { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; }
  .tisch .fakten dt { margin: 0; }
}
@media (min-width: 1100px) {
  /* Zwei Spalten, je Kapitel anders geteilt */
  .tisch .bogen:not(.klapp) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tisch #angebot { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .tisch #so-geht-es, .tisch #schultraeger { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .tisch #referenzen { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

  /* Muster: links wählen, rechts die Vorschau mit dem Knopf darunter. Die letzte Zeile nimmt auf, was die längere Spalte übrig hat. */
  .tisch #muster .seite { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); grid-template-rows: auto auto auto auto 1fr; column-gap: clamp(40px, 5vw, 88px); align-items: start; }
  .tisch #muster .titel { grid-area: 1 / 1; }
  .tisch #muster .loesung-zeile { grid-area: 1 / 2; align-self: end; margin-top: 0; }
  .tisch #muster .breit { grid-area: 2 / 1; margin-top: 24px; }
  .tisch #muster .abb { grid-area: 2 / 2 / 4 / 3; margin-top: 24px; }
  .tisch #muster .aufgabe { grid-area: 3 / 1 / 6 / 2; }
  .tisch #muster .knopfzeile { grid-area: 4 / 2; }

  /* Eine Woche: Überschrift links, Einleitung rechts, darunter der Plan in voller Breite */
  .tisch #woche .seite { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(40px, 6vw, 104px); align-items: end; }
  .tisch #woche .seite > * { grid-column: 1 / -1; }
  .tisch #woche .titel { grid-column: 1; }
  .tisch #woche .breit { grid-column: 2; margin-top: 0; }
  .tisch .legende { margin-top: clamp(32px, 3.6vw, 52px) !important; }
  .tisch .tag h3 { place-items: end start; padding: 0 2px 8px; background: none; border-radius: 0; color: var(--schrift); }
  .tisch .tag ol { background: repeating-linear-gradient(var(--flaeche) 0 var(--h), transparent var(--h) calc(var(--h) + 8px)); border-radius: 9px; overflow: hidden; }
  .tisch .tag li { border-radius: 0; }
}
/* Bausteine: Die kleine Startseite bleibt neben den Kästchen stehen, wenn das Fenster hoch genug ist */
@media (min-width: 1100px) and (min-height: 760px) {
  .tisch #bausteine .seite + .seite { position: sticky; top: 84px; }
}
@media (max-width: 1099px) {
  .tisch .bogen { gap: clamp(40px, 8vw, 64px); }
}

/* ---------- Fuß der Seite ----------
   Dunkles Petrol. Oben Marke mit einem Satz, Kontakt und die Linkgruppen; unten eine Linie, darunter Urheber und Bildnachweise.
   Handy: zwei Spalten, Marke, Kontakt und breite Gruppen (.f-voll) über die ganze Breite. Ab 700 px sechs Spuren, ab 1100 px alles in einer Reihe.
   Startseite (.mit-knoepfen): Unten rechts bleibt Platz für „Fragen?“ und den Pfeil nach oben, damit sie am Seitenende nichts verdecken. */
.rueckseite { display: block; max-width: none; margin: 0; padding: clamp(48px, 5.5vw, 84px) var(--innen) 0; background: var(--boden); color: #fff; font-size: 1.0625rem; line-height: 1.5; }
.rueckseite a { color: #fff; text-underline-offset: 5px; }
.rueckseite a:hover { color: var(--hell); }
.rueckseite :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rueckseite p { margin: 0; }
.f-oben { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
.f-marke, .f-voll { grid-column: 1 / -1; }
.f-marke { max-width: 30em; }
.rueckseite .f-logo { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; font: 700 1.625rem/1 var(--text); letter-spacing: -.015em; text-decoration: none; }
.f-logo svg { flex: none; width: 42px; height: 42px; }
.rueckseite .f-logo:hover { color: #fff; }
.f-logo:hover .f-name { text-decoration: underline; text-decoration-thickness: 2px; }
.rueckseite .f-satz { margin-top: 16px; color: var(--hell); }
.rueckseite .f-von { margin-top: 8px; color: var(--hell); }
/* Links im Fließtext: Der Abstand oben und unten vergrößert nur die Klickfläche auf 44 px, nicht die Zeile. */
.f-von a, .f-copy a { padding-block: 11px; font-weight: 700; }
.f-bilder li a { padding-block: 11px; }
.rueckseite .f-copy { padding-block: 10px; }
.rueckseite .f-t { margin: 0 0 4px; color: var(--kante); font: 700 1.1875rem/1.2 var(--titel); letter-spacing: .01em; }
.rueckseite .f-liste { display: block; list-style: none; margin: 0; padding: 0; }
.rueckseite .f-liste a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 3px 0; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.rueckseite .f-liste a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; }
.rueckseite .f-liste a[aria-current] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
.f-kontakt .f-liste a { font-weight: 700; }
.f-liste svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--kante); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.f-unten { display: flex; flex-wrap: wrap; align-items: center; gap: 0 32px; margin-top: clamp(40px, 4.5vw, 64px); padding: 12px 0 clamp(28px, 3vw, 40px); border-top: 1px solid rgba(255, 255, 255, .24); }
.rueckseite .f-copy { color: var(--hell); }
.rueckseite .f-bilder summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0; cursor: pointer; font-weight: 700; color: #fff; }
.rueckseite .f-bilder summary:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.f-bilder[open] { flex-basis: 100%; }
.rueckseite .f-bilder ul { display: grid; gap: 8px; list-style: none; margin: 4px 0 12px; padding: 0; }
.rueckseite .f-bilder li, .rueckseite .f-bilder p { max-width: 52em; color: var(--hell); }
.rueckseite .f-bilder p + p { margin-top: 8px; }
.rueckseite.mit-knoepfen .f-unten { padding-bottom: 140px; }
@media (min-width: 700px) {
  .f-oben { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 40px 32px; }
  .f-marke, .f-kontakt { grid-column: span 3; }
  .f-gruppe:not(.f-kontakt) { grid-column: span 2; }
  .f-oben.schlank .f-gruppe { grid-column: span 3; }
  .rueckseite.mit-knoepfen .f-unten { padding-right: 160px; padding-bottom: 84px; }
}
@media (min-width: 1100px) {
  .f-oben { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 40px clamp(28px, 3vw, 56px); }
  .f-oben.schlank { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); }
  .f-oben .f-marke, .f-oben .f-gruppe, .f-oben.schlank .f-gruppe { grid-column: auto; }
  .f-marke { padding-right: clamp(0px, 2vw, 32px); }
}

/* ---------- Druck: ohne Flächen, dunkle Schrift ---------- */
@media print {
  .tisch .marken.marken, .leiste { display: none; }
  .tisch .bogen, .tisch #angebot, .tisch #woche, .tisch #schultraeger, .tisch #muster, .tisch #rueckruf {
    --grund: #fff; --flaeche: #fff; --schrift: var(--tinte); --neben: var(--grau); --strich: var(--linie); --fokus: var(--tinte); --zeichen: var(--tief); --rahmen: var(--feld);
    --zweitknopf: var(--tinte); --zweitknopf-k: #000; --zweitknopf-s: #fff;
    padding-block: 28px; break-inside: avoid;
  }
  .tisch .aufgabe.preis { background: none; color: var(--tinte); box-shadow: inset 0 0 0 2px var(--tinte); }
  .tisch .preis-zeile, .tisch .preis-zeile .nie-trennen { color: var(--tinte); }
  .tisch #bausteine .seite + .seite { position: static; }
  .rueckseite { background: none; color: var(--tinte); }
  .rueckseite a, .rueckseite .f-bilder summary { color: var(--tinte); }
  .rueckseite .f-satz, .rueckseite .f-von, .rueckseite .f-copy, .rueckseite .f-t, .rueckseite .f-bilder li, .rueckseite .f-bilder p { color: var(--grau); }
  .f-logo svg, .f-liste svg { display: none; }
  .rueckseite.mit-knoepfen .f-unten { padding: 12px 0 0; }
}

/* Pfeil nach oben, unten rechts */
.nach-oben { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 20px; z-index: 25; display: grid; place-items: center; width: 52px; height: 52px; background: var(--tinte); border: 2px solid #fff; border-radius: 50%; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .28); transition: background-color .15s; }
.nach-oben svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nach-oben:hover { background: var(--einband-tief); }
.nach-oben:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; border-radius: 50%; }
@media print { .nach-oben { display: none; } }

/* Logo in der Kapitel-Leiste: nur am breiten Bildschirm, auf schmalen steht es schon in der Leiste oben */
.tisch .marken a.marken-logo { display: none; }
@media (min-width: 1520px) {
  .tisch .marken a.marken-logo { display: flex; align-items: baseline; gap: .3em; margin-right: clamp(8px, 1.4vw, 22px); padding-top: 9px; font-size: 1.25rem; }
  .tisch .marken a.marken-logo, .tisch .marken a.marken-logo[aria-current] { color: var(--tinte); }
  .tisch .marken a.marken-logo::after { display: none; }
  .marken-logo .zeichen { position: relative; top: .104em; flex: none; width: 1.66em; height: 1.66em; }
  .marken-logo .wm-name { font: 700 1em/1 var(--text); letter-spacing: -.015em; color: var(--einband-tief); }
}

/* Kapitel „Anbindungen“: hellgrau zwischen „So geht es“ (weiß) und „Muster“ (Petrol) */
.tisch #anbindungen { --grund: var(--zeile); --flaeche: #fff; --schimmer: var(--zeile); }
.tisch #anbindungen .klein { margin-top: 1.1rem; max-width: 62ch; color: var(--grau); font-size: 1rem; }
@media (min-width: 1100px) { .tisch #anbindungen { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
/* Zwischen 1100 und 1279 px passt „Anmelden“ nicht mehr in die Zeile; es steht oben auf der Bühne. */
@media (min-width: 1100px) and (max-width: 1279px) { .tisch .marken .nur-schmal { display: none; } }

/* Springt der Fokus in ein Feld, bleibt es mit seiner Beschriftung unter der Kapitel-Leiste sichtbar. */
.tisch input, .tisch select, .tisch textarea, .tisch .danke { scroll-margin-top: 140px; }
/* Sehr schmale Fenster (320 px): Die Knöpfe der Leiste bleiben im Bild. */
@media (max-width: 349px) { .leiste .anmelden, .inhalt-knopf { padding: 8px 8px; font-size: 1rem; } .leiste-knoepfe { gap: 6px; } .leiste .wortmarke .zeichen { display: none; } }

/* Die Liste des Schulträgers hat keine Bilder daneben und bleibt deshalb auch am Handy sichtbar. */
.tisch .namensliste.immer { display: block; }
.tisch .namensliste.immer a { display: inline-block; padding-block: 6px; color: inherit; }
#ref-ohv { scroll-margin-top: 110px; margin-top: 2rem; }
.tisch .namensliste.immer li { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); padding-block: 6px; }

/* Bausteine auf schmalen Bildschirmen: Die Auswahl läuft beim Rollen mit, die Startseite steht direkt darunter. So sieht man sofort, was ein Haken bewirkt. */
@media (max-width: 1099px) {
  .tisch #bausteine { display: flex; flex-direction: column; gap: 0; }
  .tisch #bausteine .seite { display: contents; }
  .tisch #bausteine .seite > * { order: 5; margin-top: 1.25rem; }
  .tisch #bausteine .seite + .seite > * { order: 4; }
  .tisch #bausteine #t-bau { order: 1; margin-top: 0; }
  .tisch #bausteine #t-bau + p { order: 2; }
  .tisch #bausteine #baukasten { order: 3; position: sticky; top: 68px; z-index: 6; margin-top: 1.25rem !important; padding: 10px 14px 8px; border-radius: 0 0 12px 12px; box-shadow: 0 10px 18px -12px rgba(2, 28, 32, .55); }
  .tisch #bausteine #baukasten legend { font-size: 1.0625rem; }
  .tisch #bausteine #baukasten .nr { display: none; }
  .tisch #bausteine .kreuze { grid-template-columns: 1fr 1fr; gap: 0 10px; margin-top: 4px; }
  .tisch #bausteine .kreuze label { min-height: 44px; gap: 8px; font-size: .9375rem; line-height: 1.2; }
  .tisch #bausteine .kreuze input { width: 24px; height: 24px; }
  .tisch #bausteine .loesung { font-size: 1.125rem; }
}
@media (min-width: 620px) and (max-width: 1099px) { .tisch #bausteine .kreuze { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Kapitel „Häufige Fragen“: hellgrau zwischen „Referenzen“ (weiß) und „Rückruf“ (Petrol) ---------- */
.tisch #fragen { --grund: var(--zeile); --flaeche: #fff; --schimmer: var(--zeile); }
.tisch #fragen .steck-titel { margin-top: 2.5rem; font-size: clamp(1.3125rem, 1.7vw, 1.5rem); }
.tisch #fragen .kopf + .steck-titel { margin-top: 0; }
.tisch .fragen { margin-top: .9rem; padding: 4px clamp(16px, 2vw, 28px); background: var(--flaeche); border-radius: 14px; }
.tisch .fragen details + details { border-top: 1px solid var(--strich); }
.tisch .fragen summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0; border-radius: 6px; font: 700 1.25rem/1.25 var(--titel); cursor: pointer; list-style: none; }
.tisch .fragen summary::-webkit-details-marker { display: none; }
/* Plus heißt aufklappen, Minus heißt zuklappen */
.tisch .fragen summary::after { content: ""; flex: none; width: 22px; height: 22px; background: linear-gradient(var(--zeichen), var(--zeichen)) center / 18px 3px no-repeat, linear-gradient(var(--zeichen), var(--zeichen)) center / 3px 18px no-repeat; }
.tisch .fragen details[open] > summary::after { background-size: 18px 3px, 0 0; }
.tisch .fragen summary:hover { color: var(--tief); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.tisch .fragen summary:focus-visible { outline-offset: 2px; }
.tisch .fragen .antwort { max-width: 40em; padding: 0 38px 22px 0; }
.tisch .fragen .antwort p { margin: 0; }
.tisch .fragen .antwort p + p { margin-top: .65em; }
@media (min-width: 1100px) { .tisch #fragen { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
/* Überschrift und Hinweis bleiben neben der langen Liste stehen, wenn das Fenster hoch genug ist */
@media (min-width: 1100px) and (min-height: 760px) { .tisch #fragen .seite:first-child { position: sticky; top: 96px; } }
@media (max-width: 520px) { .tisch .fragen summary { font-size: 1.1875rem; } .tisch .fragen .antwort { padding-right: 0; } }
@media print {
  .tisch #fragen { --grund: #fff; --flaeche: #fff; break-inside: auto; }
  .tisch #fragen .seite:first-child { position: static; }
  .tisch .fragen { padding-inline: 0; }
  .tisch .fragen details { break-inside: avoid; }
  .tisch .fragen summary::after { display: none; }
}

/* ---------- Fragen-Knopf am rechten Rand, über dem Pfeil nach oben, und sein kleines Feld ---------- */
.hilfe-knopf { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 84px; z-index: 25; min-height: 48px; padding: 0 18px; background: #fff; border: 2px solid var(--tinte); border-radius: 99px; color: var(--tinte); font: 700 1.0625rem/1 var(--titel); cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .24); transition: background-color .15s, color .15s; }
.hilfe-knopf:hover, .hilfe-knopf[aria-expanded="true"] { background: var(--tinte); border-color: #fff; color: #fff; }
.hilfe-knopf:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; border-radius: 99px; box-shadow: 0 0 0 7px #fff; }
body:has(.marken.offen) .hilfe-knopf { display: none; }
.hilfe-grund { display: none; }
.hilfe-feld { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 144px; z-index: 40; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 164px); max-height: calc(100dvh - 164px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 22px 22px; background: #fff; border-radius: 14px; color: var(--tinte); box-shadow: 0 0 0 1px var(--linie), 0 24px 48px -16px rgba(2, 28, 32, .55); animation: hilfe-auf .18s var(--leicht); }
.hilfe-feld:focus { outline: none; }
@keyframes hilfe-auf { from { opacity: 0; transform: translateY(10px); } }
@keyframes hilfe-hoch { from { transform: translateY(100%); } }
@keyframes hilfe-grund { from { opacity: 0; } }
.hilfe-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hilfe-kopf h2 { margin: 0; font: 700 1.375rem/1.2 var(--titel); }
.hilfe-zu { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; background: none; border: 0; border-radius: 50%; color: var(--tinte); cursor: pointer; }
.hilfe-zu:hover { background: #F1F4F5; }
.hilfe-zu:focus-visible { border-radius: 50%; }
.hilfe-zu svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.hilfe-liste { list-style: none; margin: 6px 0 0; padding: 0; }
.hilfe-liste li + li { border-top: 1px solid var(--linie); }
.hilfe-liste a { display: flex; align-items: center; min-height: 48px; padding: 8px 0; color: var(--tinte); font: 400 1.0625rem/1.3 var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.hilfe-liste a:hover, .hilfe-alle a:hover, .hilfe-ruf:hover { color: var(--einband-tief); text-decoration-thickness: 3px; }
.hilfe-alle { margin: 0; border-top: 1px solid var(--linie); }
.hilfe-alle a, .hilfe-ruf { display: inline-flex; align-items: center; min-height: 48px; color: var(--tinte); font: 700 1.0625rem/1.3 var(--text); text-underline-offset: 5px; }
.hilfe-wege { display: grid; gap: 10px; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--linie); }
.hilfe-haupt, .hilfe-neben { display: flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 9px; font: 700 1.125rem/1.15 var(--titel); text-align: center; text-decoration: none; transition: background-color .15s, color .15s; }
.hilfe-haupt { min-height: 54px; margin-bottom: 3px; background: #C2185B; color: #fff; box-shadow: 0 3px 0 #8A0F40; }
.hilfe-haupt:hover { background: #A8134D; }
.hilfe-neben { min-height: 48px; background: #fff; border: 2px solid var(--tinte); color: var(--tinte); }
.hilfe-neben:hover { background: var(--tinte); color: #fff; }
.hilfe-ruf { justify-self: center; margin-bottom: -10px; }
/* Niedrige Fenster: Das Feld nimmt die ganze Höhe und deckt Knopf und Pfeil zu, solange es offen ist. */
@media (min-width: 700px) and (max-height: 640px) { .hilfe-feld { bottom: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); } }
/* Handy: Das Feld kommt von unten, die Seite dahinter wird abgedunkelt. */
@media (max-width: 699px) {
  .hilfe-knopf { min-height: 44px; padding: 0 15px; }
  .hilfe-grund { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(8, 22, 26, .55); animation: hilfe-grund .2s; }
  .hilfe-feld { left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; max-height: 88dvh; padding: 12px 20px max(22px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(2, 28, 32, .4); animation: hilfe-hoch .28s var(--leicht); }
}
@media (prefers-reduced-motion: reduce) { .hilfe-feld, .hilfe-grund { animation: none; } .hilfe-knopf, .hilfe-haupt, .hilfe-neben { transition: none; } }
@media print { .hilfe { display: none; } }
/* Mit dem Kapitel „Fragen“ bleibt die Kapitel-Leiste einzeilig: am schmalen und am sehr breiten Bildschirm etwas weniger Luft zwischen den Einträgen. */
@media (min-width: 1100px) and (max-width: 1179px) { .tisch .marken { --lp: 8px; } }
@media (min-width: 1520px) { .tisch .marken { --lp: 11px; } }
