/* ==========================================================================
   Tiva Lernwerkstatt – Beispielseite (Lernseite + Lehrkräfte-Paket)
   Baut auf tiva.css auf und nutzt dessen Tokens.
   ========================================================================== */

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--tiva-ink-soft); font-weight: 400; }
.demo-flag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--tiva-gold-soft); color: #7a4f00; border-radius: var(--radius-pill); padding: 3px 10px; margin-right: 6px; vertical-align: 1px;
}
.btn-sm { padding: 9px 16px; font-size: 14.5px; }
.section--flush-bottom { padding-bottom: 0; }
.section--flush-bottom + .section { padding-top: var(--section); }
.h-sub { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; margin-bottom: 16px; }

.section-head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-head--row > div:first-child { max-width: 760px; }

/* ---------- Hero-Paketkarte ---------- */

.package-card { min-width: 0; }
.package-card .quote { font-size: 19px; }
.package-facts { margin: 0 0 16px; display: grid; gap: 8px; }
.package-facts div { display: grid; grid-template-columns: 116px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.4; }
.package-facts dt { color: var(--tiva-ink-soft); font-weight: 700; }
.package-facts dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Paket-Übersicht ---------- */

.plugin-flow { display: grid; grid-template-columns: 260px auto 1fr; gap: 20px; align-items: center; }
.plugin-input { background: var(--tiva-ink); color: #f2f0ea; border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow-lift); }
.plugin-input-title { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tiva-aqua); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.plugin-input-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tiva-signal-gold); }
.plugin-input dl { margin: 0; display: grid; gap: 10px; }
.plugin-input dl div { display: grid; gap: 2px; }
.plugin-input dt { font-size: 13px; color: #b9cfd2; }
.plugin-input dd { margin: 0; font-weight: 700; background: rgba(255, 255, 255, .08); border: 1px solid rgba(143, 216, 210, .25); border-radius: 10px; padding: 8px 12px; }
.plugin-arrow { font-size: 34px; font-weight: 700; color: var(--tiva-signal-gold); }
.package-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.package-grid li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.package-grid a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none;
  background: var(--tiva-warm-bg); border: 1px solid var(--tiva-line); border-radius: 16px; padding: 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.package-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: rgba(14, 110, 115, .25); }
.pg-num { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--tiva-turquoise-text); margin-bottom: 10px; }
.package-grid h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.01em; }
.package-grid p { font-size: 15px; color: var(--tiva-ink-soft); margin: 0 0 14px; }
.pg-relief { margin-top: auto; font-size: 13.5px; font-weight: 700; color: var(--tiva-petrol); padding-top: 12px; border-top: 1px dashed var(--tiva-line); }

/* ---------- Lösungs-Schalter ---------- */

.solution-toggle { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.solution-toggle small { font-size: 13px; color: var(--tiva-ink-soft); }
.switch {
  display: inline-flex; align-items: center; gap: 12px; font: inherit; font-weight: 700; font-size: 15.5px; color: var(--tiva-ink);
  background: var(--tiva-surface); border: 1.5px solid var(--tiva-line); border-radius: var(--radius-pill); padding: 8px 18px 8px 10px; cursor: pointer;
}
.switch-track { width: 44px; height: 26px; border-radius: 13px; background: var(--tiva-line); position: relative; transition: background-color .2s ease; flex: none; }
.switch-thumb { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 36, 51, .3); transition: transform .2s ease; }
.switch[aria-checked="true"] { border-color: var(--tiva-petrol); }
.switch[aria-checked="true"] .switch-track { background: var(--tiva-petrol); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(18px); background: var(--tiva-signal-gold); }

/* Lösungen: nur in der Lehrkräfte-Ansicht */
.sol { display: none; }
.show-solutions .sol { display: block; }
.show-solutions .gap .sol { display: inline-block; }
.sol, .sol-block {
  font-size: 14.5px; line-height: 1.5; color: #5b3d00;
  background: var(--tiva-gold-soft); border-left: 3px solid var(--tiva-signal-gold); border-radius: 0 10px 10px 0; padding: 10px 14px; margin-top: 12px;
}
.sol-banner { margin: 0 0 20px; font-weight: 700; }
.sol-block p { margin: 0 0 6px; }
.sol-block p:last-child { margin: 0; }
.sol-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sol-cards { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.sol-cards dt { font-weight: 700; }
.sol-cards dd { margin: 0; }

/* ---------- Geräterahmen + Lernseite ---------- */

.device { background: #fff; border: 1px solid var(--tiva-line); border-radius: 22px; box-shadow: var(--shadow-lift); overflow: hidden; }
.device-bar { display: flex; align-items: center; gap: 7px; padding: 12px 18px; background: var(--tiva-warm-bg); border-bottom: 1px solid var(--tiva-line); }
.device-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tiva-line); }
.device-url { margin-left: 12px; font-size: 13px; color: var(--tiva-ink-soft); background: #fff; border: 1px solid var(--tiva-line); border-radius: var(--radius-pill); padding: 4px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.ls { max-width: 860px; margin-inline: auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px) clamp(32px, 5vw, 56px); }
.ls-head { margin-bottom: 8px; }
.ls-kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tiva-teal); margin-bottom: 8px; }
.ls-title { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.03em; margin-bottom: 14px; }
.ls-intro { color: var(--tiva-ink-soft); font-size: 17px; max-width: 62ch; }
.ls-progress { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; }
.ls-progress-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--tiva-mist-soft); overflow: hidden; }
.ls-progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--tiva-petrol), var(--tiva-turquoise)); border-radius: 4px; transition: width .4s ease; }
.ls-progress-text { margin: 0; font-size: 14px; font-weight: 700; color: var(--tiva-ink-soft); white-space: nowrap; }
.ls-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-steps a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--tiva-ink-soft);
  border: 1px solid var(--tiva-line); border-radius: var(--radius-pill); padding: 6px 14px 6px 6px; background: var(--tiva-surface);
}
.ls-steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--tiva-aqua-mist); color: var(--tiva-petrol); font-size: 12.5px; }
.ls-steps a.is-done { color: var(--tiva-ink); border-color: var(--tiva-petrol); }
.ls-steps a.is-done b { background: var(--tiva-petrol); color: #fff; font-size: 0; }
.ls-steps a.is-done b::after { content: "✓"; font-size: 13px; }

.ls-block { padding-top: 36px; margin-top: 36px; border-top: 1px solid var(--tiva-line); scroll-margin-top: 96px; }
.ls-block h4 { font-size: 22px; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ls-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tiva-ink); color: #fff; font-size: 15px; flex: none; }
.ls-task { color: var(--tiva-ink-soft); margin-bottom: 18px; }

/* Grafik */
.plant { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.plant-svg { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--tiva-line); }
.plant-svg .sky { fill: #eef7f6; transition: fill .6s ease; }
.plant-svg .sun, .plant-svg .moon, .plant-svg .flow, .plant-svg .flow-day { transition: opacity .6s ease; }
.plant-svg .moon { opacity: 0; }
.plant-svg .moon-cut { fill: #1d3a4d; }
.plant-svg .flow-night { opacity: 0; }
.plant-svg .leaf { transition: filter .6s ease; }
.plant-svg.is-night .sky { fill: #1d3a4d; }
.plant-svg.is-night .sun, .plant-svg.is-night .flow-day { opacity: 0; }
.plant-svg.is-night .moon, .plant-svg.is-night .flow-night { opacity: 1; }
.plant-svg.is-night .leaf { filter: brightness(.7); }
.plant-svg.is-night .labels text:nth-child(2) { fill: #8fd8d2; }
.plant-svg.is-night .labels text:nth-child(1) { fill: #c7d3da; }
.plant-svg.is-night .flow-night .particle[fill="#4f5d66"] { fill: #c7d3da; }
.plant-svg.is-night .flow-night circle[stroke] { stroke: #8fd8d2; }
.plant-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.daynight { display: inline-flex; gap: 4px; padding: 4px; background: var(--tiva-warm-bg); border: 1px solid var(--tiva-line); border-radius: var(--radius-pill); }
.daynight button, .play-btn { font: inherit; font-size: 14px; font-weight: 700; color: var(--tiva-ink-soft); background: none; border: 0; padding: 7px 14px; border-radius: var(--radius-pill); cursor: pointer; }
.daynight button[aria-pressed="true"] { background: var(--tiva-ink); color: #fff; }
.play-btn { border: 1.5px solid var(--tiva-line); background: var(--tiva-surface); }
.plant-caption { font-size: 14.5px; color: var(--tiva-ink); background: var(--tiva-mist-soft); border-radius: 10px; padding: 10px 14px; margin: 10px 0 8px; }
.plant-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; font-weight: 700; color: var(--tiva-ink-soft); }
.plant-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.lg--co2 { background: #4f5d66; }
.lg--water { background: #3b82c4; }
.lg--o2 { border: 2.5px solid #0b7d78; }
.lg--sugar { background: #ffc23a; border: 1.5px solid #c99500; border-radius: 3px; }
.hs { cursor: pointer; }
.hs circle { fill: var(--tiva-ink); stroke: #fff; stroke-width: 3; transition: fill .15s ease; }
.hs text { fill: #fff; font: 700 14px "DM Sans", sans-serif; text-anchor: middle; pointer-events: none; }
.hs:hover circle, .hs:focus-visible circle { fill: var(--tiva-petrol); }
.hs:focus { outline: none; }
.hs:focus-visible circle { stroke: var(--tiva-signal-gold); stroke-width: 4; }
.hs.is-seen circle { fill: var(--tiva-petrol); }
.hs.is-active circle { fill: var(--tiva-signal-gold); }
.hs.is-active text { fill: var(--tiva-ink); }
@media (prefers-reduced-motion: no-preference) {
  .hs:not(.is-seen) circle { animation: hs-pulse 2.2s ease-in-out infinite; }
}
@keyframes hs-pulse { 0%, 100% { stroke-width: 3; } 50% { stroke-width: 7; } }

.hs-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hs-list button {
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--tiva-ink-soft); cursor: pointer;
  background: var(--tiva-warm-bg); border: 1.5px solid var(--tiva-line); border-radius: var(--radius-pill); padding: 6px 12px;
}
.hs-list button.is-seen { color: var(--tiva-petrol); border-color: rgba(14, 110, 115, .35); }
.hs-list button[aria-pressed="true"] { background: var(--tiva-ink); border-color: var(--tiva-ink); color: #fff; }
.hs-panel { background: var(--tiva-mist-soft); border-radius: 14px; padding: 18px 20px; min-height: 150px; }
.hs-panel-kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tiva-turquoise-text); margin: 0 0 4px; }
.hs-panel-title { font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.hs-panel-text { margin: 0; font-size: 15.5px; color: var(--tiva-ink); }
.hs-count { font-size: 14px; font-weight: 700; color: var(--tiva-ink-soft); margin: 10px 0 0; }

/* Karteikarten */
.flash { max-width: 560px; }
.flash-card { position: relative; height: 210px; perspective: 1200px; cursor: pointer; border-radius: 18px; }
.flash-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 24px 28px; border-radius: 18px; border: 1px solid var(--tiva-line); box-shadow: var(--shadow-card);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.flash-front { background: var(--tiva-surface); }
.flash-front p { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.flash-back { background: var(--tiva-ink); color: #f2f0ea; transform: rotateY(180deg); }
.flash-back p { font-size: 17px; margin: 0; line-height: 1.5; }
.flash-label { position: absolute; top: 14px; left: 18px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tiva-teal); }
.flash-back .flash-label { color: var(--tiva-aqua); }
.flash-card.is-flipped .flash-front { transform: rotateY(-180deg); }
.flash-card.is-flipped .flash-back { transform: rotateY(0); }
.flash-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.flash-status { font-size: 14px; font-weight: 700; color: var(--tiva-ink-soft); margin: 10px 0 0; }

/* Quiz */
.quiz { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: q; }
.quiz-item { counter-increment: q; }
.quiz-q { font-weight: 700; font-size: 17.5px; margin-bottom: 10px; }
.quiz-q::before { content: counter(q) ". "; color: var(--tiva-teal); }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; font-size: 15.5px; line-height: 1.35; color: var(--tiva-ink);
  background: var(--tiva-warm-bg); border: 1.5px solid var(--tiva-line); border-radius: 12px; padding: 12px 14px; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.quiz-option b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: #fff; border: 1px solid var(--tiva-line); font-size: 13px; color: var(--tiva-ink-soft); }
.quiz-option:hover:not(:disabled) { border-color: rgba(14, 110, 115, .4); }
.quiz-option:disabled { cursor: default; }
.quiz-option.is-right { background: #e5f4ea; border-color: #2f8f5b; }
.quiz-option.is-right b { background: #2f8f5b; border-color: #2f8f5b; color: #fff; }
.quiz-option.is-wrong { background: #fbe9e5; border-color: #c4513f; }
.quiz-option.is-wrong b { background: #c4513f; border-color: #c4513f; color: #fff; }
.show-solutions .quiz-option[data-correct] { box-shadow: inset 0 0 0 2px var(--tiva-signal-gold); }
.quiz-feedback { margin: 10px 0 0; font-size: 15px; padding: 10px 14px; border-radius: 10px; }
.quiz-feedback:empty { display: none; }
.quiz-feedback.is-right { background: #e5f4ea; color: #1d5a39; }
.quiz-feedback.is-wrong { background: #fbe9e5; color: #8a2f20; }
.quiz-score { font-weight: 700; color: var(--tiva-petrol); margin: 18px 0 0; }
.quiz-score:empty { display: none; }

/* Lückentext */
.wordbank { margin-bottom: 16px; }
.wordbank summary { cursor: pointer; font-weight: 700; font-size: 15px; color: var(--tiva-petrol); }
.wordbank p { margin: 8px 0 0; font-weight: 700; background: var(--tiva-warm-bg); border: 1px dashed var(--tiva-line); border-radius: 10px; padding: 10px 14px; }
.gaps > p { font-size: 17.5px; line-height: 2.4; }
.gap { display: inline-flex; flex-direction: column; vertical-align: top; }
.gap input {
  font: inherit; font-weight: 700; font-size: 16px; width: 10.5em; max-width: 60vw; padding: 2px 10px; color: var(--tiva-ink);
  border: 0; border-bottom: 2px solid var(--tiva-teal); border-radius: 6px 6px 0 0; background: var(--tiva-mist-soft);
}
.gap input:focus { outline: none; background: #fff; box-shadow: 0 0 0 3px var(--tiva-signal-gold); }
.gap input.is-right { border-bottom-color: #2f8f5b; background: #e5f4ea; }
.gap input.is-wrong { border-bottom-color: #c4513f; background: #fbe9e5; }
.gap .sol { margin: 4px 0 0; padding: 0 8px; line-height: 1.6; font-size: 13.5px; font-weight: 700; border-left-width: 2px; }
.equation {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin: 6px 0 18px;
  background: var(--tiva-ink); color: #fff; border-radius: 14px; padding: 16px 20px; font-weight: 700; font-size: 17px; text-align: center;
}
.eq-arrow { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; color: var(--tiva-signal-gold); font-size: 22px; }
.eq-arrow small { font-size: 12px; color: var(--tiva-aqua); letter-spacing: .04em; }
.gaps-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gaps-result { margin: 12px 0 0; font-weight: 700; color: var(--tiva-petrol); }
.gaps-result:empty { display: none; }

/* Lernkarte */
.lernkarte { display: grid; gap: 14px; max-width: 620px; }
.lernkarte > label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.lernkarte input:not([type="radio"]), .lernkarte textarea {
  font: inherit; font-weight: 400; font-size: 16px; color: var(--tiva-ink); resize: vertical;
  border: 1.5px solid var(--tiva-line); border-radius: 12px; padding: 10px 14px; background: var(--tiva-surface);
}
.lernkarte input:focus, .lernkarte textarea:focus { outline: none; border-color: var(--tiva-petrol); box-shadow: 0 0 0 3px rgba(255, 194, 58, .55); }
.rating { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rating legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.rating label { cursor: pointer; }
.rating input { position: absolute; opacity: 0; }
.r { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; border: 1.5px solid var(--tiva-line); border-radius: var(--radius-pill); padding: 7px 14px; background: var(--tiva-surface); }
.r::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--r-color); }
.r--green { --r-color: #2f8f5b; }
.r--gold { --r-color: #e0a400; }
.r--red { --r-color: #c4513f; }
.rating input:checked + .r { background: var(--r-color); border-color: var(--r-color); color: #fff; }
.rating input:checked + .r::before { background: #fff; }
.rating input:focus-visible + .r { outline: 3px solid var(--tiva-signal-gold); outline-offset: 2px; }
.ls-privacy { font-size: 13.5px; color: var(--tiva-ink-soft); margin: 0; }

/* ---------- Papier (Lösungsblatt, Arbeitsblatt) ---------- */

.paper { background: #fff; border: 1px solid var(--tiva-line); border-radius: 6px; box-shadow: var(--shadow-card); padding: clamp(22px, 4vw, 48px); max-width: 900px; }
.paper-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--tiva-ink-soft); border-bottom: 2px solid var(--tiva-petrol); padding-bottom: 10px; margin-bottom: 22px; }
.paper h3 { font-size: 18px; margin: 26px 0 10px; }
.paper h3:first-of-type { margin-top: 0; }
.sol-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sol-table th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--tiva-ink-soft); border-bottom: 1px solid var(--tiva-line); padding: 8px 10px; }
.sol-table td { border-bottom: 1px solid var(--tiva-line); padding: 10px; vertical-align: top; }
.sol-table td:first-child { font-weight: 700; color: var(--tiva-petrol); width: 3.5em; }
.sol-table td:nth-child(2) { font-weight: 700; }
.ws-line { font-size: 16px; line-height: 2.2; }
.ws-arrow { white-space: nowrap; color: var(--tiva-petrol); font-weight: 700; }
.ws-choices { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.ws-lines { display: grid; gap: 28px; margin: 18px 0 12px; }
.ws-lines span { border-bottom: 1px solid #b9b1a2; }

/* ---------- Stundenverlauf ---------- */

/* Druckknöpfe: gleich breit nebeneinander, auf dem Handy gleich breit untereinander */
.print-actions { display: grid; grid-template-columns: repeat(2, 244px); gap: 10px; align-items: stretch; }
.print-actions .btn { justify-content: center; text-align: center; white-space: nowrap; }
.print-actions small { grid-column: 1 / -1; text-align: left; font-size: 13px; color: var(--tiva-ink-soft); }
.paper--wide { max-width: none; }
.plan-top { display: grid; grid-template-columns: 1fr 190px; gap: 28px; align-items: start; margin-bottom: 24px; }
.plan-meta { margin: 0; display: grid; gap: 8px; }
.plan-meta div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 15px; }
.plan-meta dt { font-weight: 700; color: var(--tiva-ink-soft); }
.plan-meta dd { margin: 0; }
.plan-qr { margin: 0; text-align: center; }
.plan-qr .qr { max-width: 150px; margin: 0 auto 8px; border: 1px solid var(--tiva-line); }
.plan-qr figcaption { font-size: 12.5px; line-height: 1.45; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.plan-table th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--tiva-ink-soft); border-bottom: 2px solid var(--tiva-line); padding: 8px 10px; }
.plan-table td { border-bottom: 1px solid var(--tiva-line); padding: 12px 10px; vertical-align: top; }
.plan-table td:first-child { font-weight: 700; color: var(--tiva-petrol); white-space: nowrap; }
.plan-table td:nth-child(2) { white-space: nowrap; }
.plan-table td:nth-child(4), .plan-table td:nth-child(5) { color: var(--tiva-ink-soft); font-size: 14px; }
.fv-ref { display: inline-block; font-size: 11.5px; font-weight: 700; color: #7a4f00; background: var(--tiva-gold-soft); border-radius: var(--radius-pill); padding: 1px 8px; white-space: nowrap; }
.fv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.fv-list li { font-size: 14.5px; background: var(--tiva-warm-bg); border-radius: 10px; padding: 10px 14px; color: var(--tiva-ink-soft); }
.fv-list strong { color: var(--tiva-ink); }
.plan-tip { margin-top: 20px; border-left: 3px solid var(--tiva-signal-gold); padding: 4px 0 4px 16px; }
.plan-tip h3 { margin: 0 0 4px; font-size: 16px; }
.plan-tip p { margin: 0; font-size: 14.5px; color: var(--tiva-ink-soft); }

/* ---------- Tafelbild ---------- */

/* Am Bildschirm als Kreidetafel, im Druck hell (Farben über Variablen umgeschaltet) */
.board {
  --b-bg: #1f3b36; --b-chalk: #f3f1e8; --b-soft: #c5d3cf; --b-yellow: #ffd56e; --b-blue: #9ccfff;
  --b-grey: #d3dadc; --b-teal: #8fd8d2; --b-green: #a6e3b8; --b-line: rgba(243, 241, 232, .22);
  margin: 0; color: var(--b-chalk);
  background: radial-gradient(120% 120% at 20% 0%, #27483f 0%, var(--b-bg) 60%);
  border: 12px solid #8a6a3c; border-radius: 16px; padding: clamp(18px, 3vw, 34px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), var(--shadow-lift);
}
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; border-bottom: 2px solid var(--b-line); padding-bottom: 12px; margin-bottom: 20px; }
.board-head h3 { font-size: clamp(20px, 2.4vw, 28px); color: var(--b-chalk); }
.board-date { font-size: 14px; color: var(--b-soft); }
.board-grid { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: clamp(16px, 2.6vw, 32px); }
.board-col { min-width: 0; }
.board-col--center { border-inline: 2px dashed var(--b-line); padding-inline: clamp(12px, 2vw, 24px); }
.board-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--b-soft); margin: 0 0 10px; }
.step-mark { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--tiva-signal-gold); color: var(--tiva-ink); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.board-q { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 0 0 14px; }
.board-label { font-size: 14px; color: var(--b-soft); margin: 0 0 6px; text-decoration: underline; text-underline-offset: 4px; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15.5px; line-height: 1.4; }
.board-list small { color: var(--b-soft); }
.board-list--merke li { padding-left: 16px; position: relative; }
.board-list--merke li::before { content: "–"; position: absolute; left: 0; color: var(--b-soft); }
.b-mark { display: inline-block; width: 18px; font-weight: 700; }
.b-mark--no { color: #ff9b8a; }
.b-mark--part { color: var(--b-yellow); }
.b-mark--yes { color: var(--b-green); }
.board-hint { font-size: 13px; font-style: italic; color: var(--b-soft); margin: 14px 0 0; }
.board-sketch { width: 100%; height: auto; display: block; margin-bottom: 12px; }
.board-sketch .b-green { stroke: var(--b-green); }
.board-sketch .b-yellow { stroke: var(--b-yellow); }
.board-sketch .b-grey { stroke: var(--b-grey); }
.board-sketch .b-blue { stroke: var(--b-blue); }
.board-sketch .b-teal { stroke: var(--b-teal); }
.board-sketch .b-fill-chalk { fill: var(--b-chalk); }
.board-sketch .b-t { font: 700 15px "DM Sans", sans-serif; }
.board-sketch .b-small { font: 400 12px "DM Sans", sans-serif; fill: var(--b-soft); }
.b-yellow-t { color: var(--b-yellow); fill: var(--b-yellow); }
.b-grey-t { color: var(--b-grey); fill: var(--b-grey); }
.b-blue-t { color: var(--b-blue); fill: var(--b-blue); }
.b-teal-t { color: var(--b-teal); fill: var(--b-teal); }
.b-chalk-t { fill: var(--b-chalk); }
.board-eq { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center; font-weight: 700; font-size: 16px; border: 2px solid var(--b-chalk); border-radius: 10px; padding: 10px 12px; }
.board-eq-arrow { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 20px; }
.board-eq-arrow small { font-size: 11.5px; font-weight: 400; }
.board-foot { margin: 22px 0 0; padding-top: 14px; border-top: 2px solid var(--b-line); font-size: 15.5px; display: flex; gap: 10px; align-items: flex-start; }
.board-tips { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.board-tips li { font-size: 14.5px; color: var(--tiva-ink-soft); background: var(--tiva-warm-bg); border-left: 3px solid var(--tiva-signal-gold); border-radius: 0 10px 10px 0; padding: 10px 14px; }
.board-tips strong { color: var(--tiva-ink); }

/* ---------- Differenzierung ---------- */

.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.diff-grid h3 { font-size: 21px; margin-bottom: 14px; }
.diff-grid .check-list li { font-size: 15px; }
/* Ziel-Kasten in allen drei Stufen unten bündig */
.diff-grid .signal-card { display: flex; flex-direction: column; }
.diff-grid .check-list { margin-bottom: 18px; }
.diff-grid .takeaway { margin-top: auto; }

/* ---------- Erwartungshorizont ---------- */

.task-card { background: var(--tiva-surface); border: 1px solid var(--tiva-line); border-radius: var(--radius-card); padding: 24px 26px; box-shadow: var(--shadow-card); }
.task-card p { color: var(--tiva-ink) !important; font-size: 16px; }
.task-card p:last-child { margin-bottom: 0; }
.task-kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tiva-teal); margin-bottom: 12px; }
.afb { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--tiva-petrol); background: var(--tiva-aqua-mist); border-radius: var(--radius-pill); padding: 1px 8px; margin-left: 4px; white-space: nowrap; }
.rubric { width: 100%; border-collapse: collapse; background: var(--tiva-surface); border: 1px solid var(--tiva-line); border-radius: 14px; overflow: hidden; font-size: 15px; }
.rubric th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--tiva-ink-soft); padding: 12px 16px; border-bottom: 1px solid var(--tiva-line); }
.rubric td { padding: 12px 16px; border-bottom: 1px solid var(--tiva-line); vertical-align: top; }
.rubric td:last-child, .rubric th:last-child { text-align: center; width: 72px; font-weight: 700; }
.rubric tfoot td { font-weight: 700; background: var(--tiva-mist-soft); border-bottom: 0; }
.model-answer { margin-top: 14px; border: 1px solid var(--tiva-line); border-radius: 14px; background: var(--tiva-surface); padding: 0 18px; }
.model-answer summary { cursor: pointer; font-weight: 700; padding: 14px 0; color: var(--tiva-petrol); }
.model-answer p { font-size: 15.5px; }

.start-steps--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Responsiv ---------- */

@media screen and (max-width: 1020px) {
  .plugin-flow { grid-template-columns: 1fr; }
  .plugin-input { max-width: 420px; }
  .plugin-input dl { grid-template-columns: 1fr 1fr; }
  .plugin-arrow { transform: rotate(90deg); justify-self: start; margin-left: 40px; line-height: 1; }
  .package-grid { grid-template-columns: 1fr 1fr; }
  .package-grid li:last-child:nth-child(3n+1) { grid-column: auto; }
  .package-grid li:last-child:nth-child(2n+1) { grid-column: 1 / -1; }
  .board-grid { grid-template-columns: 1fr; }
  .board-col--center { border-inline: 0; border-block: 2px dashed var(--b-line); padding: 18px 0; }
  .board-tips { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .start-steps--4 { grid-template-columns: 1fr 1fr; }
  .fv-list { grid-template-columns: 1fr; }
}
@media screen and (max-width: 760px) {
  .plant { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .plan-top { grid-template-columns: minmax(0, 1fr); }
  .plan-qr figcaption { min-width: 0; }
  .plan-qr figcaption .nowrap { white-space: normal; overflow-wrap: anywhere; }
  .plan-qr { display: grid; grid-template-columns: 120px 1fr; gap: 14px; text-align: left; align-items: center; }
  .plan-qr .qr { margin: 0; }
  .plan-meta div { grid-template-columns: 1fr; gap: 0; }
  /* Verlaufsplan als Karten statt Tabelle */
  .plan-table thead { display: none; }
  .plan-table, .plan-table tbody, .plan-table tr, .plan-table td { display: block; }
  .plan-table tr { border: 1px solid var(--tiva-line); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; }
  .plan-table td { border: 0; padding: 4px 0; white-space: normal !important; }
  .plan-table td::before { content: attr(data-label) ": "; font-weight: 700; color: var(--tiva-ink-soft); font-size: 12.5px; }
  .plan-table td:nth-child(-n+3)::before { content: none; }
  .solution-toggle { align-items: flex-start; }
}
@media screen and (max-width: 640px) {
  .print-actions { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .package-grid, .start-steps--4 { grid-template-columns: 1fr; }
  .package-facts div { grid-template-columns: 1fr; gap: 0; }
  .page-hero .package-card { transform: none; max-width: none; }
  .plugin-input dl { grid-template-columns: 1fr; }
  .ws-choices { grid-template-columns: 1fr; }
  .sol-cards { grid-template-columns: 1fr; gap: 2px; }
  .sol-cards dd { margin-bottom: 8px; }
  .ls-progress { flex-wrap: wrap; }
  .flash-front p { font-size: 22px; }
  .flash-card { height: 230px; }
  .sol-table { font-size: 13.5px; }
  .sol-table th:nth-child(3), .sol-table td:nth-child(3) { display: none; }
}

/* ---------- Druck ---------- */

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 10.5pt; }
  .site-header, .site-footer, .skip-link, .no-print, .cta-band, .solution-toggle { display: none !important; }
  .section { padding: 18pt 0; }
  .paper, .device, .signal-card, .task-card, .plugin-input { box-shadow: none; }
  .paper { border: 0; padding: 0; max-width: none; }
  details:not([open]) > :not(summary) { display: block; }
  .plant-svg .flow { display: none; }
  /* Gezielter Druck: nur die gewählten Blätter, jedes auf eigener Seite */
  body[data-print-target] main { display: flex; flex-direction: column; }
  body[data-print-target] main > section { display: none; }
  body[data-print-target="verlauf"] main > #verlauf,
  body[data-print-target="arbeitsblatt"] main > #arbeitsblatt,
  body[data-print-target="loesungen"] main > #loesungen,
  body[data-print-target="tafelbild"] main > #tafelbild { display: block; padding: 0; background: none; border: 0; }
  body[data-print-target="tafelbild"] .board-tips { display: none; }
  .board {
    --b-chalk: #0f2433; --b-soft: #4f5d66; --b-yellow: #a86f00; --b-blue: #2c6aa6; --b-grey: #4f5d66;
    --b-teal: #0b7d78; --b-green: #2f8f5b; --b-line: #cfc6b5;
    background: #fff; border: 2px solid #0f2433; border-radius: 6px; box-shadow: none; padding: 8mm;
  }
  .board-q { font-size: 14pt; }
  .board-list, .board-foot { font-size: 11pt; }
  .board .b-mark--no { color: #b3402e; }
  /* Tafelbild füllt die Querformat-Seite (A4 quer abzüglich Rand) */
  body[data-print-target="tafelbild"] .board { min-height: 186mm; display: flex; flex-direction: column; padding: 9mm 11mm; }
  body[data-print-target="tafelbild"] .board-grid { flex: 1; align-items: start; }
  body[data-print-target="tafelbild"] .board-head h3 { font-size: 22pt; }
  body[data-print-target="tafelbild"] .board-date { font-size: 11pt; }
  body[data-print-target="tafelbild"] .board-step { font-size: 10pt; }
  body[data-print-target="tafelbild"] .board-q { font-size: 17pt; }
  body[data-print-target="tafelbild"] .board-list { font-size: 13.5pt; gap: 7pt; }
  body[data-print-target="tafelbild"] .board-eq { font-size: 13.5pt; }
  body[data-print-target="tafelbild"] .board-hint { font-size: 10pt; }
  body[data-print-target="tafelbild"] .board-foot { font-size: 13pt; }
  body[data-print-target="paket"] main > #arbeitsblatt,
  body[data-print-target="paket"] main > #loesungen { display: block; padding: 0; background: none; border: 0; }
  body[data-print-target="paket"] main > #arbeitsblatt { order: 1; }
  body[data-print-target="paket"] main > #loesungen { order: 2; break-before: page; }
  body[data-print-target] .section-head { display: none; }
  body[data-print-target] .wrap { width: 100%; }
  .plan-table tr, .fv-list li, .sol-table tr { break-inside: avoid; }
  .paper h3 { break-after: avoid; }
  /* Stundenverlauf kompakt: eine A4-Seite */
  #verlauf .paper-head { margin-bottom: 10pt; }
  .plan-top { grid-template-columns: 1fr 34mm; gap: 8mm; margin-bottom: 8pt; }
  .plan-meta { gap: 3pt; }
  .plan-meta div { grid-template-columns: 26mm 1fr; font-size: 9pt; }
  .plan-qr .qr { max-width: 30mm; }
  .plan-qr figcaption { font-size: 7.5pt; }
  .plan-table { font-size: 8.8pt; }
  .plan-table th { padding: 4pt 5pt; font-size: 7pt; }
  .plan-table td { padding: 5pt; }
  .plan-table td:nth-child(4), .plan-table td:nth-child(5) { font-size: 8.3pt; }
  #verlauf .paper h3 { font-size: 11pt; margin: 10pt 0 5pt; }
  .fv-list { grid-template-columns: 1fr 1fr; gap: 4pt 8pt; }
  .fv-list li { font-size: 8.5pt; padding: 5pt 7pt; }
  .plan-tip { margin-top: 8pt; }
  .plan-tip h3 { font-size: 10pt !important; margin: 0 0 2pt !important; }
  .plan-tip p { font-size: 8.5pt; }
  /* Querformat: Fehlvorstellungen in einer Reihe, damit alles auf eine Seite passt */
  body[data-print-target="verlauf"] .fv-list { grid-template-columns: repeat(4, 1fr); }
  body[data-print-target="verlauf"] .plan-table td { padding: 4pt 5pt; }
  body[data-print-target="verlauf"] .plan-qr .qr { max-width: 24mm; }
  body[data-print-target="verlauf"] .plan-top { grid-template-columns: 1fr 40mm; margin-bottom: 4pt; }
  .sol-table th:nth-child(3), .sol-table td:nth-child(3) { display: table-cell !important; }
}
