/* Rahmen und Stil der Server-Seiten des Lernstudios (ARCHITEKTUR §20).
   Keine Bewegung, keine Übergänge, keine Animation. */
/* Farben, Schriften, Formen und Abstände kommen aus werte.css (Gestaltungswerte, Meilenstein A0.3),
   das jede Seite vor diesem Stylesheet einbindet. Hier stehen nur Rahmen und Seitenaufbau der
   Server-Seiten. Die Schemawahl (hell/dunkel/Gerät) steckt in werte.css. */
:root {
  --leise: var(--text-3); --auf-akzent: var(--akzent-text); --hinweis: var(--warn);
  --zeilenhoehe: 1.5;
}

html { -webkit-text-size-adjust: 100%; font-size: 100%; scroll-behavior: auto; }
html.schrift-klein { font-size: 87.5%; --zeilenhoehe: 1.5; }
html.schrift-gross { font-size: 112.5%; --zeilenhoehe: 1.6; }
html.schrift-sehr_gross { font-size: 125%; --zeilenhoehe: 1.7; }

* { box-sizing: border-box; animation: none !important; transition: none !important; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 1rem/var(--zeilenhoehe) var(--ui);
}
a { color: var(--akzent-stark); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--akzent); outline-offset: 2px;
}

.kopf {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  max-width: 44rem; margin: 0 auto; padding: .75rem 1rem;
}
.kopf .name { font-weight: 600; color: var(--text); text-decoration: none; }
.kopf .konto { color: var(--leise); }

.seite { max-width: 44rem; margin: 0 auto; padding: .5rem 1rem 9rem; }
.seite > * { max-width: 38rem; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 1rem 0 .5rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 .5rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.leise { color: var(--leise); }
.hinweis { border: 1px solid var(--hinweis); border-radius: .25rem; padding: .5rem .75rem; margin: 1rem 0; }

/* Ziele: am Telefon als Leiste am unteren Rand (mit dem Daumen erreichbar) */
.ziele {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--flaeche); border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom);
}
.ziele ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0 .25rem; list-style: none; }
.ziele li { flex: 1 1 auto; }
.ziele a {
  display: flex; align-items: center; justify-content: center; min-height: 3.25rem;
  padding: .25rem .5rem; text-align: center; color: var(--text); text-decoration: none; font-size: 1rem;
}
.ziele a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }

@media (min-width: 48rem) {
  .kopf { padding-top: 1rem; }
  .ziele { position: static; background: none; border: 0; max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
  .ziele ul { gap: 1.5rem; border-bottom: 1px solid var(--linie); }
  .ziele li { flex: 0 0 auto; }
  .ziele a { min-height: 2.75rem; justify-content: flex-start; padding: .25rem 0; font-size: 1rem; }
  .seite { padding-bottom: 3rem; }
}

/* Formulare */
.formular { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
label { font-weight: 600; }
input[type="text"], input[type="password"], input[type="email"] {
  font: inherit; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--leise); border-radius: .375rem; padding: .625rem .75rem; min-height: 3rem; width: 100%;
}
button {
  font: inherit; font-weight: 600; min-height: 3rem; padding: .5rem 1rem; border-radius: .375rem;
  border: 1px solid var(--akzent); background: var(--akzent); color: var(--auf-akzent); cursor: pointer;
  margin-top: .5rem;
}
button.zweit { background: transparent; color: var(--akzent); }

/* Paket 2.2a: Start, Register, Suche */
.sr-nur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
textarea {
  font: inherit; color: var(--text); background: var(--flaeche); resize: vertical;
  border: 1px solid var(--leise); border-radius: .375rem; padding: .625rem .75rem; min-height: 5.5rem; width: 100%;
}
select {
  font: inherit; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--leise); border-radius: .375rem; padding: .5rem .75rem; min-height: 3rem; width: 100%;
}
textarea:focus-visible, select:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.schnell { margin-top: .5rem; }
.ruhig { margin: .75rem 0; }
.filter { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.filter .feld { display: flex; flex-direction: column; gap: .25rem; }
.liste { list-style: none; margin: 0; padding: 0; }
.quelle { padding: .75rem 0; border-bottom: 1px solid var(--linie); }
.quelle .titel { font-weight: 600; font-size: 1.0625rem; overflow-wrap: anywhere; }
.quelle p { margin: .25rem 0 0; }
.quelle .angaben { font-size: .9375rem; }
h3 { font-size: 1.0625rem; margin: 1.25rem 0 .25rem; }
.anzahl { color: var(--leise); margin: 1rem 0 0; }
@media (min-width: 48rem) {
  .filter { flex-direction: row; flex-wrap: wrap; align-items: end; gap: .5rem 1rem; }
  .filter select { width: auto; min-width: 10rem; }
}

/* Paket 2.2b: Nachrichten, Bericht im Rahmen, Kosten, Status (ruhig: keine Marke, keine Bewegung) */
.ruhig { font-size: 1.125rem; margin: .5rem 0; }
.nachrichten { list-style: none; margin: 1rem 0; padding: 0; }
.nachricht { padding: .75rem 0; border-top: 1px solid var(--linie); }
.nachricht:last-child { border-bottom: 1px solid var(--linie); }
.nachricht p { margin: .125rem 0; }
.nachricht-titel { font-weight: 600; }
.nachricht-meta { font-size: .9375rem; }
form.klein { margin: .5rem 0; }
form.klein button { margin-top: .25rem; }
.teil { margin: 0 0 1rem; }
.teil h2 { margin-top: 1.5rem; }
progress { width: 100%; max-width: 38rem; height: .75rem; accent-color: var(--akzent); }
.zwecke { margin: .5rem 0; padding-left: 1.25rem; }
.bericht { max-width: 38rem; }
.bericht h1 { margin-top: .5rem; }
.bericht h3 { font-size: 1.0625rem; margin: 0 0 .25rem; }
.bericht .zeitraum, .bericht .meta { color: var(--leise); font-size: .9375rem; margin: 0 0 .5rem; }
.bericht .eintrag { margin: 0 0 1.5rem; }
.bericht .kern { margin: .25rem 0 .5rem; }
.bericht .punkte { margin: 0 0 .5rem; padding-left: 1.25rem; }
.bericht .warnung { font-weight: 600; margin: .25rem 0; }
.bericht .original { margin: .25rem 0 0; }
.bericht .adresse { display: none; font-size: .875rem; word-break: break-all; }
.bericht .vorschlag { border-left: .25rem solid var(--akzent); padding-left: .75rem; margin: 0 0 1.5rem; }
.bericht .begruendung { margin: .25rem 0 .5rem; font-weight: 600; }
.bericht .hinweise { border: 1px solid var(--linie); padding: .5rem .75rem; margin: 1rem 0; }
.bericht .hinweise p { margin: .25rem 0; }
.bericht .nichts { color: var(--leise); }
.bericht .fuss { color: var(--leise); font-size: .9375rem; margin-top: 2rem; border-top: 1px solid var(--linie); padding-top: 1rem; }
.bericht details > summary { cursor: pointer; }
@media print {
  .kopf, .ziele, .bericht + p { display: none; }
  .seite { padding: 0; max-width: none; }
  .bericht .adresse { display: inline; }
  .bericht .eintrag, .bericht .vorschlag { break-inside: avoid; }
}
/* Paket 2.5: ruhige Ablagefläche */
#ablageflaeche { border: 2px dashed currentColor; padding: 2rem; margin-block: 1rem; }
#fortschritt { overflow-wrap: anywhere; }


/* Paket 2.6: Einstellungen */
input[type="time"], input[type="number"], input[type="date"] {
  font: inherit; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--leise); border-radius: .375rem; padding: .625rem .75rem; min-height: 3rem; width: 100%; max-width: 14rem;
}
input[type="time"]:focus-visible, input[type="number"]:focus-visible, input[type="date"]:focus-visible,
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
input[type="checkbox"], input[type="radio"] { width: 1.5rem; height: 1.5rem; vertical-align: middle; accent-color: var(--akzent); }
.krumen { margin: 0 0 .5rem; font-size: .9375rem; }
.unterseiten ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.unterseiten a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.unterseiten a[aria-current="page"] { font-weight: 700; color: var(--text); text-decoration: none; border-bottom: 3px solid var(--akzent); }
.abschnittsliste { list-style: none; margin: 1rem 0; padding: 0; }
.abschnittsliste li { margin: 0 0 1rem; }
.abschnittsliste a { font-size: 1.125rem; font-weight: 600; }
fieldset { border: 1px solid var(--linie); border-radius: .375rem; margin: 0 0 1rem; padding: .5rem 1rem 1rem; }
legend { font-weight: 700; padding: 0 .5rem; }
.wahl { margin: .5rem 0; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; }
.knopfreihe form.klein { margin: .25rem 0; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste .eintrag { padding: .75rem 0; border-top: 1px solid var(--linie); }
.liste .eintrag p { margin: .25rem 0; }
details.vorschlag { border-top: 1px solid var(--linie); padding: .5rem 0; }
details.vorschlag summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; gap: .5rem; }
@media (min-width: 40rem) { .einstellung { max-width: 38rem; } }


/* Paket 2.4: Quelle lesen und festhalten (ruhig: keine Warnfarbe für „nicht gefunden“, keine Bewegung) */
.beruht { border-left: .25rem solid var(--akzent); padding: .25rem 0 .25rem .75rem; margin: 1rem 0; }
.stufen { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0; }
.stufen form { margin: 0; }
.stufen button, .stufen a.stufe {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; min-width: 3rem;
  padding: .25rem .875rem; margin: 0; border: 1px solid var(--akzent); border-radius: .375rem;
  font: inherit; font-weight: 600; text-decoration: none;
}
.stufen a.stufe { color: var(--akzent); }
.stufen [aria-current="true"] { background: var(--akzent); color: var(--auf-akzent); opacity: 1; }
.kern { font-size: 1.125rem; }
.punkte { padding-left: 1.25rem; margin: .25rem 0 0; }
.aussagen { list-style: none; margin: 0; padding: 0; }
.aussage { padding: .75rem 0; border-bottom: 1px solid var(--linie); }
.aussage-text { margin: 0 0 .25rem; font-weight: 600; }
.aussage .zitat { margin: .25rem 0; padding: .25rem 0 .25rem .75rem; border-left: 2px solid var(--linie); color: var(--leise); font-style: italic; overflow-wrap: anywhere; }
.aussage .beleg { margin: .25rem 0; }
.begriffe dt { font-weight: 600; margin-top: .5rem; }
.begriffe dd { margin: 0; }
.gliederung { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: .25rem 0; }
.wege { list-style: none; margin: 0 0 .5rem; padding: 0; }
.wege li a { display: inline-block; padding: .5rem 0; }
.abzug { max-width: 38rem; }
.abzug .absatz { white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 1rem; }
.abzug .abschnitt { margin: 1.5rem 0 .5rem; padding: 0; border: 0; font-size: 1.125rem; }
.abzug .seitenmarke { margin: 1.5rem 0 .5rem; padding-top: .5rem; border-top: 1px solid var(--linie); color: var(--leise); font-size: .9375rem; }
.abzug mark { background: var(--flaeche); color: var(--text); outline: 2px solid var(--akzent); outline-offset: 1px; scroll-margin-top: 4rem; }
.blaettern { display: flex; gap: 1.5rem; align-items: center; margin: 1.5rem 0; }
.blaettern a { padding: .75rem 0; }
.zurueck a { display: inline-block; padding: .5rem 0; }
.wahl { margin: .75rem 0; }
.wahl-frage { margin: 0 0 .25rem; font-weight: 600; }
.wahl-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
.wahl button { margin: 0; }
.wahl button[aria-current="true"], .stufen button[aria-current="true"] { background: var(--akzent); color: var(--auf-akzent); opacity: 1; }
.aussage-wege { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.aussage-wege form { margin: 0; }
.aussage-wege a { display: inline-block; padding: .5rem 0; }
.notiztext { white-space: pre-line; overflow-wrap: anywhere; margin: .25rem 0 1rem; }
.fassungen { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1rem 0; }
.fassung { border: 1px solid var(--linie); border-radius: .375rem; padding: .5rem .75rem; }
.fassung h3 { margin-top: 0; }
@media (min-width: 48rem) { .fassungen { grid-template-columns: 1fr 1fr; max-width: 44rem; } }
details summary { cursor: pointer; padding: .5rem 0; }
/* Paket 2.1b: Wiederherstellungscodes */
.codes { list-style: none; padding: 0; columns: 2; }
.codes li { margin: .25rem 0; font-size: 1.125rem; }
/* 2.11a: Verlaufstabelle auf der Statusseite */
table.verlauf { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.verlauf th, table.verlauf td { text-align: right; padding: .25rem .5rem; border-bottom: 1px solid var(--linie); }
table.verlauf th:first-child, table.verlauf td:first-child { text-align: left; }
@media (max-width: 30rem) { table.verlauf { font-size: .85rem; } table.verlauf th, table.verlauf td { padding: .2rem .3rem; } }
/* Paket 2.7: Rundgang und Handbuch im Dashboard */
.rundgang { list-style: none; margin: 1rem 0; padding: 0; max-width: 40rem; }
.rundgang li { padding: .75rem 0; border-bottom: 1px solid var(--linie); }
.rundgang h2 { margin: 0 0 .25rem; font-size: 1.125rem; }
.rundgang p { margin: .25rem 0; }
.rundgang-wege a { display: inline-block; padding: .5rem 0; }
.handbuch { max-width: 40rem; }
.handbuch code { overflow-wrap: anywhere; }
/* Paket 2.10: Tabs im Dashboard und Geräte (ruhig, ohne Skript) */
.tabliste, .geraete { padding-left: 1.25rem; }
.tabliste li, .geraete li { margin: .75rem 0; }
.tabliste form.klein { margin: .25rem 0 0; }
.geraete .entfernen { display: inline-block; margin-left: .75rem; padding: .5rem 0; }
.geraet h2 { margin-top: 1.5rem; }
input[readonly] { width: 100%; max-width: 38rem; font-family: ui-monospace, monospace; }
