/* Schüler helfen Schülern – Design angelehnt an www.gymnasium-scheinfeld.de */
:root {
  --rot: #aa0000;          /* Akzent der Schulwebseite (Linie unter Überschriften) */
  --rot-dunkel: #750000;   /* Zwischenüberschriften der Schulwebseite */
  --rot-hell: #fbeaea;
  --text: #08100c;
  --text-2: #334155;
  --grau: #687480;
  --linie: #dcdadc;
  --flaeche: #f6f6f7;
  --weiss: #ffffff;
  --ok: #166534; --ok-hell: #dcfce7;
  --fehler: #b91c1c; --fehler-hell: #fee2e2;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--text); background: #e9ebee;
}
body.mit-bild { background: #e9ebee var(--bg-bild) center top / cover fixed no-repeat; }
body.eingebettet { background: transparent; }
a { color: var(--rot-dunkel); }
a:hover { color: var(--rot); }

/* Kopfzeile wie auf der Schulwebseite */
.kopf { max-width: 1180px; margin: 0 auto; padding: 22px 24px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.kopf .logo { display: inline-block; background: rgba(255,255,255,.88); padding: 8px 14px; }
.kopf .logo img { display: block; height: 58px; width: auto; }
.kopf .zurueck { background: rgba(255,255,255,.92); padding: 8px 14px; font-size: 15px; color: var(--text-2); text-decoration: none; }
.kopf .zurueck:hover { color: var(--rot); }

.rahmen { max-width: 1180px; margin: 0 auto; padding: 24px; }
.flaeche { background: rgba(255,255,255,.95); padding: 36px 44px 40px; }
body.eingebettet .rahmen { padding: 0; }
body.eingebettet .flaeche { background: transparent; padding: 4px 2px; }

h1 { font-size: 28.8px; font-weight: 500; line-height: 1.25; margin: 0 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--rot); }
h2 { font-size: 22.4px; font-weight: 500; color: var(--rot-dunkel); margin: 34px 0 12px; }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.einleitung { font-size: 18.5px; color: var(--text-2); max-width: 52em; }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 8px; }
.kachel { background: var(--weiss); border: 1px solid var(--linie); border-top: 3px solid var(--rot); padding: 16px 18px; }
.kachel b { display: block; font-size: 20px; font-weight: 600; color: var(--rot-dunkel); line-height: 1.25; margin-bottom: 4px; }
.kachel span { font-size: 15px; color: var(--grau); line-height: 1.45; display: block; }

/* Ablauf */
.ablauf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.ablauf li { counter-increment: s; background: var(--flaeche); padding: 16px 18px 16px 62px; position: relative; }
.ablauf li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--rot); color: #fff; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.ablauf b { display: block; }
.ablauf span { font-size: 15px; color: var(--grau); }

/* Reiter */
.reiter { margin-top: 10px; border: 1px solid var(--linie); background: var(--weiss); }
.reiter > input { position: absolute; opacity: 0; pointer-events: none; }
.reiterleiste { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--linie); }
.reiterleiste label { cursor: pointer; text-align: center; padding: 16px 10px 13px; background: var(--flaeche); color: var(--grau);
  font-weight: 500; border-bottom: 3px solid transparent; }
.reiterleiste label small { display: block; font-weight: 400; font-size: 13.5px; }
.reiterleiste label:hover { color: var(--text); }
#r-s:checked ~ .reiterleiste label[for=r-s], #r-l:checked ~ .reiterleiste label[for=r-l] { background: var(--weiss); color: var(--rot-dunkel); border-bottom-color: var(--rot); }
#r-s:focus-visible ~ .reiterleiste label[for=r-s], #r-l:focus-visible ~ .reiterleiste label[for=r-l] { outline: 2px solid var(--rot); outline-offset: -4px; }
.teil { display: none; padding: 28px 32px 32px; }
#r-s:checked ~ .teil-s, #r-l:checked ~ .teil-l { display: block; }

/* Formular */
fieldset { border: 0; margin: 0 0 26px; padding: 0; }
legend { font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--rot-dunkel); margin-bottom: 12px; padding: 0; }
.zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.zeile.drei { grid-template-columns: 1fr 1fr 1fr; }
.feld { display: flex; flex-direction: column; margin-bottom: 14px; }
.feld > label, .feld > .titel { font-weight: 500; font-size: 15.5px; margin-bottom: 6px; }
.feld .hinweis { font-size: 13.5px; color: var(--grau); margin-top: 5px; }
.pflicht { color: var(--rot); }
input[type=text], input[type=tel], select {
  font: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1px solid #b9bcc2; border-radius: 3px;
  padding: 10px 12px; width: 100%; min-height: 46px;
}
input[type=text]:focus, input[type=tel]:focus, select:focus { outline: none; border-color: var(--rot); box-shadow: 0 0 0 3px rgba(170,0,0,.15); }
.feld.fehler input, .feld.fehler select { border-color: var(--fehler); background: #fffafa; }
.feld .fehlertext { color: var(--fehler); font-size: 14px; margin-top: 5px; font-weight: 500; }
.auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.auswahl label, .optionen label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--linie); background: #fff;
  cursor: pointer; font-size: 15.5px; border-radius: 3px; }
.auswahl label:hover, .optionen label:hover { border-color: #9aa0a8; }
.auswahl input, .optionen input, .bestaetigen input { accent-color: var(--rot); width: 18px; height: 18px; flex: none; margin: 0; }
.auswahl label:has(input:checked), .optionen label:has(input:checked) { border-color: var(--rot); background: var(--rot-hell); }
.auswahl label.aus { opacity: .45; cursor: not-allowed; }
.optionen { display: flex; flex-wrap: wrap; gap: 8px; }
.zaehler { font-size: 13.5px; color: var(--grau); margin-top: 6px; }
.bestaetigen { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--flaeche); margin-bottom: 10px; font-size: 15.5px; cursor: pointer; }
.bestaetigen input { margin-top: 3px; }
.knopf { font: inherit; font-weight: 600; font-size: 17px; background: var(--rot); color: #fff; border: 0; border-radius: 3px; padding: 14px 30px; cursor: pointer; }
.knopf:hover { background: var(--rot-dunkel); }
.knopf:focus-visible { outline: 3px solid rgba(170,0,0,.35); outline-offset: 2px; }
.versteckt { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.meldung { padding: 14px 18px; margin: 0 0 22px; font-size: 16px; border-left: 4px solid; }
.meldung.fehler { background: var(--fehler-hell); border-color: var(--fehler); color: #7f1d1d; }
.meldung.ok { background: var(--ok-hell); border-color: var(--ok); color: #14532d; }
.datenschutz { font-size: 14.5px; color: var(--grau); background: var(--flaeche); padding: 14px 18px; margin-top: 28px; }
.fuss { max-width: 1180px; margin: 0 auto; padding: 0 24px 30px; font-size: 14px; }
.fuss a { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); margin-right: 16px; }
body.eingebettet .fuss { display: none; }

/* Danke-Seite */
.danke { text-align: center; padding: 30px 10px 10px; }
.danke .haken { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-hell); color: var(--ok); font-size: 34px; line-height: 64px; margin: 0 auto 16px; }
.danke h2 { color: var(--text); margin-top: 0; }

/* Verwaltung */
.tabelle-wrap { overflow-x: auto; border: 1px solid var(--linie); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--linie); vertical-align: top; white-space: nowrap; }
th { background: var(--flaeche); font-weight: 600; font-size: 13.5px; color: var(--text-2); position: sticky; top: 0; }
tr:hover td { background: #fcf8f8; }
.leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 18px; }
.knopf.klein { font-size: 15px; padding: 10px 18px; }
.knopf.hell { background: #fff; color: var(--rot-dunkel); border: 1px solid var(--rot); }
.knopf.hell:hover { background: var(--rot-hell); }
.loeschen { background: none; border: 0; color: var(--grau); cursor: pointer; font: inherit; font-size: 13.5px; text-decoration: underline; }
.loeschen:hover { color: var(--fehler); }
.zahl { font-size: 34px; font-weight: 600; color: var(--rot-dunkel); line-height: 1; }

@media (max-width: 900px) {
  .kacheln { grid-template-columns: 1fr 1fr; }
  .ablauf { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .kopf { padding: 12px 12px 0; } .kopf .logo img { height: 44px; } .kopf .zurueck { display: none; }
  .rahmen { padding: 12px; }
  .flaeche { padding: 22px 18px 26px; }
  .kacheln, .zeile, .zeile.drei { grid-template-columns: 1fr; }
  .teil { padding: 20px 16px 24px; }
  .auswahl { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 24px; }
}
