/* ============ Dynexite-Simulator — Stylesheet (Look nach RWTH Dynexite) ============ */
:root {
  --navy: #16283e;
  --navy-2: #1d3350;
  --blue: #2e7fc2;
  --blue-dark: #1c4e79;
  --blue-btn: #2f80d0;
  --gold: #d9a521;
  --bg: #f4f4f4;
  --card: #ffffff;
  --line: #e2e2e2;
  --line-dark: #b9b9b9;
  --txt: #333c48;
  --txt-head: #1f3651;
  --muted: #9aa4af;
  --muted-2: #7d8894;
  --task-bg: #efefef;
  --answer-bg: #fafafa;
  --pill-bg: #cce0f5;
  --ok: #2e8b57;
  --err: #c0392b;
  --shadow: 0 1px 4px rgba(0,0,0,.14);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 14.5px;
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

.math { font-family: Georgia, "Times New Roman", serif; }
.math i, i { font-family: Georgia, "Times New Roman", serif; }
.math.centered, .centered { text-align: center; margin: 14px 0; font-size: 15.5px; }
.ov { text-decoration: overline; }
.ovwide { text-decoration: overline; }
code.red { color: #d33; background: #f7f0f0; padding: 0 4px; border-radius: 2px; font-size: 13px; }

/* ================= Portal-Header ================= */
.site-header { background: var(--navy); color: #fff; padding: 14px 0 0 0; }
.hdr-inner { max-width: 1500px; margin: 0 auto; padding: 0 40px; }
.hdr-top { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-style: italic; font-weight: 800; letter-spacing: 1px;
  font-size: 26px; transform: skewX(-6deg); user-select: none; cursor: pointer;
}
.logo span { border-bottom: 3px solid #fff; padding-bottom: 1px; }
.hdr-nav { display: flex; align-items: center; gap: 34px; color: #8b9bb0; font-size: 13px; }
.hdr-nav .navlink { text-transform: uppercase; letter-spacing: .5px; font-weight: 600; cursor: pointer; }
.hdr-nav .navlink:hover { color: #cdd8e4; }
.hdr-nav .user { color: #b6c2d0; font-size: 14.5px; }
.hdr-nav .logout { cursor: pointer; font-size: 16px; }
.breadcrumb { margin: 18px 0 4px; font-size: 13.5px; color: #d7dee6; }
.breadcrumb .bc { cursor: pointer; }
.breadcrumb .bc:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 7px; color: #7d8ea1; }
.breadcrumb .current { color: #8b9bb0; }
.page-title { font-size: 30px; font-weight: 600; margin: 6px 0 26px; }
.tabs { display: flex; gap: 8px; }
.tab {
  padding: 12px 26px 10px; font-size: 14px; font-weight: 600; letter-spacing: .5px;
  color: #cdd8e4; cursor: pointer; border-bottom: 3px solid transparent; text-transform: uppercase;
}
.tab.active { color: #4d9fdc; border-bottom-color: #4d9fdc; }

.banner {
  background: var(--gold); color: #fff; padding: 11px 40px; font-size: 14.5px;
  display: flex; justify-content: space-between; align-items: center;
}
.banner .chev { font-size: 16px; }

/* ================= Portal-Inhalt ================= */
.section-white { background: #fff; padding: 26px 0; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.section-title { max-width: 1500px; margin: 0 auto; padding: 0 40px; font-size: 26px; color: #3d5a77; font-weight: 400; }
.content { max-width: 1500px; margin: 0 auto; padding: 30px 40px 80px; }
.searchbox {
  width: 100%; padding: 10px 14px 10px 38px; border: 1px solid #cfcfcf; border-radius: 3px;
  font-size: 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 12px center;
  margin-bottom: 26px;
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.ex-card { background: var(--card); box-shadow: var(--shadow); padding: 20px 22px; position: relative; }
.ex-card .pill {
  position: absolute; top: 16px; right: 16px; background: var(--pill-bg); color: var(--blue-dark);
  font-size: 12.5px; padding: 3px 12px; border-radius: 12px;
}
.ex-card .kind { color: var(--txt); font-size: 14px; }
.ex-card h3 { margin: 2px 0 14px; font-size: 17px; color: #222; }
.ex-card .meta { font-size: 14px; color: #444; margin-bottom: 26px; }
.btn-outline {
  display: block; width: 100%; text-align: center; background: #fff; color: var(--blue-btn);
  border: 1px solid var(--blue-btn); padding: 10px 0; font-size: 14.5px; border-radius: 2px;
}
.btn-outline:hover { background: #f2f8fd; }
.btn-outline.slim { width: auto; padding: 9px 18px; display: inline-block; }
.btn-blue {
  background: var(--blue-btn); color: #fff; border: none; padding: 10px 28px;
  font-size: 14.5px; border-radius: 2px;
}
.btn-blue:hover { background: #2a72ba; }
.btn-ghost { background: none; border: 1px solid #c9c9c9; color: #888; padding: 8px 16px; border-radius: 2px; }

/* ================= Exercise-Detailseite ================= */
.detail-grid { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.detail-left { flex: 1 1 480px; }
.detail-left .kind { color: var(--muted); font-size: 14px; }
.detail-left h2 { margin: 2px 0 10px; font-size: 24px; color: #222; }
.detail-left .pill {
  display: inline-block; background: var(--pill-bg); color: var(--blue-dark);
  font-size: 12.5px; padding: 3px 12px; border-radius: 12px; margin-bottom: 18px;
}
.avail { font-size: 14.5px; }
.avail .row { display: flex; margin: 3px 0; }
.avail .k { width: 130px; color: #3d5a77; }
.attempt-card {
  flex: 0 0 300px; background: var(--card); box-shadow: var(--shadow); padding: 20px 22px;
}
.attempt-card h3 { margin: 0 0 14px; font-size: 18px; color: #222; }
.attempt-card .row { display: flex; justify-content: space-between; font-size: 14px; margin: 6px 0; }
.attempt-card .k { color: #3d5a77; }
.progressbar { background: #d8d8d8; height: 18px; margin: 10px 0 16px; position: relative; }
.progressbar .fill { background: #a8c8e8; height: 100%; }
.progressbar .lbl { position: absolute; inset: 0; text-align: center; font-size: 11.5px; line-height: 18px; color: #333; }
.attempt-card .actions { text-align: right; }
.attempts-section { margin-top: 50px; }
.attempts-section h3 { color: #3d5a77; font-weight: 400; font-size: 17px; }
.attempt-row {
  display: flex; align-items: center; gap: 26px; background: #fff; border: 1px solid #d9d9d9;
  padding: 16px 22px; margin: 12px 0;
}
.attempt-row .num { font-size: 16px; font-weight: 600; width: 30px; text-align: center; }
.attempt-row .col { flex: 1; font-size: 14px; }
.attempt-row .k { color: #3d5a77; }
.attempt-row .v { color: #222; }

/* ================= Prüfungsansicht ================= */
.exam-top {
  position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--navy);
  display: flex; align-items: center; z-index: 50;
}
.exam-top .close {
  color: #fff; font-size: 20px; padding: 0 22px; height: 100%; display: flex; align-items: center;
  background: none; border: none;
}
.exam-top .close:hover { background: rgba(255,255,255,.08); }
.exam-top .watermark {
  position: absolute; left: 50%; transform: translateX(-50%) skewX(-6deg);
  color: #5a6b80; font-style: italic; font-weight: 800; font-size: 22px; letter-spacing: 1px; opacity: .55;
}
.timerbox {
  position: fixed; top: 0; right: 0; background: #fff; z-index: 60;
  padding: 14px 18px; font-size: 20px; color: var(--blue); font-weight: 500;
  box-shadow: 0 1px 5px rgba(0,0,0,.25); display: flex; align-items: center; gap: 10px;
}
.timerbox .clockicon { font-size: 17px; }
.timerbox.warn { color: #c77b00; }
.timerbox.crit { color: var(--err); }
/* Markieren in der Einsicht: sitzt im Item-Kopf neben dem Filter */
.res-flag {
  border: 1px solid var(--line-dark); background: #fff; color: var(--muted-2);
  border-radius: 4px; width: 30px; height: 26px; font-size: 14px; cursor: pointer;
  margin-left: 12px; line-height: 1;
}
.res-flag:hover { border-color: var(--gold); color: var(--gold); }
.res-flag.on { border-color: var(--gold); color: var(--gold); background: #fdf7e6; }
/* Aktiver Schalter in der Fußleiste (Lösungen eingeblendet) */
.ov-btn.on { background: var(--pill-bg); border-color: var(--blue-dark); color: var(--blue-dark); }
/* Hinweisband der Ansicht "Anschauen" — sitzt an der Stelle des Timers,
   damit sofort klar ist: hier läuft keine Prüfung. */
.viewbadge {
  position: fixed; top: 0; right: 0; background: #fff; z-index: 60;
  padding: 18px 18px; font-size: 13px; color: var(--muted-2); font-weight: 600;
  box-shadow: 0 1px 5px rgba(0,0,0,.25);
}
.exam-scroll { padding: 80px 0 90px; }
.exam-body { max-width: 950px; margin: 0 auto; padding: 0 10px; }
.navcards { display: flex; gap: 20px; margin-bottom: 20px; }
.navcard {
  flex: 1; background: #fff; box-shadow: var(--shadow); padding: 12px 20px; min-height: 58px;
  display: flex; align-items: center; gap: 12px; border: none; font-size: 15px; color: #333;
}
.navcard .dir { font-size: 13px; color: #666; display: block; }
.navcard .lbl { font-size: 16px; }
.navcard.next { justify-content: flex-end; text-align: right; }
.navcard:disabled { opacity: .35; cursor: default; }
.navcard .arrow { font-size: 20px; color: #444; }

.item-card { background: #fff; box-shadow: var(--shadow); padding: 24px 0 30px; }
.item-head { display: flex; justify-content: space-between; padding: 0 28px 18px; }
.item-head .t { color: var(--txt-head); font-weight: 700; font-size: 17px; }
.item-head .p { color: var(--txt-head); font-weight: 700; font-size: 15px; }
.item-topic { border-top: 1px solid var(--line); margin: 0 28px; padding: 16px 0 10px; font-weight: 700; color: #333; }
.iblock-text { padding: 10px 28px; }
.iblock-text ul, .iblock-text ol { margin: 8px 0; }
.iblock-img { text-align: center; padding: 14px 28px; }
.iblock-img img { max-width: 100%; }
.iblock-img .cap { font-size: 13.5px; color: #555; margin-top: 8px; }
.iblock-hint { padding: 12px 28px; font-size: 13.5px; }
.iblock-hint ul { margin: 4px 0 6px; }

.task-bar {
  background: var(--task-bg); display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 28px; margin-top: 14px;
}
.task-bar .icon { color: #9a9a9a; flex: 0 0 auto; margin-top: 1px; }
.task-bar .txt { flex: 1; color: #2f2f2f; }
.task-bar .pts { color: var(--muted-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.answer-row {
  background: var(--answer-bg); border-top: 1px solid #f0f0f0; padding: 14px 28px 16px 60px;
  position: relative;
}
.answer-row .pts { position: absolute; top: 10px; right: 28px; color: var(--muted); font-size: 13px; font-weight: 600; }
.answer-row .lbl { margin: 14px 0 6px; }
.answer-row .fieldline { display: flex; justify-content: flex-end; align-items: baseline; gap: 6px; }
.answer-row.inline-row .fieldline { justify-content: flex-start; flex-wrap: wrap; }
.dyn-input {
  border: none; border-bottom: 1px solid var(--line-dark); background: transparent;
  width: 200px; text-align: center; font-size: 14.5px; padding: 4px 2px; color: #222;
  outline: none;
}
.dyn-input:focus { border-bottom-color: var(--blue); }
.dyn-input::placeholder { color: #b5b5b5; }
.dyn-input.small { width: 110px; }
.dyn-input.answered { background: #f0f6fc; }
.unit { font-family: Georgia, serif; font-style: italic; font-size: 15px; }
.dyn-textarea {
  width: 100%; border: 1px solid var(--line-dark); background: #fff; padding: 10px 12px;
  font-family: "Consolas", "Menlo", monospace; font-size: 13px; line-height: 1.55; resize: vertical;
}
.dyn-textarea:focus { border-color: var(--blue); outline: none; }
pre.res-code {
  background: #f7f7f7; border: 1px solid #e2e2e2; padding: 8px 12px; font-size: 12.5px;
  font-family: "Consolas", "Menlo", monospace; max-width: 480px; overflow-x: auto;
}
.dyn-select {
  border: 1px solid var(--blue); color: var(--blue); background: #fff; padding: 7px 12px;
  font-size: 14px; border-radius: 2px; min-width: 150px;
}
.radio-list { padding: 0 28px; }
.radio-opt {
  display: flex; align-items: center; gap: 14px; padding: 16px 8px; border-top: 1px solid #f0f0f0;
  cursor: pointer; font-size: 14.5px;
}
.radio-opt input { width: 17px; height: 17px; }
.deselect-btn { margin: 12px 28px 0; }

table.dyn-table { border-collapse: collapse; margin: 6px auto; }
table.dyn-table th {
  border-bottom: 2px solid var(--navy); padding: 6px 14px; font-weight: 600; color: #222;
  font-size: 14px; text-align: center;
}
table.dyn-table td { border-bottom: 1px solid #e6e6e6; padding: 5px 14px; text-align: center; }
table.dyn-table .dyn-input { width: 90px; }
table.dyn-table.static td { padding: 7px 18px; }
.kvcorner { font-size: 12px; color: #333; display: inline-block; text-align: left; }
.table-wrap { overflow-x: auto; padding: 6px 20px; }

.statusgroup { padding: 6px 28px 2px; }
.statusgroup .glabel { font-weight: 700; margin: 14px 0 6px; }
.statusline { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; }
.statusline .sl { width: 24px; }
.statusline .dyn-input { width: 120px; text-align: center; }

.progcol { margin: 10px 0; }
.progtitle { font-style: italic; margin: 12px 0 4px; }
pre.asm {
  font-family: "Consolas", "Menlo", monospace; font-size: 13px; margin: 4px 0;
  background: transparent; line-height: 1.7;
}
pre.asm span { background: #fdf0f0; color: #c0392b; padding: 1px 6px; display: inline-block; margin: 1px 0; }

.codeblock {
  margin: 14px 28px; border: 1px solid #ddd; background: #fdfdfd; padding: 16px 20px;
  font-family: "Consolas", "Menlo", monospace; font-size: 13px; line-height: 2.1; overflow-x: auto;
}
.codeline { display: flex; gap: 0; white-space: nowrap; }
.codeline .clabel { width: 70px; color: #2e6fb0; flex: 0 0 auto; }
.codeline .cpre { width: 190px; flex: 0 0 auto; }
.codeline .ccomment { color: #555; }
.codeline .dyn-input { font-family: inherit; font-size: 13px; width: 170px; text-align: left; margin-right: 20px; }
.machinerow td { font-family: "Consolas", "Menlo", monospace; font-size: 13px; }
table.machine { border-collapse: collapse; margin: 10px auto; }
table.machine th { background: #f4f6f8; border: 1px solid #d9d9d9; color: var(--txt-head); padding: 8px 16px; font-size: 13.5px; }
table.machine td { border: 1px solid #d9d9d9; padding: 8px 14px; font-size: 13.5px; }
table.machine td.cm { text-align: left; max-width: 420px; }
table.machine .dyn-input { width: 160px; font-family: "Consolas", monospace; font-size: 12.5px; }

.attach-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--blue-btn);
  color: var(--blue-btn); background: #fff; padding: 8px 16px; font-size: 14px; border-radius: 2px;
  text-decoration: none; margin: 8px auto;
}
.attach-wrap { text-align: center; padding: 16px 0; }

/* PLA SVG */
.pla-wrap { text-align: center; padding: 10px 10px 20px; }
.pla-wrap svg { max-width: 100%; }
.pla-dot { cursor: pointer; }
.pla-dot circle.dot { fill: transparent; stroke: transparent; }
.pla-dot:hover circle.hover { fill: rgba(46,127,194,.25); }
.pla-dot.set circle.dot { fill: #111; }
.pla-hint { font-size: 13px; color: #777; padding: 0 28px 8px; }

/* ================= Untere Item-Leiste ================= */
.exam-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff; z-index: 50;
  box-shadow: 0 -1px 6px rgba(0,0,0,.15); display: flex; align-items: stretch; height: 54px;
}
.ov-btn {
  border: 1px solid #ccc; background: #fff; margin: 8px 12px; padding: 0 16px; font-size: 13px;
  font-weight: 600; letter-spacing: .5px; color: #333; display: flex; align-items: center; gap: 8px;
}
.itembar { flex: 1; display: flex; justify-content: center; align-items: stretch; overflow-x: auto; }
.itembtn {
  border: none; background: none; min-width: 46px; font-size: 15px; color: #9aa4af;
  border-top: 3px solid transparent; padding: 0 6px;
}
.itembtn.answered { color: #333; }
.itembtn.active { color: var(--blue); border-top-color: var(--blue); font-weight: 700; }
.itembtn:hover { background: #f4f7fa; }
.submit-btn {
  border: none; background: #fff; color: var(--navy); font-weight: 700; letter-spacing: .5px;
  font-size: 13.5px; padding: 0 22px; display: flex; align-items: center; gap: 9px;
}
.submit-btn:hover { background: #f0f3f6; }

/* ================= Overview / Info ================= */
.ovgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 10px 28px 20px; }
.ovcell { border: 1px solid #d9d9d9; background: #fff; padding: 12px 14px; cursor: pointer; }
.ovcell:hover { border-color: var(--blue); }
.ovcell .t { font-weight: 700; color: var(--txt-head); }
.ovcell .s { font-size: 12.5px; color: #777; margin-top: 4px; }
.ovcell.done .s { color: var(--ok); }

/* ================= Auswertung ================= */
.result-banner {
  background: var(--navy); color: #fff; padding: 22px 28px; display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.result-banner .score { font-size: 26px; font-weight: 700; }
.result-banner .sub { color: #b6c2d0; font-size: 13.5px; }
.res-item { background: #fff; box-shadow: var(--shadow); margin: 18px 0; }
.res-item-head {
  display: flex; justify-content: space-between; padding: 14px 24px; cursor: pointer;
  border-left: 4px solid #ccc;
}
.res-item-head.full { border-left-color: var(--ok); }
.res-item-head.partial { border-left-color: var(--gold); }
.res-item-head.zero { border-left-color: var(--err); }
.res-item-head .t { font-weight: 700; color: var(--txt-head); }
.res-item-body { border-top: 1px solid var(--line); padding: 4px 24px 18px; }
.res-field { border-bottom: 1px solid #f0f0f0; padding: 10px 0; }
.res-field .q { font-size: 13.5px; color: #666; }
.res-field .cmp { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 5px; }
.res-field .yours, .res-field .corr { font-size: 14px; }
.res-field .yours b, .res-field .corr b { font-weight: 600; }
.res-field .mark { font-weight: 700; }
.res-field .mark.ok { color: var(--ok); }
.res-field .mark.err { color: var(--err); }
.res-field .mark.part { color: #b07d00; }
.res-sol { background: #f6f9fc; border-left: 3px solid var(--blue); padding: 8px 14px; margin-top: 8px; font-size: 13.5px; }
.res-sub-pts { font-size: 13px; color: #555; margin-top: 6px; }
.override { margin-top: 8px; font-size: 13px; color: #555; display: flex; align-items: center; gap: 8px; }
.override input { width: 70px; border: 1px solid #ccc; padding: 3px 6px; }
.pla-sol-note { font-size: 13px; color: #555; }

/* ================= Bewertungsmodus (Ergebnisansicht im Klausur-Layout) ================= */
.scorebox {
  position: fixed; top: 0; right: 0; background: #fff; z-index: 60;
  padding: 17px 20px; font-size: 16px; color: var(--navy); font-weight: 700;
  box-shadow: 0 1px 5px rgba(0,0,0,.25);
}
.graded-field { display: inline-flex; align-items: center; gap: 8px; }
.dyn-input.graded-ok, .dyn-textarea.graded-ok { background: #eaf6ee; border-bottom-color: var(--ok); border-color: var(--ok); }
.dyn-input.graded-err, .dyn-textarea.graded-err { background: #fdecea; border-bottom-color: var(--err); border-color: var(--err); }
.dyn-input.graded-part { background: #fdf6e3; border-bottom-color: var(--gold); }
.dyn-input.graded-manual, .dyn-textarea.graded-manual { background: #eef4fb; border-bottom-color: var(--blue); }
.dyn-select.graded-ok { border-color: var(--ok); background: #eaf6ee; }
.dyn-select.graded-err { border-color: var(--err); background: #fdecea; }
.gmark { font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.gmark.ok { color: var(--ok); }
.gmark.err { color: var(--err); }
.gmark.part { color: #b07d00; }
.corr-badge {
  display: inline-flex; align-items: center; gap: 5px; background: var(--pill-bg); color: var(--blue-dark);
  padding: 3px 10px; border-radius: 3px; font-size: 13px; white-space: nowrap;
}
.corr-badge b { font-weight: 700; }
.corr-badge code { background: transparent; }
.radio-opt.opt-correct { background: #eaf6ee; }
.radio-opt.opt-wrong { background: #fdecea; }
.radio-opt .gmark { margin-left: auto; }
.solution-path {
  border: 1px solid #cfe0f2; border-radius: 3px; margin: 12px 28px 6px; overflow: hidden;
}
.answer-row .solution-path { margin: 12px 0 2px; }
.sp-head {
  background: #eaf2fb; color: var(--blue-dark); font-weight: 700; padding: 9px 14px;
  display: flex; align-items: center; gap: 8px; font-size: 13.5px;
}
.sp-body { padding: 11px 16px; font-size: 13.5px; color: #333; }
.sp-body .math, .sp-body { line-height: 1.6; }
.sp-row { padding: 3px 0; border-bottom: 1px solid #eef2f6; }
.sp-row:last-child { border-bottom: none; }
.manual-hint { margin: 8px 0 2px; font-size: 13px; color: var(--blue-dark); display: flex; align-items: center; gap: 6px; }
.override-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 6px 28px 0; padding: 14px 0 4px; border-top: 1px solid var(--line); font-size: 13.5px; color: #555;
}
.override-row input { width: 90px; border: 1px solid #ccc; padding: 5px 8px; border-radius: 2px; }
.override-row .or-label { font-weight: 600; color: #444; }
.res-filter { font-size: 12px; color: #667; display: flex; align-items: center; gap: 5px; font-weight: 400; }
.hide-ok .answer-row.row-ok { display: none; }
.pill-run { background: #d9efe0 !important; color: #216b43 !important; }
.itembtn.res-full { color: var(--ok); }
.itembtn.res-partial { color: #b07d00; }
.itembtn.res-zero { color: var(--err); }
.itembtn.res-full.active, .itembtn.res-partial.active, .itembtn.res-zero.active { border-top-color: currentColor; font-weight: 700; }
.res-sum-list { padding: 8px 0 4px; }
.res-sum-row {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 28px;
  border-bottom: 1px solid #f0f0f0; cursor: pointer; border-left: 4px solid #ccc;
}
.res-sum-row:hover { background: #f6f9fc; }
.res-sum-row.full { border-left-color: var(--ok); }
.res-sum-row.partial { border-left-color: var(--gold); }
.res-sum-row.zero { border-left-color: var(--err); }
.res-sum-row .rs-t { font-weight: 600; color: var(--txt-head); }
.res-sum-row .rs-p { font-weight: 600; }
.ovr-flag { color: var(--blue); font-weight: 400; font-size: 12px; }
.res-sum-hint { padding: 14px 28px; color: #888; font-size: 13px; }
.result-banner .score { font-size: 24px; }

/* ================= Editor (EDITING) ================= */
.nl-active { color: #cdd8e4 !important; }
.inline-svg svg { max-width: 100%; height: auto; }
.ed-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 18px; }
.ed-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #d9d9d9; padding: 12px 18px; margin: 8px 0; }
.ed-row.slim { padding: 8px 14px; }
.ed-row-main { flex: 1; }
.ed-meta { color: #889; font-size: 12.5px; margin-left: 8px; }
.ed-empty { color: #888; padding: 18px 4px; }
.ed-backup { margin-top: 34px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-box { border: 1px solid #cfe0f2; background: #f6faff; padding: 18px 20px; margin: 30px 0 10px; border-radius: 3px; }
.ai-steps { margin: 8px 0 14px; padding-left: 20px; font-size: 13.5px; }
.ai-steps li { margin: 5px 0; }
.ai-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.ai-box textarea { width: 100%; border: 1px solid #b9c8d6; padding: 9px 11px; font-family: Consolas, Menlo, monospace; font-size: 12px; }
.ai-err { background: #fdecea; border-left: 3px solid var(--err); padding: 10px 14px; margin-top: 10px; font-size: 13px; }
.ai-warn { background: #fdf6e3; border-left: 3px solid var(--gold); padding: 10px 14px; margin-top: 10px; font-size: 13px; }
.ai-ok { background: #eaf6ee; border-left: 3px solid var(--ok); padding: 12px 14px; margin-top: 10px; font-size: 14px; }
.ai-err ul, .ai-warn ul { margin: 6px 0 2px; padding-left: 20px; }
.ed-editor { max-width: 1500px; margin: 0 auto; padding: 18px 24px 60px; }
.ed-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ed-title { font-size: 17px; font-weight: 600; padding: 7px 10px; border: 1px solid #ccc; flex: 1; min-width: 220px; }
.ed-durlbl { font-size: 13.5px; color: #555; }
.ed-cols { display: grid; grid-template-columns: 200px minmax(340px, 1fr) minmax(380px, 1.1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .ed-cols { grid-template-columns: 1fr; } }
.ed-items { background: #fff; border: 1px solid #ddd; padding: 10px; }
.ed-item { display: flex; align-items: center; gap: 6px; padding: 8px 8px; cursor: pointer; border-left: 3px solid transparent; }
.ed-item.active { background: #eef4fb; border-left-color: var(--blue); }
.ed-item span:first-child { flex: 1; }
.ed-item-btns button, .ed-bhead button { border: none; background: none; cursor: pointer; color: #789; font-size: 13px; padding: 1px 4px; }
.ed-blocks { background: #fff; border: 1px solid #ddd; padding: 14px; }
.ed-blockhead { display: flex; align-items: center; font-weight: 700; color: var(--txt-head); margin-bottom: 10px; }
.ed-block { border: 1px solid #e3e7ec; background: #fbfcfd; padding: 10px 12px; margin: 10px 0; }
.ed-bhead { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; color: #445; }
.ed-block textarea { width: 100%; border: 1px solid #ccc; padding: 7px 9px; font-size: 13px; font-family: inherit; }
.ed-addblock { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ed-addblock button { border: 1px dashed #9db4c8; background: #f4f8fc; color: var(--blue-dark); padding: 7px 12px; font-size: 13px; cursor: pointer; }
.ed-field { border-top: 1px dashed #d5dde5; margin-top: 10px; padding-top: 8px; }
.ed-frow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 5px 0; font-size: 13px; }
.ed-frow label { display: flex; flex-direction: column; font-size: 11.5px; color: #667; gap: 2px; }
.ed-frow input, .ed-frow select { border: 1px solid #ccc; padding: 5px 7px; font-size: 13px; }
.ed-frow button { border: none; background: none; cursor: pointer; }
.ed-preview { position: sticky; top: 12px; }
.ed-prevlbl { font-size: 12px; letter-spacing: 1px; color: #98a4b0; text-transform: uppercase; margin-bottom: 6px; }
.ed-cirprev { background: #fff; border: 1px solid #eee; text-align: center; padding: 6px; margin: 6px 0; }
.ed-cirprev svg { max-width: 100%; height: auto; max-height: 220px; }

/* ---- Schaltbild-Editor ---- */
.cir-modal { position: fixed; inset: 0; background: rgba(20,30,45,.6); z-index: 200; display: flex; align-items: center; justify-content: center; }
.cir-win { background: #fff; width: 96vw; height: 92vh; display: flex; flex-direction: column; box-shadow: 0 6px 40px rgba(0,0,0,.4); }
.cir-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #ddd; }
.cir-hint { color: #889; font-size: 12px; max-width: 46vw; }
.cir-body { flex: 1; display: flex; min-height: 0; }
.cir-pal { width: 132px; overflow-y: auto; border-right: 1px solid #e3e3e3; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cir-tool { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid #dfe5ea; background: #fff; padding: 5px 4px; font-size: 11px; color: #345; cursor: pointer; }
.cir-tool.active { border-color: var(--blue); background: #eef4fb; }
.cir-canvas-wrap { flex: 1; overflow: auto; background: #fdfdfd; }
#cir-svg { width: 1600px; height: 1020px; outline: none; cursor: crosshair; }
.cir-props { width: 230px; border-left: 1px solid #e3e3e3; padding: 12px; font-size: 13px; }
.cir-props h4 { margin: 2px 0 10px; color: var(--txt-head); }
.cir-props label { display: block; margin: 8px 0 2px; color: #556; font-size: 12px; }
.cir-props input[type=text], .cir-props input:not([type]) { width: 100%; border: 1px solid #ccc; padding: 6px 8px; font-size: 13px; }
.cir-props .cp-check { display: flex; align-items: center; gap: 6px; flex-direction: row; }
.cir-props button { margin-top: 10px; display: block; width: 100%; }
.cir-p-empty { color: #99a; font-size: 12.5px; }
.cir-p-hint { color: #8a96a2; font-size: 11.5px; margin-top: 6px; }
.cir-status { border-top: 1px solid #e3e3e3; padding: 6px 16px; font-size: 12px; color: #556; min-height: 27px; }
.modal-bg.over-editor { z-index: 400; } /* Netzliste/Bode liegen ÜBER dem Schaltbild-Editor */
.bode-mode { border-bottom: 1px solid #e3e8ee; padding-bottom: 8px; margin-bottom: 8px; font-size: 13px; }
.bode-struct { font-size: 12.5px; color: #2f5a80; background: #eef4fb; padding: 7px 10px; margin-top: 8px; border-radius: 3px; }
.bode-cols { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.bode-side label { display: block; font-size: 12px; color: #556; margin: 8px 0 2px; }
.bode-side input { width: 100%; border: 1px solid #ccc; padding: 6px 8px; font-size: 13px; }
.bode-probes { max-height: 220px; overflow-y: auto; border: 1px solid #e3e8ee; padding: 8px 10px; background: #fafcff; font-size: 13px; }
.bode-probes label { margin: 4px 0; }
.bode-plot { background: #fff; border: 1px solid #e3e3e3; min-height: 380px; display: flex; align-items: center; justify-content: center; }
.bode-plot svg { max-width: 100%; height: auto; }
/* Ableseleiste unter dem Diagramm: zeigt die Kennwerte, beim Überfahren die
   Werte am Cursor. */
.bode-readout {
  min-height: 34px; padding: 8px 10px; margin-top: 6px;
  background: #f7f9fb; border: 1px solid #e3e3e3; border-radius: 4px;
  font-size: 12.5px; color: #333c48; line-height: 1.5;
}
.bode-opts { margin-top: 10px; border-top: 1px solid #e6e6e6; padding-top: 8px; }
.bode-opts .cp-check { display: block; margin: 4px 0; font-size: 12.5px; }
.cir-status .cs-dim { color: #9aa; margin-right: 10px; font-family: Consolas, monospace; }
#cir-svg { cursor: crosshair; }
#cir-svg [data-el]:hover { opacity: .8; }

/* ================= Simulation (Transient / Stationär) ================= */
.modal.sim-modal { /* .modal.sim-modal schlägt die spätere .modal-Basisregel (max-width 480px) */
  width: 96vw; max-width: 1560px; height: 92vh; max-height: 92vh;
  display: flex; flex-direction: column; padding: 18px 24px; box-sizing: border-box;
}
.sim-cols { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: stretch; flex: 1; min-height: 0; }
.sim-cols .bode-side { overflow-y: auto; min-height: 0; padding-right: 4px; }
.sim-plot { height: 100%; min-height: 0; overflow: auto; }
.sim-note {
  background: #fff7e0; border: 1px solid #ecd9a0; color: #7a5c12; border-radius: 7px;
  font-size: 13px; padding: 8px 12px; margin-bottom: 12px;
}
.sim-tab:disabled { opacity: .45; cursor: not-allowed; }
.sim-tab:disabled:hover { color: #566; background: transparent; box-shadow: none; transform: none; }
.sim-head { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.sim-tabs { display: inline-flex; background: #eef1f5; border-radius: 8px; padding: 3px; gap: 2px; }
.sim-tab {
  border: none; background: transparent; padding: 7px 16px; font-size: 13.5px; color: #566;
  border-radius: 6px; cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.sim-tab:hover { color: #123; }
.sim-tab.active { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 4px rgba(20,40,70,.14); }
.sim-plot { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; padding: 12px; }
.sim-plot > svg { flex: none; }
.sim-duo { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; justify-content: center; }
.sim-duo svg { max-width: 100%; height: auto; }
.hidden { display: none !important; }
.cp-sep { border: none; border-top: 1px solid #e3e8ee; margin: 14px 0 4px; }
.val-table td, .val-table th { padding: 5px 14px; }

/* Signalform-Umschalter (DC / AC / Sprung) — wie die Sim-Tabs, nur kompakt */
.sig-toggle { display: flex; background: #eef1f5; border-radius: 7px; padding: 3px; gap: 2px; margin: 4px 0 6px; }
.sig-toggle button {
  flex: 1; border: none; background: transparent; padding: 6px 4px; font-size: 12px; color: #566;
  border-radius: 5px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.sig-toggle button:hover { color: #123; }
.sig-toggle button.active { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgba(20,40,70,.15); }

/* Wert-Zeile (Simulationsfenster). Der modale Werte-Dialog beim Platzieren
   ist entfallen — an seine Stelle ist das Wertefenster des Labors getreten
   (.lab-card in lab.css). */
.vd-row { display: flex; align-items: stretch; gap: 6px; }
.vd-row input { flex: 1; min-width: 0; border: 1px solid #ccc; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.vd-row input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,127,194,.15); }
.vd-unit {
  display: flex; align-items: center; padding: 0 12px; background: #f2f5f8; border: 1px solid #d5dde4;
  border-radius: 6px; color: #456; font-size: 13.5px; font-family: Georgia, serif; min-width: 20px; justify-content: center;
}
.vd-row .btn-ghost { padding: 6px 10px; font-size: 12px; white-space: nowrap; }

/* Kurven zeichnen sich beim Erscheinen (nur am Bildschirm, nicht im Export) */
.sim-plot .sim-curve, .bode-plot .bode-curve {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: simdraw 0.9s ease-out forwards;
}
@keyframes simdraw { to { stroke-dashoffset: 0; } }

/* ================= Moderner Feinschliff (Editor & Dialoge) ================= */
.cir-modal { backdrop-filter: blur(3px); animation: fadein .18s ease-out; }
.modal-bg { backdrop-filter: blur(2px); animation: fadein .16s ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.cir-win { border-radius: 10px; overflow: hidden; box-shadow: 0 18px 60px rgba(10,20,40,.45); animation: popin .2s ease-out; }
.modal { border-radius: 10px; animation: popin .2s ease-out; }
@keyframes popin { from { transform: translateY(10px) scale(.985); opacity: .4; } to { transform: none; opacity: 1; } }
.cir-tool { border-radius: 7px; transition: border-color .15s ease, background .15s ease, transform .12s ease, box-shadow .15s ease; }
.cir-tool:hover { border-color: #b7c6d6; background: #f6f9fc; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(30,60,100,.08); }
.cir-tool.active { box-shadow: inset 0 0 0 1px var(--blue); }
.btn-ghost { border-radius: 6px; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.btn-ghost:hover { background: #f2f5f8; color: #345; border-color: #a9b6c2; }
.btn-blue { border-radius: 6px; transition: background .15s ease, transform .1s ease; }
.btn-blue:active { transform: scale(.97); }
.btn-outline { border-radius: 6px; }
.cir-props input, .cir-props select, .bode-side input { border-radius: 6px; transition: border-color .15s ease, box-shadow .15s ease; }
.cir-props input:focus, .bode-side input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,127,194,.15); }
.cir-props select { width: 100%; border: 1px solid #ccc; padding: 6px 8px; font-size: 13px; background: #fff; }
.bode-probes { border-radius: 7px; }
.bode-plot { border-radius: 8px; }

.auto-badge { font-size: 11.5px; padding: 4px 10px; border-radius: 12px; white-space: nowrap; font-weight: 600; }
.auto-badge.auto-full { background: #e6f5ec; color: #216b43; }
.auto-badge.auto-most { background: #eef4fb; color: #2f5a80; }
.auto-badge.auto-few { background: #fdf1e3; color: #8a5a12; }
.ai-stats { font-size: 12.5px; color: #47607a; margin-top: 5px; }

/* ================= Lückentext & Zuordnung ================= */
.cloze-text { line-height: 2.5; font-size: 15px; color: var(--txt); margin-top: 6px; }
.cz-slot { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cloze-in {
  border: none; border-bottom: 2px solid var(--blue); background: #f7fbff;
  padding: 3px 8px; font-size: 15px; font-family: inherit; color: #123;
  border-radius: 4px 4px 0 0; min-width: 70px; transition: background .15s ease, border-color .15s ease;
}
.cloze-in:focus { outline: none; background: #eaf3fc; box-shadow: 0 2px 0 0 var(--blue); }
.cloze-in.answered { background: #eef6ff; }
.cloze-in.graded-ok { border-bottom-color: #2e9e5b; background: #eaf7ef; }
.cloze-in.graded-err { border-bottom-color: #c0392b; background: #fdeeec; }
.cz-sel { padding: 3px 6px; font-size: 14px; min-width: 120px; }
.cz-corr { margin-left: 2px; }
.cz-bank { margin: 8px 0 4px; font-size: 13px; color: #667; }
.cz-chip {
  display: inline-block; background: #eef1f5; border: 1px solid #dde3ea; border-radius: 14px;
  padding: 3px 11px; margin: 2px 3px; font-size: 13px; color: #345;
}
.match-table { border-collapse: collapse; margin-top: 8px; width: 100%; max-width: 720px; }
.match-table td { padding: 6px 10px 6px 0; vertical-align: middle; }
.match-table tr + tr td { border-top: 1px solid #eef1f4; }
.mt-left { font-size: 14.5px; color: var(--txt); width: 45%; }
.mt-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-right select { min-width: 220px; }
.auto-hint { background: #eef6ff; border-color: #cfe2f5; color: #2f5a80; }

/* ---- Matrix-Felder & Mathe ---- */
.mx-wrap { display: flex; justify-content: center; margin-top: 10px; }
table.mx-table { border-collapse: collapse; border: 1.6px solid #55606c; }
table.mx-table td { border: 1px solid #8a95a1; padding: 7px 10px; text-align: center; }
table.mx-table .mx-cell { width: 86px; border: none; background: #fff; }
table.mx-table .mx-cell.graded-ok { background: #eaf6ee; }
table.mx-table .mx-cell.graded-err { background: #fdecea; }
.mx-corr { display: block; margin-top: 4px; font-size: 12px; }
.mexpr-hint { text-align: right; color: #98a2ad; font-size: 12px; margin-top: 4px; }
.radio-opt.opt-math { justify-content: center; }
.radio-opt.opt-math > span { flex: 0 1 auto; margin: 0 auto; }
.radio-opt.opt-math input { position: absolute; left: 36px; }
.radio-opt { position: relative; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20,30,45,.55); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.modal { background: #fff; max-width: 480px; width: 92%; padding: 26px 30px; box-shadow: 0 4px 30px rgba(0,0,0,.35); }
.modal h3 { margin: 0 0 10px; color: var(--txt-head); }
.modal .m-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.modal .warnline { color: #b07d00; font-size: 13.5px; }

@media (max-width: 760px) {
  .hdr-inner, .content, .section-title { padding-left: 16px; padding-right: 16px; }
  .answer-row { padding-left: 28px; }
  .codeline .cpre { width: 130px; }
}
@media print {
  .exam-top, .exam-bottom, .timerbox, .navcards { display: none !important; }
  .exam-scroll { padding: 0; }
}

/* ---------------- Kursübersicht / Footer / Mehrfachauswahl ---------------- */
.course-card { cursor: pointer; }
.course-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.course-card .meta { min-height: 96px; }

.site-footer {
  margin-top: 56px; padding: 18px 20px; border-top: 1px solid #dfe4ea;
  font-size: 12.5px; line-height: 1.65; color: #6b7683; background: #fafbfc;
}
.site-footer b { color: #3d5a77; }
.site-footer .ft-dim { color: #94a0ac; }

.multi-opt input { accent-color: #3d84c6; }
.multi-hint { font-size: 12.5px; color: #8a939d; margin: 6px 0 0 2px; font-style: italic; }

/* Formelzeile in Aufgabentexten (DGL-Ansätze o.ä.) */
.formula {
  font-family: Georgia, "Times New Roman", serif; font-size: 16px;
  text-align: center; margin: 12px 0; padding: 8px 0;
  background: #f7f9fb; border-left: 3px solid #c8d6e4;
}
/* Wertetabelle für gegebene Größen */
.given-table { border-collapse: collapse; margin: 10px 0 14px; font-size: 14px; }
.given-table td { border: 1px solid #d8dee5; padding: 5px 14px; }
.given-table td:first-child { background: #f6f8fa; color: #3d5a77; }

/* ---------------- KaTeX / Aufgabenübersicht ---------------- */
.katex { font-size: 1.08em; }
.iblock .katex-display { margin: 10px 0; }
.formula .katex-display { margin: 4px 0; }
.given-table td:nth-child(even) { font-family: KaTeX_Main, 'Times New Roman', Georgia, serif; }
.ov-table { border-collapse: collapse; width: 100%; max-width: 760px; margin: 12px 0 4px; font-size: 14.5px; }
.ov-table th { text-align: left; border-bottom: 2px solid #16283e; padding: 7px 10px; color: #16283e; }
.ov-table td { border-bottom: 1px solid #e2e6ea; padding: 7px 10px; }
.ov-table th:nth-child(2), .ov-table td:nth-child(2),
.ov-table th:nth-child(3), .ov-table td:nth-child(3) { text-align: center; }
.ov-table td:nth-child(3) { font-family: KaTeX_Main, 'Times New Roman', serif; }
.ov-head { font-size: 17px; color: #222; border-bottom: 1px solid #e4e7ea; padding-bottom: 10px; margin: 4px 0 12px; }
