/* Bestellschein (bestellen.html) als Fortsetzung der neuen Startseite. Wird nach start.css und kapitel.css geladen.
   Aufbau: weiße Leiste, kurzer Kopf in Tief-Petrol, darunter auf Hellgrau das weiße Formular und daneben Ablauf und Rechnung.
   Alle Regeln beginnen mit .schein (Klasse am body), damit sie keine andere Seite berühren. */

/* ---------- Grundwerte ---------- */
.schein {
  --tief: #0A5A62; --boden: #07464D; --hell: #D9F0F2; --kante: #8FD9DE;
  --zeile: #F1F4F5; --zeile2: #E4E9EC; --feld: #5F6B74;
  --rot: #9B0D24; --rot-hell: #FBE4E8;
  --rand: clamp(20px, 4vw, 64px);
  /* Seitlicher Abstand wie auf der Startseite: Inhalt höchstens 1560 px breit, darin der Rand */
  --innen: max(var(--rand), calc((100% - 1560px) / 2 + var(--rand)));
  --luft: clamp(28px, 4vw, 56px);
  --blatt: clamp(22px, 3.2vw, 44px);
  --kopf-oben: clamp(30px, 4.6vw, 68px);
  --kopf-unten: clamp(32px, 4.4vw, 64px);
  --warnung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1.5a10.5 10.5 0 1 0 0 21 10.5 10.5 0 0 0 0-21zM10.6 6h2.8v8h-2.8zm0 9.8h2.8v2.7h-2.8z'/%3E%3C/svg%3E");
  /* Der Fuß bleibt unten, auch wenn die Seite nach dem Absenden kurz ist */
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--zeile);
}
.schein .tisch { flex: 1 0 auto; padding: 0; background: var(--zeile); }

/* ---------- Leiste: Logo und Weg zurück ---------- */
.schein .leiste { position: static; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 10px var(--innen); background: #fff; box-shadow: none; }
.schein .leiste .wortmarke { min-height: 48px; }
.schein .leiste .anmelden { flex: none; min-height: 48px; }
.schein .leiste .anmelden::before { content: ""; flex: none; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Raster: Kopf über die ganze Breite, darunter Formular und Randspalte ----------
   Die erste .seite löst sich auf (display: contents), damit Überschrift, Vorspann und Formular eigene Zeilen des Rasters werden.
   Zeile 1 Überschrift, 2 Vorspann, 3 Hinweis ohne JavaScript, 4 Formular oder Bestätigung, 5 Randspalte (breit: neben dem Formular in Zeile 4). */
.schein .tisch .bogen { display: grid; grid-template-columns: var(--innen) minmax(0, 1fr) var(--innen); gap: 0; align-items: start; padding: 0 0 clamp(56px, 7vw, 104px); background: none; color: var(--tinte); }
.schein .tisch .bogen::before { content: ""; grid-area: 1 / 1 / 3 / -1; align-self: stretch; background: var(--tief); }
.schein .tisch .bogen > .seite:first-child { display: contents; }

/* ---------- Kopf in Tief-Petrol ---------- */
.schein .tisch h1 { grid-area: 1 / 2; max-width: 15em; margin: 0; padding: var(--kopf-oben) 0 var(--kopf-unten); color: #fff; font: 700 clamp(2.375rem, 4.6vw, 4.25rem)/1.04 var(--titel); letter-spacing: -.016em; text-wrap: balance; }
/* Auf Petrol unterstreicht der Marker, statt die Schrift zu hinterlegen */
.schein .tisch h1 mark { margin: 0; padding: 0; background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: .095em; text-underline-offset: .13em; text-decoration-skip-ink: none; }
.schein .tisch .vorspann { grid-area: 2 / 2; max-width: 34em; margin-top: calc(18px - var(--kopf-unten)); padding-bottom: var(--kopf-unten); color: #fff; font-size: clamp(1.1875rem, 1.5vw, 1.3125rem); line-height: 1.5; }
.schein .tisch noscript { grid-area: 3 / 2; }

/* ---------- Das Blatt: Formular und Bestätigung ---------- */
.schein .tisch #schein, .schein .tisch .fertig { grid-area: 4 / 2; width: 100%; max-width: 780px; margin-top: var(--luft) !important; padding: var(--blatt); background: #fff; border-radius: 14px; }
.schein #schein fieldset.aufgabe { margin-top: 0 !important; padding: clamp(26px, 3vw, 38px) 0; background: none; border-top: 1px solid var(--linie); border-radius: 0; }
.schein #schein fieldset.aufgabe:first-child { padding-top: 0; border-top: 0; }

/* Schrittanzeige: große Ziffer in Petrol vor der Frage, wie bei „So geht es“ auf der Startseite */
.schein #schein legend { display: flex; align-items: baseline; gap: 14px; padding-bottom: 18px; color: var(--tinte); font: 700 clamp(1.5rem, 2.2vw, 1.75rem)/1.2 var(--titel); }
.schein #schein .nr { display: block; flex: none; width: auto; height: auto; background: none; border-radius: 0; color: var(--tief); font: 700 1.4em/1 var(--titel); }

/* ---------- Felder ---------- */
.schein #schein .feld { margin-top: 22px; }
.schein #schein .feld label { margin-bottom: 6px; font-weight: 700; line-height: 1.35; }
.schein #schein .feld input, .schein #schein .feld select { min-height: 54px; padding: 10px 14px; background-color: #fff; border: 2px solid var(--feld); border-radius: 9px; color: var(--tinte); font: 400 1.1875rem/1.3 var(--text); transition: border-color .15s, box-shadow .15s; }
.schein #schein .feld select { -webkit-appearance: none; appearance: none; padding-right: 46px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9l7 7 7-7' fill='none' stroke='%231B1F23' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px 20px; }
.schein #schein .feld input:hover, .schein #schein .feld select:hover { border-color: var(--tinte); }
.schein #schein .feld input:focus-visible, .schein #schein .feld select:focus-visible { border-color: var(--tinte); outline: 3px solid var(--tinte); outline-offset: 2px; }
.schein #schein input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px #fff inset; -webkit-text-fill-color: var(--tinte); }
.schein #schein .paar { gap: 0 16px; }
.schein #schein .feld-hilfe, .schein .tisch .klein { max-width: 40em; color: var(--grau); font-size: 1.0625rem; line-height: 1.45; }
.schein #schein .feld-hilfe { margin-top: 8px; }
.schein #schein .frei { color: var(--grau); font-weight: 400; }

/* Adresse der Website: Eingabe und fester Teil bilden ein Feld */
.schein #schein .adr-zeile { align-items: stretch; gap: 0; }
.schein #schein .adr-zeile input { border-radius: 9px 0 0 9px; }
/* Der Fokus rahmt beide Teile zusammen */
.schein #schein .adr-zeile:focus-within { outline: 3px solid var(--tinte); outline-offset: 2px; border-radius: 9px; }
.schein #schein .adr-zeile input:focus-visible { outline: none; }
.schein #schein .adr-zeile span { display: flex; align-items: center; padding: 0 14px; background: var(--zeile); border: 2px solid var(--feld); border-left: 0; border-radius: 0 9px 9px 0; color: var(--tinte); font-size: 1.0625rem; font-weight: 700; }

/* ---------- Fehlermeldungen: rot, fett und mit Zeichen ---------- */
.schein #schein .feld input[aria-invalid="true"], .schein #schein .feld select[aria-invalid="true"] { border-width: 2px; border-color: var(--rotstift); box-shadow: inset 0 0 0 1px var(--rotstift); }
.schein .tisch .fehler { position: relative; margin-top: 8px; padding-left: 31px; color: var(--rot); font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.schein .tisch .fehler::before { content: ""; position: absolute; left: 0; top: .06em; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--warnung) center / contain no-repeat; mask: var(--warnung) center / contain no-repeat; }
.schein .tisch .fehler.sammel { margin-top: 1.5rem; padding: 14px 18px 14px 52px; background: var(--rot-hell); border-radius: 9px; font-size: 1.125rem; }
.schein .tisch .fehler.sammel::before { left: 16px; top: 14px; width: 24px; height: 24px; }
.schein .tisch .fehler.sammel:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; }

/* ---------- Auswahl ---------- */
/* Rechnung an Schule oder Schulträger: zwei Kacheln mit rundem Wahlknopf */
.schein #schein .kreuze.rund { grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 12px; }
.schein #schein .kreuze.rund label, .schein #schein fieldset .kreuze.einzeln label { background: #fff; border: 2px solid var(--linie); border-radius: 9px; transition: border-color .15s, background-color .15s; }
.schein #schein .kreuze.rund label { min-height: 58px; padding: 10px 16px; font-size: 1.1875rem; font-weight: 700; }
.schein #schein .kreuze.rund label:hover, .schein #schein fieldset .kreuze.einzeln label:hover { border-color: var(--feld); }
.schein #schein .kreuze.rund input { border-radius: 50%; }
.schein #schein .kreuze.rund input:checked, .schein #schein .kreuze.rund label:hover input:checked { background: radial-gradient(circle, var(--tief) 0 41%, #fff 46%); border-color: var(--tief); }
/* Zusatzpakete: Name in einer eigenen Zeile, darunter Preis und Beschreibung */
.schein #schein fieldset .kreuze.einzeln { gap: 10px; margin-top: 12px; }
.schein #schein fieldset .kreuze.einzeln label { gap: 14px; padding: 16px 18px 18px; font-size: inherit; line-height: 1.5; }
.schein #schein fieldset .kreuze.einzeln b { display: block; margin-bottom: 2px; font: 700 1.3125rem/1.25 var(--titel); }
.schein #schein fieldset .kreuze.einzeln + .feld-hilfe { margin-top: 16px; }
@supports selector(:has(*)) {
  .schein #schein .kreuze.rund label:has(input:checked), .schein #schein fieldset .kreuze.einzeln label:has(input:checked) { background: var(--hell); border-color: var(--tief); }
  /* Der Fokus rahmt die ganze Kachel */
  .schein #schein .kreuze.rund label:has(input:focus-visible), .schein #schein fieldset .kreuze.einzeln label:has(input:focus-visible) { outline: 3px solid var(--tinte); outline-offset: 3px; }
  .schein #schein .kreuze.rund input:focus-visible, .schein #schein fieldset .kreuze.einzeln input:focus-visible { outline: none; }
}
/* Die beiden Zusagen vor dem Absenden */
.schein #schein .zusagen { gap: 2px; margin-top: 28px; }
.schein #schein .zusagen label { padding: 10px 0; }
.schein #schein .zusagen .feld-hilfe { margin: -4px 0 10px 40px; }
.schein #schein .zusagen .fehler { margin: -2px 0 10px 40px; }
.schein #schein .kreuze input[aria-invalid="true"] { border-width: 2px; border-color: var(--rotstift); box-shadow: 0 0 0 1px var(--rotstift); }

/* ---------- Das bestellen Sie: Hinweiskasten wie „Merke“ auf der Startseite ---------- */
.schein #schein .kurzfassung { margin-top: 0 !important; padding: clamp(20px, 2.4vw, 30px); background: var(--hell); border-radius: 14px; }
.schein #schein .kurzfassung h2 { color: var(--tinte); font: 700 1.5rem/1.2 var(--titel); }
.schein #schein .kurzfassung .haken { gap: 10px; margin-top: 14px !important; }
.schein #schein #k-preis { font-weight: 700; }

/* ---------- Absenden ---------- */
.schein #schein .knopfzeile { margin-top: 1.75rem !important; }
.schein #schein .danach { margin-top: 16px; font-weight: 700; }
.schein #schein .danach + .klein { margin-top: 10px; }

/* ---------- Bestätigung nach dem Absenden ---------- */
.schein .tisch .fertig > * + * { margin-top: 1.1rem; }
.schein .tisch .fertig > p { max-width: 36em; }
.schein .tisch .fertig .loesung-zeile { flex-wrap: nowrap; justify-content: flex-start; gap: 16px; }
.schein .tisch .fertig h2 { min-width: 0; color: var(--tinte); font: 700 clamp(1.75rem, 2.6vw, 2.25rem)/1.12 var(--titel); text-wrap: balance; }
/* Der Haken steht in einem Petrol-Kreis vor der Überschrift; das Wort daneben bleibt für Vorleseprogramme */
.schein .tisch .fertig .korrektur { order: -1; flex: none; display: grid; place-items: center; width: 56px; height: 56px; margin: 0; background: var(--tief); border-radius: 50%; color: #fff; transform: none; }
.schein .tisch .fertig .korrektur svg { width: 30px; height: auto; margin: 0 0 2px 2px; stroke-width: 4.5; }
.schein .tisch .fertig .korrektur span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.schein .tisch .eingetragen { color: inherit; font: inherit; font-weight: 700; }
.schein .tisch #b-fertig-adr { overflow-wrap: anywhere; }
.schein .tisch .fertig .knopfzeile { margin-top: 1.75rem !important; }

/* ---------- Randspalte: Ablauf, Hinweis, Rechnung ---------- */
.schein .tisch .seite + .seite { grid-area: 5 / 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: var(--luft); padding: 0; }
.schein .tisch .rechts-oben { gap: 0; }
.schein .tisch .zeitleiste { margin-top: 18px; }
.schein .tisch .zeitleiste li { padding-bottom: 20px; }
.schein .tisch .zeitleiste li::before { left: 3px; width: 18px; height: 18px; background: var(--tief); }
.schein .tisch .zeitleiste li::after { background: #9FB3BA; }
.schein .tisch .merke { margin-top: 26px !important; padding-bottom: clamp(12px, 1.4vw, 20px); background: #fff; }
/* Der Verweis steht in einer eigenen Zeile und ist 44 px hoch */
.schein .tisch .merke a { display: flex; align-items: center; width: fit-content; min-height: 44px; font-weight: 700; }
/* Die Rechnung als Karte. Der Satz „Heute zahlen Sie nichts“ schließt sie als Petrol-Streifen ab. */
.schein .tisch .klebt { --pad: clamp(20px, 2.2vw, 28px); position: static; gap: 0; margin: 0; padding: var(--pad) var(--pad) 0; background: #fff; border-radius: 14px; overflow: hidden; }
.schein .tisch .summe { margin-top: 12px !important; padding: 0; background: none; border-radius: 0; }
.schein .tisch .summe div, .schein .tisch .summe div:nth-child(even) { padding: 13px 0; background: none; border-top: 1px solid var(--linie); }
.schein .tisch .summe dt { font-size: 1.125rem; line-height: 1.35; }
.schein .tisch .summe dd { color: var(--tinte); font-size: 1.3125rem; }
.schein .tisch .summe .gesamt { padding: 16px 0 14px; border-top: 2px solid var(--tinte); }
.schein .tisch .summe .gesamt dt { font: 700 1.3125rem/1.2 var(--titel); }
.schein .tisch .summe .gesamt dd { color: var(--tief); font-size: 2.125rem; }
.schein .tisch .folge { margin-top: 0; }
.schein .tisch .klebt .bleistift { margin-top: 4px !important; color: var(--grau); font: 400 1.0625rem/1.45 var(--text); transform: none; }
.schein .tisch .heute-null { margin: 20px calc(var(--pad) * -1) 0; padding: 16px var(--pad) 18px; background: var(--tief); color: #fff; }

/* ---------- Breiten ---------- */
/* Schmal: Das Blatt reicht von Rand zu Rand und schließt an den Kopf an, damit die Felder breit bleiben. */
@media (max-width: 619px) {
  .schein .tisch #schein, .schein .tisch .fertig { grid-column: 1 / -1; max-width: none; margin-top: 0 !important; padding: 28px var(--rand) 36px; border-radius: 0; }
}
@media (max-width: 479px) {
  .schein #schein .kreuze.rund { grid-template-columns: 1fr; }
  /* Der feste Teil der Adresse steht unter der Eingabe, beide bleiben ein Feld */
  .schein #schein .adr-zeile { flex-wrap: wrap; }
  .schein #schein .adr-zeile input { flex: 1 1 100%; border-radius: 9px 9px 0 0; }
  .schein #schein .adr-zeile span { flex: 1 1 100%; min-height: 44px; border: 2px solid var(--feld); border-top: 0; border-radius: 0 0 9px 9px; font-size: 1.0625rem; }
}
/* Mittel: Ablauf und Rechnung stehen unter dem Formular nebeneinander */
@media (min-width: 700px) and (max-width: 999px) {
  .schein .tisch .seite + .seite { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 48px); align-items: start; }
}
/* Breit: Formular links, Randspalte rechts */
@media (min-width: 1000px) {
  .schein .tisch .bogen { grid-template-columns: var(--innen) minmax(0, 1fr) clamp(36px, 5vw, 96px) clamp(320px, 30%, 460px) var(--innen); }
  .schein .tisch h1, .schein .tisch .vorspann, .schein .tisch noscript { grid-column: 2 / 5; }
  .schein .tisch .seite + .seite { grid-area: 4 / 4; align-self: stretch; align-content: start; }
}
/* Die Rechnung läuft beim Ankreuzen mit, wenn das Fenster hoch genug für die ganze Karte ist */
@media (min-width: 1000px) and (min-height: 720px) {
  .schein .tisch .klebt { position: sticky; top: 24px; }
}

/* ---------- Druck: ohne Flächen, dunkle Schrift ---------- */
@media print {
  .schein, .schein .tisch { background: #fff; }
  .schein .tisch .bogen::before { display: none; }
  .schein .tisch h1, .schein .tisch .vorspann { color: var(--tinte); }
  .schein .tisch .heute-null { background: none; color: var(--tinte); }
  .schein .tisch .klebt { position: static; }
}
