/* ──────────────────────────────────────────────────────────────────────────
   Mental-Load-Test — seiten-spezifische Styles
   Nutzt die Design-Tokens aus style.css (Farben, Fonts, Spacing).
   ────────────────────────────────────────────────────────────────────────── */

/* Sticky-Footer: Footer bleibt am unteren Rand, auch wenn der Inhalt kurz ist
   oder die Textboxen kleiner gezogen werden. */
body.mlt-page { display: flex; flex-direction: column; min-height: 100vh; }
body.mlt-page main { flex: 1 0 auto; }
body.mlt-page .site-footer { flex-shrink: 0; }

.mlt-main {
  padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-24);
}
.mlt-wrap { max-width: 720px; margin: 0 auto; padding: 0 var(--space-6); }

.mlt-card {
  background: var(--color-surface);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: 0 8px 30px rgba(30, 27, 22, 0.06);
}
.mlt-card + .mlt-card { margin-top: var(--space-8); }

.mlt-card h1 { font-size: 2rem; margin: 0 0 var(--space-4); line-height: 1.2; }
.mlt-card h2 { font-size: 1.5rem; margin: 0 0 var(--space-4); }
.mlt-card .lead { color: var(--color-on-surface-muted); margin: 0 0 var(--space-6); }
.mlt-card .eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary);
  margin: 0 0 var(--space-2);
}

.mlt-steps { margin: 0 0 var(--space-6); padding-left: 1.2em; color: var(--color-on-surface-muted); }
.mlt-steps li { margin-bottom: var(--space-2); }

/* ── Landing: Hero ────────────────────────────────────────────────────────── */
.mlt-hero { text-align: center; }
.mlt-hero .mlt-hero-title { font-size: 2.4rem; line-height: 1.2; }
.mlt-hero .lead { max-width: 48ch; margin-left: auto; margin-right: auto; }
.mlt-hero .mlt-steps { display: inline-block; text-align: left; margin-top: var(--space-2); }
.mlt-hero .mlt-actions { justify-content: center; }

.mlt-hero-art { margin: 0 auto var(--space-3); max-width: 100px; }
.mlt-hero-art svg { width: 100%; height: auto; display: block; }

.mlt-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-6);
}
.mlt-trust span {
  font-size: 0.82rem; font-weight: 600; color: var(--color-on-surface-muted);
  background: var(--color-bg-soft); border: 1px solid var(--color-outline-variant);
  padding: 4px var(--space-4); border-radius: 999px;
}

/* ── Landing: einklappbare Sekundär-Karten ───────────────────────────────── */
.mlt-collapsible { margin-top: var(--space-4); }
.mlt-collapsible-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  gap: var(--space-4); cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  color: var(--color-on-surface);
  background: var(--color-bg-soft); border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-6);
  transition: border-color 0.15s var(--ease-out);
}
.mlt-collapsible-toggle:hover { border-color: var(--color-primary); }
.mlt-collapsible-toggle.is-open { border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom-color: transparent; }
.mlt-collapsible-title { flex: 1; }
.mlt-collapsible-chev {
  flex-shrink: 0; box-sizing: border-box; width: 10px; height: 10px;
  border-right: 2px solid var(--color-on-surface-muted);
  border-bottom: 2px solid var(--color-on-surface-muted);
  transform: rotate(45deg); transition: transform 0.25s var(--ease-out);
}
.mlt-collapsible-toggle.is-open .mlt-collapsible-chev { transform: rotate(-135deg); }
.mlt-collapsible-panel {
  background: var(--color-bg-soft); border: 1px solid var(--color-outline-variant);
  border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: var(--space-6);
}
.mlt-collapsible-panel[hidden] { display: none; }

.mlt-code-card { background: var(--color-bg-soft); }
.mlt-code-card-title { font-size: 1.25rem; margin: 0 0 var(--space-2); }
.mlt-code-card .mlt-code { margin-top: var(--space-3); }

.mlt-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.mlt-note {
  margin-top: var(--space-6); font-size: 0.9rem; color: var(--color-on-surface-muted);
}
.mlt-sub { font-weight: 600; margin: 0 0 var(--space-3); display: block; }

.mlt-flash {
  margin-top: var(--space-3); padding: var(--space-3) var(--space-4);
  background: #fbeae6; color: #8a3b29; border-radius: var(--radius-md);
  border: 1px solid #e7bcae; font-size: 0.95rem;
}

/* ── Dezenter Einstieg: eigenen Code laden und weiterbearbeiten ────────────── */
/* Bewusst zurückhaltend: nur ein Textlink, der bei Bedarf ein kleines Feld
   ausklappt – klar untergeordnet gegenüber dem Vergleichs-Formular. */
.mlt-resume { margin-top: var(--space-6); text-align: center; }
.mlt-resume-toggle {
  background: none; border: 0; cursor: pointer; font-family: var(--font-body);
  font-size: 0.9rem; color: var(--color-on-surface-muted);
  text-decoration: underline; text-underline-offset: 3px; padding: var(--space-2);
}
.mlt-resume-toggle:hover { color: var(--color-primary); }
.mlt-resume-toggle.is-open { color: var(--color-primary); }
.mlt-resume-panel {
  margin-top: var(--space-4); text-align: left;
  background: var(--color-bg-soft); border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-md); padding: var(--space-6);
}
.mlt-resume-panel[hidden] { display: none; }

/* ── Intro („Was ist Mental Load?", statische Section unter #mlt-app) ─────── */
/* Geschwister von #mlt-app, daher greift `.mlt-card + .mlt-card` nicht –
   Abstand explizit setzen. Sichtbar auf Start-/Ergebnis-Screen (via JS). */
.mlt-intro { margin-top: var(--space-8); }
.mlt-intro[hidden] { display: none; }

/* ── Instruktionen („So funktioniert der Test", JS-generiert) ─────────────── */
/* Liste erscheint auf dem einmaligen Howto-Screen und im Hub-Collapsible. */
.mlt-howto-list { margin: 0; padding-left: 1.2em; color: var(--color-on-surface-muted); }
.mlt-howto-list li { margin-bottom: var(--space-4); }
.mlt-howto-list li:last-child { margin-bottom: 0; }
.mlt-howto-list strong { color: var(--color-on-surface); }
.mlt-howto-list .mlt-important-chip.mlt-faq-chip { vertical-align: middle; margin: 0 2px; }

/* ── FAQ (SEO, sichtbar unter dem Test) ───────────────────────────────────── */
/* Natives <details>/<summary>-Accordion: kein JS, Inhalt bleibt im HTML und
   damit für Google crawlbar (Einklappen ist erlaubt, keine Abwertung).
   Jede Frage ist eine eigene weiche Karte – luftig statt enger Zeilen. */
.mlt-faq { margin-top: var(--space-8); }
.mlt-faq h2 { font-size: 1.4rem; margin: 0 0 var(--space-6); }

.mlt-faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-md);
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.mlt-faq-item + .mlt-faq-item { margin-top: var(--space-3); }
.mlt-faq-item:hover { border-color: var(--color-primary); }
.mlt-faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 6px 20px rgba(30, 27, 22, 0.06);
}

/* display:flex entfernt zugleich den nativen Marker (auch in Firefox).
   Gleiches horizontales Padding wie die Antwort → Frage und Text fluchten. */
.mlt-faq-item > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: var(--space-4); padding: var(--space-4) var(--space-6);
}
.mlt-faq-item > summary::-webkit-details-marker { display: none; }
.mlt-faq-item > summary::marker { content: ''; }
.mlt-faq-item > summary h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  margin: 0; color: var(--color-on-surface); flex: 1; line-height: 1.4;
}
.mlt-faq-item:hover > summary h3,
.mlt-faq-item[open] > summary h3 { color: var(--color-primary); }

/* Schlichtes Chevron (zwei Ränder), dreht beim Öffnen. */
.mlt-faq-item > summary::after {
  content: ''; flex-shrink: 0; box-sizing: border-box;
  width: 10px; height: 10px; margin: 0 4px 4px 0;
  border-right: 2px solid var(--color-on-surface-muted);
  border-bottom: 2px solid var(--color-on-surface-muted);
  transform: rotate(45deg); transition: transform 0.25s var(--ease-out);
}
.mlt-faq-item[open] > summary::after {
  transform: rotate(-135deg); margin: 4px 4px 0 0;
  border-color: var(--color-primary);
}

.mlt-faq-item > p {
  margin: 0; padding: 0 var(--space-6) var(--space-6);
  color: var(--color-on-surface-muted); line-height: 1.7;
}
.mlt-faq-answer {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-on-surface-muted); line-height: 1.7;
}
.mlt-faq-answer p { margin: 0; }
.mlt-important-chip.mlt-faq-chip {
  position: static; top: auto; right: auto;
  display: inline-flex; margin: var(--space-3) 0;
}

@media (prefers-reduced-motion: reduce) {
  .mlt-faq-item, .mlt-faq-item > summary::after { transition: none; }
  .mlt-collapsible-toggle, .mlt-collapsible-chev { transition: none; }
}

/* ── Chips (Altersgruppen-Auswahl im Kinder-Kapitel) ──────────────────────── */

.mlt-chips { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.mlt-chip {
  font-family: var(--font-body); font-size: 0.95rem; cursor: pointer;
  padding: var(--space-2) var(--space-4); border-radius: 999px;
  background: var(--color-bg-soft); color: var(--color-on-surface);
  border: 1.5px solid var(--color-outline-variant); transition: all 0.15s var(--ease-out);
}
.mlt-chip.is-on { background: var(--color-primary); color: var(--color-on-primary); border-color: var(--color-primary); }

/* ── Quiz ─────────────────────────────────────────────────────────────────── */
.mlt-progress {
  height: 6px; background: var(--color-bg-soft); border-radius: 999px; overflow: hidden;
  margin-bottom: var(--space-2);
}
.mlt-progress-bar { height: 100%; background: var(--color-primary); transition: width 0.3s var(--ease-out); }

.mlt-module-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 2px var(--space-3); border-radius: 999px; margin-bottom: var(--space-3);
  color: var(--color-ink);
  background: color-mix(in srgb, var(--badge-color) 28%, white);
}
.mlt-question { font-size: 1.4rem; line-height: 1.3; margin: 0 0 var(--space-6); }

/* Fragetitel + „Ist mir wichtig“-Chip in einer Zeile — der Chip gehört
   sichtbar zur Frage, nicht zur Seite. */
.mlt-question-row {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin: 0 0 var(--space-6);
}
.mlt-question-row .mlt-question { flex: 1; margin: 0; }
.mlt-important-chip {
  flex-shrink: 0; margin-top: 3px;
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 6px var(--space-3) 6px var(--space-3); cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  line-height: 1; border-radius: 999px;
  background: var(--color-bg-soft); border: 1.5px solid var(--color-outline-variant);
  color: var(--color-on-surface-muted); transition: all 0.15s var(--ease-out);
}
.mlt-important-icon { width: 15px; height: 15px; flex-shrink: 0; display: block; }
.mlt-important-icon path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.mlt-important-chip:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.mlt-important-chip.is-on {
  background: color-mix(in srgb, var(--color-secondary) 16%, white);
  border-color: var(--color-secondary); color: var(--color-secondary);
}
.mlt-important-chip.is-on .mlt-important-icon path { fill: currentColor; }
@keyframes mltChipPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.mlt-important-chip.is-pop { animation: mltChipPop 0.28s var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .mlt-important-chip.is-pop { animation: none; }
}

/* Optionaler Hinweis unter einer Frage (z. B. Pflege-Distanzfragen). */
.mlt-question-note {
  margin: calc(-1 * var(--space-4)) 0 var(--space-6);
  font-size: 0.9rem; line-height: 1.4; color: var(--color-on-surface-muted);
  padding-left: var(--space-3); border-left: 3px solid var(--chapter-color, var(--color-outline-variant));
}

/* Frage-Ansicht: Karte gehört sichtbar zum aktuellen Kapitel. */
.mlt-quiz { border-top: 4px solid var(--chapter-color, var(--color-primary)); }
.mlt-quiz .mlt-progress-bar { background: var(--chapter-color, var(--color-primary)); }
.mlt-quiz-head {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.mlt-quiz-dot { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.mlt-quiz-chapter {
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-on-surface);
}
.mlt-quiz-count {
  margin-left: auto; flex-shrink: 0;
  font-size: 0.85rem; color: var(--color-on-surface-muted);
}
.mlt-quiz .mlt-progress { margin-bottom: var(--space-6); }

.mlt-options { display: flex; flex-direction: column; gap: var(--space-3); }
.mlt-option {
  display: flex; align-items: center; gap: var(--space-4);
  text-align: left; cursor: pointer; font-family: var(--font-body); font-size: 1rem;
  padding: var(--space-4) var(--space-6); border-radius: var(--radius-md);
  background: transparent; color: var(--color-on-surface);
  border: 1.5px solid var(--color-outline-variant); transition: all 0.15s var(--ease-out);
}
.mlt-option-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mlt-option-label { flex: 1; }
/* Kurzerklärung unter dem Label — klein und gedämpft, damit das Label führt. */
.mlt-option-sub {
  font-size: 0.8rem; line-height: 1.35; color: var(--color-on-surface-muted);
}
.mlt-option.is-chosen .mlt-option-sub { color: inherit; opacity: 0.75; }

/* Checkbox links signalisiert klar: Mehrfachauswahl. */
.mlt-option-check {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; position: relative;
  border: 2px solid var(--color-outline); background: var(--color-surface);
  transition: background 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.mlt-option:hover { border-color: var(--color-primary); background: var(--color-bg-soft); transform: translateY(-1px); }
.mlt-option:hover .mlt-option-check { border-color: var(--color-primary); }

.mlt-option.is-chosen {
  background: var(--color-primary-container); border-color: var(--color-primary);
}
.mlt-option.is-chosen .mlt-option-check {
  background: var(--color-primary); border-color: var(--color-primary);
}
.mlt-option.is-chosen .mlt-option-check::after {
  content: ''; position: absolute; left: 7px; top: 3px;
  width: 6px; height: 11px; border: solid var(--color-on-primary);
  border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* Trennlinie vor „Trifft nicht zu“. */
.mlt-options-divider {
  height: 1px; background: var(--color-outline-variant);
  margin: var(--space-4) 0 var(--space-3);
}
/* „Trifft nicht zu“: kleiner, neutral, exklusiv – abgesetzt von den Hauptoptionen. */
.mlt-option-na {
  display: block; margin: 0 auto; cursor: pointer; font-family: var(--font-body);
  font-size: 0.85rem; color: var(--color-on-surface-muted);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  background: transparent; border: 1.5px solid var(--color-outline-variant);
  transition: all 0.15s var(--ease-out);
}
.mlt-option-na:hover { border-color: #d79c8a; color: #8a3b29; }
.mlt-option-na.is-chosen {
  background: #fbeae6; border-color: #cf7d63; color: #8a3b29; font-weight: 600;
}

/* Während des Übergangs nicht mehr klickbar; nicht-gewählte Optionen abdunkeln. */
.mlt-quiz.is-locked .mlt-option { pointer-events: none; }
.mlt-quiz.is-locked .mlt-option:not(.is-chosen) { opacity: 0.45; }

/* Sanfter Übergang: neue Karte gleitet herein, alte blendet aus. */
@keyframes mltCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.mlt-enter { animation: mltCardIn 0.3s var(--ease-out); }
.mlt-card.is-leaving {
  opacity: 0; transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mlt-quiz-nav { justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  .mlt-enter { animation: none; }
  .mlt-card.is-leaving { transition: none; }
  .mlt-option:hover, .mlt-option.is-chosen { transform: none; }
}

/* ── Übersicht: Kapitel-Reveal ───────────────────────────────────────────── */
@keyframes mltRevealRow {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
/* Gesamt-Fortschritt über alle Kapitel. */
.mlt-overview-progress {
  height: 8px; background: var(--color-bg-soft); border-radius: 999px; overflow: hidden;
  margin: var(--space-6) 0 0;
}
.mlt-overview-progress-bar {
  height: 100%; background: var(--color-primary); border-radius: 999px;
  transition: width 0.4s var(--ease-out);
}

.mlt-chapter-list { list-style: none; margin: var(--space-6) 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.mlt-chapter-row {
  display: flex; align-items: center; gap: var(--space-4); width: 100%;
  font-family: var(--font-body); font-size: 1rem; text-align: left;
  padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--color-bg-soft); border: 1px solid var(--color-outline-variant);
  color: var(--color-on-surface);
  opacity: 0; animation: mltRevealRow 0.4s var(--ease-out) forwards;
}
.mlt-chapter-row.no-anim { opacity: 1; animation: none; }
.mlt-chapter-row.is-clickable { cursor: pointer; transition: border-color 0.15s var(--ease-out), transform 0.15s var(--ease-out); }
.mlt-chapter-row.is-clickable:hover { border-color: var(--color-primary); transform: translateY(-1px); }
.mlt-chapter-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.mlt-chapter-row-label { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mlt-chapter-row-name { font-weight: 600; font-family: var(--font-display); }
.mlt-chapter-row-meta { font-size: 0.82rem; color: var(--color-on-surface-muted); }
.mlt-chapter-optional { font-weight: 400; font-size: 0.8rem; color: var(--color-on-surface-muted); }
/* Mini-Fortschritt pro Kapitel-Zeile. */
.mlt-chapter-progress {
  height: 4px; background: var(--color-outline-variant); border-radius: 999px;
  overflow: hidden; margin-top: 6px;
}
.mlt-chapter-progress-bar { height: 100%; border-radius: 999px; transition: width 0.4s var(--ease-out); }
.mlt-overview-cta { opacity: 0; animation: mltRevealRow 0.4s var(--ease-out) forwards; }
.mlt-overview-cta.no-anim { opacity: 1; animation: none; }

/* Status-Marker pro Kapitel */
.mlt-chapter-status { flex-shrink: 0; font-size: 0.82rem; font-weight: 600; }
.mlt-chapter-status.is-done { color: #4f7a4a; }
.mlt-chapter-status.is-partial { color: var(--color-secondary); }
.mlt-chapter-status.is-todo { color: var(--color-outline); font-size: 1.4rem; line-height: 1; }
.mlt-chapter-row.status-done { border-color: #b6cdb2; }
.mlt-chapter-row.status-done .mlt-chapter-dot::after {
  content: ''; display: block; width: 100%; height: 100%; border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7);
}

/* „← Übersicht“-Link oben auf Kapitel-/Frage-Karten */
.mlt-hublink {
  display: inline-block; background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; color: var(--color-on-surface-muted);
  padding: 0 0 var(--space-4); margin: 0;
}
.mlt-hublink:hover { color: var(--color-primary); }

.btn.is-disabled { opacity: 0.5; }

/* Sekundäre Aktion: Outline statt Füllung – klare Abstufung zur Hauptaktion. */
.btn-secondary {
  background: transparent; color: var(--color-primary);
  border: 1.5px solid var(--color-primary); padding: 12px 24px;
}
.btn-secondary:hover { background: var(--color-primary-container); }
/* Inline-SVG-Icon in Buttons. */
.btn-icon { width: 1.1em; height: 1.1em; vertical-align: -0.15em; margin-right: 0.4em; flex-shrink: 0; }
/* Block-Button (volle Breite), z. B. „Code kopieren” als klare Hauptaktion. */
.btn.mlt-block { width: 100%; }

/* ── Kapitel-Trenner ─────────────────────────────────────────────────────── */
.mlt-chapter-title { font-size: 1.6rem; margin: var(--space-2) 0 var(--space-3); }

@media (prefers-reduced-motion: reduce) {
  .mlt-chapter-row, .mlt-overview-cta { animation: none; opacity: 1; }
}

/* ── Ergebnis: Denken-/Machen-Waagen (Vergleich) ──────────────────────────── */
/* Kurze Erklärung unter einer Abschnitts-Überschrift. */
.mlt-section-intro {
  color: var(--color-on-surface-muted); font-size: 0.95rem; line-height: 1.6;
  margin: 0 0 var(--space-6);
}

/* Label klebt an SEINEM Balken; deutlich mehr Luft zur nächsten Waage. */
.mlt-scale { margin: 0 0 var(--space-8); }
.mlt-scale-label {
  display: flex; align-items: center; gap: var(--space-2);
  font-weight: 600; font-size: 0.95rem; margin: 0 0 var(--space-2);
}
.mlt-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }
.mlt-scale-icon { font-size: 1.05rem; line-height: 1; display: inline-flex; align-items: center; }
.mlt-scale-track {
  display: flex; height: 42px; border-radius: var(--radius-md); overflow: hidden;
  background: var(--color-bg-soft);
}
/* Back-out-Kurve: Balken schießt kurz übers Ziel hinaus und pendelt zurück. */
.mlt-scale-seg { display: flex; align-items: center; min-width: 0; transition: width 0.9s cubic-bezier(0.34, 1.56, 0.64, 1); }
/* Solange der Balken auf seinen Start wartet, keine Beschriftung verraten. */
.mlt-scale-seg-text { transition: opacity 0.4s var(--ease-out); }
.is-waiting .mlt-scale-seg-text { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .mlt-scale-seg, .mlt-cat-seg { transition: none; }
}
.mlt-scale-seg.is-right { justify-content: flex-end; }
.mlt-scale-seg-text {
  color: #fff; font-size: 0.9rem; font-weight: 600; padding: 0 var(--space-4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mlt-scale-empty { color: var(--color-on-surface-muted); font-size: 0.9rem; margin: 0; }

.mlt-gap-note-eyebrow {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: var(--space-2);
}

/* ── Auswertungs-Header: trennt Ergebnis klar vom Formular ────────────────── */
.mlt-out-head {
  text-align: center;
  margin-top: var(--space-8); padding-top: var(--space-8);
  border-top: 1px solid var(--color-outline-variant);
  /* Sticky-Header (~64px) + etwas Luft, damit das Eyebrow sichtbar bleibt. */
  scroll-margin-top: 88px;
}
.mlt-out-heading { font-size: 1.6rem; margin: 0; }

/* Gestaffeltes Einblenden der Auswertungs-Blöcke. */
@keyframes mltOutReveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.mlt-out-reveal { animation: mltOutReveal 0.5s var(--ease-out) both; animation-delay: var(--mlt-d, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .mlt-out-reveal { animation: none; }
}

/* ── Hero-Takeaway: großer Denkarbeits-Split + Fazit ganz oben ────────────── */
.mlt-verdict {
  text-align: center;
  background: var(--color-primary-container);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: var(--radius-lg); padding: var(--space-6);
  margin: var(--space-6) 0 var(--space-8);
}
.mlt-verdict-nums {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-6); margin: var(--space-2) 0 var(--space-4);
}
.mlt-verdict-side { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mlt-verdict-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.4rem; line-height: 1.1; white-space: nowrap;
}
.mlt-verdict-who {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 0.9rem; font-weight: 600; color: var(--color-ink);
}
.mlt-verdict-mid {
  font-size: 0.85rem; font-weight: 600; color: var(--color-on-surface-muted);
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.25em;
}
.mlt-verdict-text {
  margin: 0 auto; max-width: 46ch;
  font-size: 0.98rem; line-height: 1.55; color: var(--color-ink);
}
/* Split-Balken unter den Zahlen: wächst synchron zum Count-up. */
.mlt-verdict-bar {
  display: flex; height: 10px; max-width: 340px; overflow: hidden;
  border-radius: 999px; margin: 0 auto var(--space-4);
}
.mlt-verdict-bar > div { transition: width 2s var(--ease-out); }
.mlt-verdict-share { margin-top: var(--space-4); }
@media (prefers-reduced-motion: reduce) {
  .mlt-verdict-bar > div { transition: none; }
}
@media (max-width: 540px) {
  .mlt-verdict-num { font-size: 1.9rem; }
  .mlt-verdict-nums { gap: var(--space-4); }
}

/* Namensfelder im Direkt-Vergleich: nebeneinander statt gestapelt. */
.mlt-compare-form.mlt-name-row { flex-direction: row; gap: var(--space-4); }
.mlt-name-row .mlt-field { flex: 1; min-width: 0; }

/* Quadrant Denken × Machen. */
.mlt-quadrant-title { margin-top: var(--space-6); }
.mlt-quadrant { width: 100%; height: auto; max-width: 540px; display: block; margin: var(--space-2) auto var(--space-6); }
.mlt-q-guide { font-size: 13px; fill: var(--color-on-surface-muted); }
.mlt-q-axis { font-size: 13px; fill: var(--color-on-surface-muted); }
.mlt-q-name { font-size: 16px; font-weight: 600; fill: var(--color-on-surface); }

/* Denklast pro Bereich: Kopf-Anteil A vs. B je Kapitel. */
.mlt-cat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--space-6); }
.mlt-cat-row { display: flex; align-items: center; gap: var(--space-3); }
.mlt-cat-name { width: 160px; flex-shrink: 0; font-size: 0.9rem; }
.mlt-cat-track {
  flex: 1; display: flex; height: 28px; border-radius: 6px; overflow: hidden;
  background: var(--color-bg-soft);
}
.mlt-cat-seg { display: flex; align-items: center; min-width: 0; transition: width 0.5s var(--ease-out); }
.mlt-cat-seg.is-right { justify-content: flex-end; }
.mlt-cat-seg-text {
  color: #fff; font-size: 0.78rem; font-weight: 600; padding: 0 var(--space-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 540px) {
  .mlt-cat-name { width: 110px; font-size: 0.82rem; }
}

/* ── Code-Box ─────────────────────────────────────────────────────────────── */
.mlt-codebox { margin: var(--space-8) 0 0; }

/* Sekundärer Schritt „Zusammenlegen“ – ruhig abgesetzt unter der Hauptaktion. */
.mlt-merge {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin: var(--space-6) 0; padding-top: var(--space-6);
  border-top: 1px solid var(--color-outline-variant);
}
.mlt-merge-hint { color: var(--color-on-surface-muted); font-size: 0.92rem; }
.mlt-backrow { margin-top: var(--space-6); text-align: center; }
.mlt-code {
  width: 100%; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9rem; line-height: 1.5; resize: vertical; word-break: break-all;
  padding: var(--space-4); border-radius: var(--radius-md);
  border: 1.5px solid var(--color-outline-variant); background: var(--color-surface);
  color: var(--color-on-surface); margin-bottom: var(--space-3);
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.mlt-code::placeholder { font-family: var(--font-body); color: var(--color-on-surface-muted); }
.mlt-code:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* ── Vergleich ────────────────────────────────────────────────────────────── */
.mlt-compare-form { display: flex; flex-direction: column; gap: var(--space-6); }
.mlt-field { display: flex; flex-direction: column; }
.mlt-input {
  font-family: var(--font-body); font-size: 1rem; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); border: 1.5px solid var(--color-outline-variant);
  background: var(--color-surface); color: var(--color-on-surface); margin-bottom: var(--space-3);
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.mlt-input:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.mlt-compare-out:empty { display: none; }
.mlt-out-title { font-size: 1.2rem; margin: var(--space-8) 0 var(--space-4); }

.mlt-legend { display: flex; gap: var(--space-6); margin-bottom: var(--space-4); flex-wrap: wrap; }
.mlt-legend-item { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.9rem; }
.mlt-legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ── Verteilungs-Überblick (ein Balken über alle Muster) ──────────────────── */
.mlt-obar-wrap { margin: 0 0 var(--space-8); }
.mlt-obar {
  display: flex; height: 38px; border-radius: var(--radius-md); overflow: hidden;
  margin-bottom: var(--space-4);
}
.mlt-obar-seg {
  display: flex; align-items: center; justify-content: center; min-width: 0;
  border: 0; padding: 0; color: #fff; font-family: var(--font-body);
}
.mlt-obar-seg.is-dark-text { color: #33302a; }
.mlt-obar-seg.is-clickable { cursor: pointer; transition: filter 0.15s var(--ease-out); }
.mlt-obar-seg.is-clickable:hover { filter: brightness(1.07); }
.mlt-obar-pct { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }

.mlt-obar-legend { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }
.mlt-obar-leg {
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  background: none; border: 0; padding: 2px 0; text-align: left;
  font-family: var(--font-body); font-size: 0.9rem; color: var(--color-on-surface);
}
.mlt-obar-leg.is-clickable { cursor: pointer; }
.mlt-obar-leg.is-clickable:hover .mlt-obar-leg-label { color: var(--color-primary); text-decoration: underline; }
.mlt-obar-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.mlt-obar-leg-label { flex: 1; }
.mlt-obar-leg-val { color: var(--color-on-surface-muted); font-size: 0.82rem; flex-shrink: 0; }

/* Klick im Überblick scrollt zur Karte: Platz unter dem Sticky-Header lassen. */
.mlt-insight { scroll-margin-top: calc(var(--header-height, 64px) + 12px); }

/* ── Insight-Karten ───────────────────────────────────────────────────────── */
.mlt-insight {
  background: var(--color-surface); border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-lg); margin-bottom: var(--space-4); overflow: hidden;
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.mlt-insight:hover { border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-outline-variant)); }
.mlt-insight.is-open { box-shadow: 0 6px 20px rgba(30, 27, 22, 0.05); }

/* Klickbarer Kopf: Titelzeile + immer volle Beschreibung. */
.mlt-insight-toggle {
  display: flex; flex-direction: column; align-items: stretch; gap: var(--space-3);
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-body); color: var(--color-on-surface);
  padding: var(--space-6); transition: background 0.15s var(--ease-out);
}
.mlt-insight-toggle:hover { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.mlt-insight-head { display: flex; align-items: center; gap: var(--space-3); }
.mlt-insight-emoji { font-size: 1.35rem; flex-shrink: 0; line-height: 1; display: flex; align-items: center; }
/* flex:1 + min-width:0: Titel nimmt den Platz, statt Wort für Wort umzubrechen. */
.mlt-insight-title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; flex: 1; min-width: 0; }
/* Mobil: Badge unter den Titel, sonst bleibt für den Titel kaum Breite übrig. */
@media (max-width: 540px) {
  .mlt-insight-head {
    display: grid; grid-template-columns: auto 1fr auto;
    grid-template-areas: 'emoji title chev' '. count .';
    align-items: center;
  }
  .mlt-insight-emoji { grid-area: emoji; }
  .mlt-insight-title { grid-area: title; }
  .mlt-insight-count { grid-area: count; justify-self: start; margin: var(--space-2) 0 0; }
  .mlt-insight-chev { grid-area: chev; }
}
.mlt-insight-count {
  margin-left: auto; flex-shrink: 0; font-size: 0.74rem; font-weight: 600;
  color: var(--color-on-surface-muted); background: var(--color-bg-soft);
  border: 1px solid var(--color-outline-variant); padding: 3px var(--space-3); border-radius: 999px;
}
.mlt-insight-chev {
  flex-shrink: 0; box-sizing: border-box; width: 9px; height: 9px; margin: 0 2px 3px var(--space-2);
  border-right: 2px solid var(--color-on-surface-muted);
  border-bottom: 2px solid var(--color-on-surface-muted);
  transform: rotate(45deg); transition: transform 0.25s var(--ease-out);
}
.mlt-insight.is-open .mlt-insight-chev { transform: rotate(-135deg); margin: 3px 2px 0 var(--space-2); }
.mlt-insight-desc { color: var(--color-on-surface-muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }
/* „Euch besonders wichtig“: nur Top 5, Rest hinter „Alle anzeigen“. */
.mlt-insight-list li.is-extra { display: none; }
.mlt-insight-list.show-all li.is-extra { display: list-item; }
.mlt-more-li { text-align: center; padding-top: var(--space-3); }

/* Nur die Aufgaben-Liste klappt (grid-template-rows 0fr → 1fr). */
.mlt-insight-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease-out);
}
.mlt-insight.is-open .mlt-insight-panel { grid-template-rows: 1fr; }
.mlt-insight-body {
  overflow: hidden; min-height: 0;
  padding: 0 var(--space-6) var(--space-6);
}

@media (prefers-reduced-motion: reduce) {
  .mlt-insight-panel, .mlt-insight-chev, .mlt-insight-toggle, .mlt-insight { transition: none; }
}
.mlt-insight-list {
  list-style: none; margin: 0; display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4) 0 0; border-top: 1px solid var(--color-outline-variant);
}
.mlt-insight-list li { padding-top: var(--space-3); border-top: 1px solid var(--color-outline-variant); }
.mlt-insight-list li:first-child { padding-top: 0; border-top: 0; }
.mlt-insight-item { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.mlt-star-badge { color: var(--color-secondary); margin-right: 4px; }

/* Herausgehobene „Euch besonders wichtig“-Karte. */
.mlt-insight-important {
  background: color-mix(in srgb, var(--color-secondary) 10%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-secondary) 40%, transparent);
}
.mlt-insight-important .mlt-insight-emoji { filter: none; }
/* Muster-Tag in der Wichtig-Liste (z. B. „🧠 Denkarbeit unsichtbar“). */
.mlt-role-tag {
  display: inline-flex; align-items: center; gap: 0.25em; font-size: 0.78rem; font-weight: 600;
  color: var(--color-on-surface-muted); margin-bottom: 2px;
}

.mlt-role { display: block; font-size: 0.85rem; color: var(--color-on-surface-muted); }
.mlt-role-label { color: var(--color-on-surface-muted); }
.mlt-person-chip {
  display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 1px var(--space-3);
  border-radius: 999px; margin: 2px 4px 2px 0; color: var(--color-ink);
  background: color-mix(in srgb, var(--chip-color) 32%, white);
}

/* ── Funnel-CTA ───────────────────────────────────────────────────────────── */
.mlt-funnel {
  margin-top: var(--space-8); padding: var(--space-8) var(--space-6) var(--space-6);
  text-align: center; background: var(--color-primary-container);
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, transparent);
  border-radius: var(--radius-lg);
}
.mlt-funnel p { margin: 0 0 var(--space-4); color: var(--color-ink); }
.mlt-funnel-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  margin-bottom: var(--space-2) !important;
}
.mlt-funnel-art { margin: 0 auto var(--space-4); max-width: 280px; }
.mlt-funnel-art img,
.mlt-funnel-art svg { width: 100%; height: auto; display: block; }
.mlt-funnel-micro {
  margin: var(--space-3) 0 0 !important;
  font-size: 0.8rem; color: var(--color-on-surface-muted) !important;
}

/* ── Bestätigungs-Dialog vor der Auswertung ───────────────────────────────── */
.mlt-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
  background: color-mix(in srgb, var(--color-ink) 55%, transparent);
  backdrop-filter: blur(3px);
  animation: mltOverlayIn 0.2s var(--ease-out);
}
.mlt-overlay.is-closing { animation: mltOverlayIn 0.2s var(--ease-out) reverse; }

.mlt-dialog {
  width: 100%; max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: 0 20px 60px rgba(30, 27, 22, 0.22);
  text-align: center;
  animation: mltDialogIn 0.25s var(--ease-out);
}
.mlt-dialog .eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary);
  margin: 0 0 var(--space-2);
}
.mlt-dialog-heart { text-align: center; margin-bottom: var(--space-3); }
.mlt-dialog-title { font-size: 1.35rem; margin: 0 0 var(--space-4); }
.mlt-dialog-text {
  color: var(--color-on-surface-muted); line-height: 1.55;
  margin: 0 0 var(--space-6); text-align: left;
}
.mlt-dialog-loading { color: var(--color-on-surface-muted); margin: var(--space-4) 0 0; }

/* Schlichter Spinner für die kurze Lade-Phase. */
.mlt-spinner {
  width: 40px; height: 40px; margin: var(--space-2) auto 0;
  border-radius: 50%;
  border: 3px solid var(--color-outline-variant);
  border-top-color: var(--color-primary);
  animation: mltSpin 0.8s linear infinite;
}

@keyframes mltOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mltDialogIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes mltSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .mlt-overlay, .mlt-dialog { animation: none; }
  .mlt-spinner { animation-duration: 1.4s; }
}

/* ── Quiz-Fullscreen auf Mobile: kein Scroll, kein Footer ────────────────── */
@media (max-width: 540px) {
  body.mlt-quiz-active { overflow: hidden; }
  body.mlt-quiz-active .site-footer { display: none; }
  body.mlt-quiz-active .mlt-main { padding-bottom: 0; }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .mlt-main { padding-top: var(--space-4); }
  .mlt-card { padding: var(--space-4); }
  .mlt-hero .mlt-hero-title { font-size: 1.6rem; }
  .mlt-question { font-size: 1.1rem; margin-bottom: var(--space-4); }
  .mlt-actions .btn { flex: 1; }
  .mlt-twin { grid-template-columns: 70px 1fr 40px; }

  /* Quiz-Card kompakter: alles auf einen Screen */
  .mlt-quiz-head { margin-bottom: var(--space-2); }
  .mlt-quiz .mlt-progress { margin-bottom: var(--space-4); }
  .mlt-quiz-count { font-size: 0.78rem; }
  .mlt-question-row { margin-bottom: var(--space-4); }
  .mlt-options { gap: var(--space-2); }
  .mlt-option { padding: var(--space-3) var(--space-4); font-size: 0.95rem; }
  .mlt-option-check { width: 20px; height: 20px; }
  .mlt-option.is-chosen .mlt-option-check::after { left: 5px; top: 2px; width: 5px; height: 10px; }
  .mlt-options-divider { margin: var(--space-2) 0; }
  .mlt-actions { margin-top: var(--space-4); }
  .mlt-important-chip { font-size: 0.75rem; padding: 4px var(--space-2); }
  .mlt-important-icon { width: 13px; height: 13px; }
  .mlt-hublink { padding-bottom: var(--space-2); font-size: 0.82rem; }
  .mlt-quiz-chapter { font-size: 0.8rem; }
  .mlt-quiz-dot { width: 11px; height: 11px; }
}
