/* ============================================================
   Quantenstation · 60 Jahre JKU
   Darstellung der Quizze und der Rätsel der zweiten Katze.
   Ergänzt quantum.css — dieses muss vorher eingebunden sein.
   ============================================================ */

/* ---------- Übersicht: Kopfzeile einer Stufe ---------- */
.quiz-lvl-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-lvl-icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.quiz-lvl-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

/* ---------- Kopfzeile über der Frage ---------- */
.quiz-qnum {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.quiz-q {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.28;
  font-weight: 700;
  margin: 0 0 14px;
}

/* Angabe-Block: Formeln und Konstanten */
.quiz-given {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  background: rgba(31, 91, 255, .07);
  border-left: 3px solid rgba(31, 91, 255, .45);
  border-radius: 0 8px 8px 0;
  padding: 9px 11px;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}

/* ---------- Antwortknöpfe ---------- */
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt {
  display: block;
  width: 100%;
  min-height: 48px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s, opacity .15s;
}
.quiz-opt:hover:not(:disabled) { border-color: rgba(31, 91, 255, .45); }
.quiz-opt:active:not(:disabled) { transform: scale(.985); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.is-right {
  border-color: var(--green);
  background: rgba(31, 138, 91, .10);
  opacity: 1;
}
.quiz-opt.is-wrong {
  border-color: rgba(192, 57, 43, .5);
  background: rgba(192, 57, 43, .07);
  color: var(--muted);
  text-decoration: line-through;
}
.quiz-opt:disabled:not(.is-right):not(.is-wrong) { opacity: .45; }

/* ---------- Zahleneingabe ---------- */
.quiz-numrow { display: flex; align-items: center; gap: 10px; }
.q-input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 2px solid var(--line);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
}
.q-input:focus { outline: none; border-color: var(--blue); }
.q-input.is-right { border-color: var(--green); background: rgba(31, 138, 91, .08); }
.quiz-unit {
  flex: none;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- Rückmeldung ---------- */
.quiz-fb {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  border: 1.5px solid;
  font-size: 14.5px;
  line-height: 1.5;
}
.quiz-fb.is-good {
  background: rgba(31, 138, 91, .09);
  border-color: rgba(31, 138, 91, .35);
}
.quiz-fb.is-bad {
  background: rgba(192, 57, 43, .07);
  border-color: rgba(192, 57, 43, .3);
}
.quiz-fb-head {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.quiz-fb.is-good .quiz-fb-head { color: var(--green); }
.quiz-fb.is-bad  .quiz-fb-head { color: var(--danger); }
.quiz-fb-body { color: var(--muted); }
.quiz-fb-body strong, .quiz-fb-body em { color: var(--ink); }

/* ---------- Auswertung ---------- */
.quiz-stars {
  font-size: 34px;
  letter-spacing: .12em;
  color: var(--amber);
  line-height: 1.2;
}

/* ---------- Fortschritt oben ---------- */
.quiz-progress { display: flex; align-items: center; gap: 10px; }
.quiz-progress .q-meter { flex: 1; }
.quiz-step {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  white-space: nowrap;
}

[data-quiz-stage]:focus { outline: none; }

/* ---------- Theorieseite: Formelkasten ---------- */
.quiz-formel {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.quiz-formel-eq {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
/* Eine Formel bleibt zusammen. Passt sie nicht, darf der Kasten
   waagrecht scrollen — lieber das als ein abgetrenntes Hochzeichen. */
.quiz-formel-eq .nb { white-space: nowrap; }
.quiz-formel { overflow-x: auto; }
@media (max-width: 380px) {
  .quiz-formel-eq { font-size: 16.5px; }
}
.quiz-formel-note {
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* Rechenbeispiel Schritt für Schritt */
.quiz-steps { counter-reset: qs; margin-top: 12px; }
.quiz-steps > li {
  list-style: none;
  position: relative;
  padding-left: 34px;
  font-size: 15px;
  line-height: 1.5;
}
.quiz-steps > li + li { margin-top: 10px; }
.quiz-steps > li::before {
  counter-increment: qs;
  content: counter(qs);
  position: absolute;
  left: 0; top: 1px;
  width: 23px; height: 23px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Ergebnistabelle (z. B. Bell-Zustand) */
.quiz-tab {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.quiz-tab th, .quiz-tab td {
  padding: 9px 10px;
  border-bottom: 1.5px solid var(--line-soft);
  text-align: left;
}
/* Lange Spaltenköpfe („Wahrscheinlichkeit“) dürfen getrennt werden;
   auf schmalen Handys werden sie zusätzlich kleiner (siehe unten). */
.quiz-tab th {
  -webkit-hyphens: auto;
  hyphens: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.quiz-tab td:first-child { font-family: var(--font-mono); font-weight: 700; }
@media (max-width: 360px) {
  .quiz-tab { font-size: 13.5px; }
  .quiz-tab th, .quiz-tab td { padding: 8px 6px; }
  .quiz-tab th { font-size: 10px; letter-spacing: .02em; }
}
@media (max-width: 300px) {
  .quiz-tab th, .quiz-tab td { padding: 7px 3px; }
}
.quiz-tab tr.is-off td { color: var(--faint); }
