/* ────────────────────────────────────────────────────────────────
   _module.css — gemeinsame Stile für alle Modulseiten des
   Prozess-Führerscheins (Lese-Inhalt + interaktive Übungsbausteine).

   SSOT: Diese Datei ersetzt die früher pro Modul duplizierten
   <style>-Blöcke. Wer einen Übungsbaustein anpasst, ändert ihn hier
   an genau einer Stelle. Tokens (--text, --red, --green …) kommen
   aus _base.css und müssen vorher eingebunden sein.
   ──────────────────────────────────────────────────────────────── */

.module-page { max-width: 800px; margin: 0 auto; padding: 48px 32px 80px; }
.module-header { border-bottom: 2px solid var(--text); padding-bottom: 24px; margin-bottom: 40px; }
.module-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text3); margin-bottom: 12px; }
.module-title { font-family: 'DM Serif Display', serif; font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 12px; line-height: 1.2; }
.module-meta { display: flex; gap: 24px; font-size: .85rem; color: var(--text3); flex-wrap: wrap; }

.content-block { margin-bottom: 48px; }
.content-block h2 { font-family: 'DM Serif Display', serif; font-size: 1.5rem; margin-bottom: 16px; }
.content-block h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 8px; color: var(--text); }
.content-block p { color: var(--text2); line-height: 1.7; margin-bottom: 16px; }
.content-block ul { margin-left: 20px; color: var(--text2); line-height: 1.7; }
.content-block li { margin-bottom: 8px; }
.content-block table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .9rem; }
.content-block th, .content-block td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); color: var(--text2); line-height: 1.5; vertical-align: top; }
.content-block th { background: var(--bg2); color: var(--text); font-weight: 700; }
.content-block pre { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 18px 22px; overflow-x: auto; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .83rem; line-height: 1.6; color: var(--text2); margin: 16px 0 24px; white-space: pre; }
.content-block code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .9em; }
.loesung-body pre { margin: 12px 0; }

.alert-box { border-left: 4px solid var(--red); background: var(--bg2); padding: 20px 24px; margin: 24px 0; }
.alert-box h4 { font-size: .85rem; font-weight: 700; color: var(--red); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.alert-box p { color: var(--text2); font-size: .9rem; line-height: 1.6; margin: 0 0 10px; }
.alert-box p:last-child { margin-bottom: 0; }

.merksatz { border-left: 4px solid var(--green); background: var(--green-bg); padding: 20px 24px; margin: 24px 0; }
.merksatz h4 { font-size: .85rem; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.merksatz p { color: var(--text); font-weight: 500; margin: 0; }

.praxisfall { border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin: 24px 0; background: var(--surface); }
.praxisfall h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 12px; }
.praxisfall p { color: var(--text2); font-size: .92rem; line-height: 1.65; margin: 0 0 12px; }
.praxisfall p:last-child { margin: 0; }

.selbstcheck { background: var(--bg2); border-radius: 8px; padding: 24px; margin: 24px 0; }
.selbstcheck h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 12px; }
.selbstcheck ol { margin-left: 20px; color: var(--text2); line-height: 1.7; }

/* ── Übungsbausteine (Referenz-Muster, identisch in allen Modulen) ── */
.uebung { border: 1px solid var(--border); border-left: 4px solid var(--dark); border-radius: 8px; padding: 24px; margin: 24px 0; background: var(--surface); }
.uebung-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--dark); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.uebung-label .tag { background: var(--bg2); color: var(--text3); padding: 2px 8px; border-radius: 999px; font-size: .66rem; letter-spacing: .06em; }
.uebung h3 { font-family: 'DM Serif Display', serif; font-size: 1.25rem; margin: 0 0 8px; color: var(--text); }
.uebung > p { color: var(--text2); line-height: 1.65; font-size: .92rem; margin-bottom: 16px; }

/* Klassifikationsübung (Sofort-Feedback) */
.klass-item { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px dashed var(--border); }
.klass-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.klass-frage { font-weight: 600; color: var(--text); font-size: .95rem; margin-bottom: 10px; line-height: 1.5; }
.klass-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.klass-btn { padding: 8px 16px; border: 2px solid var(--border); border-radius: 7px; background: var(--bg); cursor: pointer; font-family: inherit; font-size: .85rem; font-weight: 600; color: var(--text2); transition: all .12s; }
.klass-btn:hover:not(:disabled) { border-color: var(--dark); color: var(--text); }
.klass-btn:disabled { cursor: default; }
.klass-btn.right { border-color: #15803d; background: #f0fdf4; color: #15803d; }
.klass-btn.wrong { border-color: var(--red); background: #fef2f2; color: var(--red); }
.klass-fb { margin-top: 10px; font-size: .85rem; line-height: 1.55; color: var(--text2); padding: 10px 14px; border-radius: 6px; background: var(--bg2); display: none; }
.klass-fb.show { display: block; }
.uebung-score { margin-top: 16px; font-size: .85rem; font-weight: 600; color: var(--text3); }

/* Anwendungsübung mit Eingabefeldern + versteckter Lösung */
.felder-grid { display: grid; gap: 12px; margin: 8px 0 16px; }
.feld-row label { display: block; font-size: .8rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.feld-row textarea { width: 100%; resize: vertical; border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; font-family: inherit; font-size: .9rem; min-height: 52px; color: var(--text); background: var(--bg); }
.loesung > summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--dark); padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; list-style: none; user-select: none; }
.loesung > summary::-webkit-details-marker { display: none; }
.loesung > summary::before { content: '▸ '; }
.loesung[open] > summary::before { content: '▾ '; }
.loesung[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.loesung-body { border: 1px solid var(--border); border-top: none; border-radius: 0 0 7px 7px; padding: 18px 20px; }
.loesung-body table { margin: 0; }

/* Eingebetteter Mentor-Check */
.mentor-box { border: 1px solid var(--border); border-left: 4px solid var(--red); border-radius: 8px; padding: 24px; margin: 24px 0; background: var(--surface); }
.mentor-box .uebung-label { color: var(--red); }
.mentor-box h3 { font-family: 'DM Serif Display', serif; font-size: 1.25rem; margin: 0 0 8px; color: var(--text); }
.mentor-box > p { color: var(--text2); line-height: 1.65; font-size: .92rem; margin-bottom: 14px; }
.mentor-box textarea { width: 100%; resize: vertical; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-family: inherit; font-size: .92rem; min-height: 90px; color: var(--text); background: var(--bg); }
.mentor-box button { margin-top: 12px; padding: 11px 22px; border: none; border-radius: 8px; background: var(--red); color: #fff; font-weight: 600; cursor: pointer; font-size: .9rem; }
.mentor-box button:disabled { opacity: .5; cursor: default; }
.mentor-reply { margin-top: 16px; padding: 16px 18px; border-radius: 8px; background: var(--bg2); color: var(--text); font-size: .92rem; line-height: 1.6; white-space: pre-wrap; display: none; }
.mentor-reply.show { display: block; }
.mentor-hint { font-size: .78rem; color: var(--text3); margin-top: 10px; line-height: 1.5; }

.nav-bottom { display: flex; justify-content: space-between; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 6px; font-size: .9rem; font-weight: 600; text-decoration: none; transition: all .15s; }
.nav-btn-prev { background: var(--bg2); color: var(--text2); border: 1px solid var(--border); }
.nav-btn-prev:hover { border-color: var(--text3); color: var(--text); }
.nav-btn-next { background: var(--dark); color: #fff; }
.nav-btn-next:hover { background: #2c2a27; }

@media (max-width: 768px) {
  .module-page { padding: 32px 16px 60px; }
  .module-meta { flex-direction: column; gap: 8px; }
}
