/* Identität 02: eine gemeinsame Wortmarke und ein ruhiger Rahmen für alle Lernwege. */
body.lw-mantel {
  --lw-accent: #2D52EE;
  --lw-accent-dark: #2442C2;
  --lw-accent-soft: #EDF0FF;
  --lw-blue: var(--lw-accent);
  --lw-blue-dark: var(--lw-accent-dark);
  --lw-soft: var(--lw-accent-soft);
  --lw-green: var(--lw-accent);
  --lw-field: #768291;
  margin: 0;
}
.lw-mantel h1, .lw-mantel h2, .lw-mantel h3, .lw-mantel h4 { font-weight: 700; }
.lw-mantel :focus-visible { outline-color: var(--lw-blue); }
.lw-mantel :is(button, input, textarea, select) { font-family: inherit; }
.lw-mantel .lw-button { font-weight: 700; border-radius: 8px; }
.lw-mantel .lw-button:hover { background: var(--lw-blue-dark); border-color: var(--lw-blue-dark); }
.lw-mantel .lw-button.secondary:hover { background: var(--lw-soft); }
.lw-mantel .lw-button:focus-visible { outline-offset: 5px; }

/* Logo, Navigation und Arbeitskontext bleiben drei lesbare Ebenen. */
.lw-mantel[data-lw-area] .lw-shell-header {
  max-width: 1280px; padding: 18px 32px 16px; gap: 24px;
  flex-wrap: nowrap; border-color: var(--lw-line);
}
.lw-mantel[data-lw-area] .lw-shell-identity {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-width: 0; flex-shrink: 0;
}
.lw-mantel .lw-shell-brand { display: block; width: 370px; max-width: 100%; line-height: 0; margin-left: -10px; }
.lw-brand-subject { display: none; }
.lw-brand-logo { display: block; width: 100%; height: auto; }
.lw-mantel[data-lw-area] .lw-shell-location { display: block; padding-left: 10px; color: var(--lw-muted); }
.lw-mantel .lw-shell-location b { font-weight: 400; }
.lw-mantel[data-lw-area] .lw-shell-nav { width: auto; flex-wrap: nowrap; gap: 6px; }
.lw-mantel[data-lw-area] .lw-shell-nav > a,
.lw-mantel[data-lw-area] .lw-shell-nav summary {
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 400; padding: 10px 12px; color: var(--lw-ink);
}
.lw-mantel .lw-shell-nav [aria-current="page"] { color: var(--lw-blue); font-weight: 700; box-shadow: inset 0 -2px 0 var(--lw-blue); }
.lw-nav-short { display: none; }
.lw-mantel .lw-shell-topics {
  border-color: var(--lw-line); padding: 12px; border-radius: 12px;
  box-shadow: 0 12px 30px #222a2f18; max-height: 70vh; overflow-y: auto;
}
.lw-shell-topics > a:hover { background: var(--lw-soft); border-radius: 6px; }
.lw-shell-topics > button {
  margin: 12px; padding: 8px 16px; color: var(--lw-blue);
  border: 1px solid var(--lw-field); background: #fff;
}
.lw-mantel[data-lw-area] .lw-state-status { max-width: 1280px; padding: 6px 42px; font-size: 14px; color: var(--lw-muted); }

/* Die Startseite: zuerst eine Handlung, danach das tatsächliche Themenangebot. */
.lw-mantel .lw-page { max-width: 1280px; padding: 18px 32px 56px; }
.lw-mantel .lw-home-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 48px;
  align-items: center; padding: 8px 0 28px; border-bottom: 1px solid var(--lw-line);
}
.lw-mantel .lw-home-hero h1 {
  font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.04em;
  margin: 0 0 22px; max-width: 760px;
}
.lw-home-hero h1 span { color: var(--lw-blue); }
.lw-mantel .lw-home-hero .lw-eyebrow { color: var(--lw-muted); font-size: 13px; letter-spacing: .075em; margin-bottom: 12px; }
.lw-mantel .lw-home-hero .lw-lead { max-width: 60ch; font-size: 18px; line-height: 1.6; margin: 0 0 24px; }
.lw-home-intro .lw-button { min-width: 180px; gap: 22px; }
.lw-home-links { display: grid; gap: 12px; }
.lw-home-links > a {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  padding: 20px; background: #fff; border: 1px solid var(--lw-line);
  border-radius: 12px; color: var(--lw-ink);
}
.lw-home-links > a > span { font-size: 14px; color: var(--lw-blue); }
.lw-home-links strong { display: flex; justify-content: space-between; gap: 12px; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.lw-home-links strong b { font-weight: 400; }
.lw-home-links small { font-size: 16px; line-height: 1.5; color: var(--lw-muted); }
.lw-home-links > a:first-child:hover { background: var(--lw-soft); border-color: var(--lw-blue); }
.lw-home-links > a:last-child { background: #fff; border-color: var(--lw-line); color: var(--lw-ink); }
.lw-home-links > a:last-child > span, .lw-home-links > a:last-child strong b { color: var(--lw-blue); }
.lw-home-links > a:last-child small { color: var(--lw-muted); }
.lw-home-links > a:last-child:hover { background: var(--lw-soft); border-color: var(--lw-blue); }
.lw-home-topics { scroll-margin-top: 24px; }
.lw-topics-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-top: 28px; }
.lw-topics-heading .lw-eyebrow { margin-bottom: 8px; }
.lw-mantel .lw-topics-heading h2 { font-size: 32px; margin: 0; }
.lw-topics-heading > span { color: var(--lw-muted); font-size: 14px; padding-bottom: 4px; white-space: nowrap; }
.lw-mantel .lw-grid { gap: 22px; margin: 24px 0 36px; }
.lw-mantel .lw-card { border-color: var(--lw-line); border-radius: 12px; }
.lw-mantel .lw-card-body { padding: 22px; }
.lw-mantel .lw-card-body h2 { font-size: 23px; line-height: 1.25; margin: 10px 0 12px; }
.lw-mantel .lw-card-number { color: var(--lw-muted); font-size: 14px; }
.lw-mantel .lw-card-product { color: var(--lw-ink); border-top: 1px solid var(--lw-line); padding-top: 14px; }
.lw-mantel .lw-card-product b { color: var(--lw-ink); font-size: 16px; letter-spacing: 0; text-transform: none; }
.lw-mantel .lw-card-body .lw-button { align-self: stretch; justify-content: space-between; }
.lw-mantel .lw-preview { border-color: var(--lw-line); height: 190px; background: #eef0ed; }
.lw-preview-device, .lw-preview-code { background: var(--lw-soft) !important; }
.lw-preview-files, .lw-preview-sources { background: #f1eee5 !important; }
.lw-preview-access, .lw-preview-search, .lw-preview-team, .lw-preview-topic { background: #edf0f2 !important; }
.lw-mantel :is(.lw-device-screen, .lw-mini-code, .lw-folder-card, .lw-access-file, .lw-search-question, .lw-search-sources > div, .lw-team-plan) { background: #fff; border-color: var(--lw-field); box-shadow: none; }
.lw-mantel .lw-device-apps b { background: var(--lw-soft); border-color: var(--lw-line); color: var(--lw-blue); }
.lw-mantel :is(.lw-device-system, .lw-device-apps > span, .lw-file-leaf, .lw-access-targets > div, .lw-search-sources em, .lw-team-plan small) { color: var(--lw-muted); }
.lw-mantel .lw-file-document, .lw-mini-code b, .lw-mini-grid > span:nth-child(3), .lw-team-messages span + span { background: var(--lw-soft); color: var(--lw-blue); }
.lw-mantel .lw-notice { background: var(--lw-soft); border-left-color: var(--lw-blue); border-radius: 8px; }
.lw-mantel .lw-danger { border-color: #a55120; background: #fff2e6; }
.lw-mantel .lw-footer { max-width: 1280px; border-color: var(--lw-line); color: var(--lw-muted); }

/* 2 Spalten vor dem Wechsel zur schmalen, kompakten Wortmarke. */
@media (max-width: 1050px) {
  .lw-mantel[data-lw-area] .lw-shell-header { gap: 16px; flex-wrap: wrap; }
  .lw-mantel .lw-shell-brand { width: 340px; }
  .lw-mantel[data-lw-area] .lw-shell-nav { width: 100%; justify-content: flex-start; }
  .lw-mantel .lw-home-hero { grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; }
  .lw-mantel .lw-home-hero h1 { font-size: 46px; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .lw-mantel .lw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lw-mantel .lw-home-hero { grid-template-columns: 1fr; }
  .lw-home-links { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .lw-mantel[data-lw-area] .lw-shell-header { padding: 18px 18px 12px; gap: 12px; }
  .lw-mantel .lw-shell-brand { width: 280px; max-width: calc(100vw - 36px); margin-left: -3px; }
  .lw-mantel .lw-brand-subject { display: block; font-size: 13px; font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--lw-muted); padding-left: 3px; margin-top: 8px; }
  .lw-mantel[data-lw-area] .lw-shell-location { padding-left: 0; font-size: 13px; }
  .lw-mantel[data-lw-area] .lw-shell-nav { display: grid; grid-template-columns: repeat(4, max-content); justify-content: space-between; gap: 4px; }
  .lw-mantel[data-lw-area] .lw-shell-nav > a, .lw-mantel[data-lw-area] .lw-shell-nav summary { padding: 8px 2px; font-size: 16px; min-height: 48px; white-space: nowrap; }
  .lw-nav-full { display: none; }
  .lw-nav-short { display: inline; }
  .lw-mantel .lw-shell-topics { left: 18px; right: 18px; width: auto; }
  .lw-mantel[data-lw-area] .lw-state-status { padding: 6px 21px; line-height: 1.5; }
  .lw-mantel .lw-page { padding: 18px 18px 44px; }
  .lw-mantel .lw-home-hero { grid-template-columns: 1fr; padding: 0 0 20px; gap: 18px; }
  .lw-mantel .lw-home-hero h1 { font-size: clamp(34px, 7vw, 46px); margin-bottom: 18px; }
  .lw-mantel .lw-home-hero .lw-lead { font-size: 18px; margin-bottom: 18px; }
  .lw-home-links { gap: 10px; }
  .lw-home-links > a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 4px 12px; align-items: center; padding: 12px 14px; }
  .lw-home-links > a > span { grid-column: 1; font-size: 13px; }
  .lw-home-links > a > strong { grid-column: 1; grid-row: 2; }
  .lw-home-links > a > small { grid-column: 2; grid-row: 1 / span 2; }
  .lw-home-links strong { font-size: 16px; line-height: 1.35; }
  .lw-home-links small { font-size: 14px; line-height: 1.5; }
  .lw-mantel .lw-grid { grid-template-columns: 1fr; gap: 18px; }
  .lw-mantel .lw-card-body { padding: 22px; }
  .lw-topics-heading { padding-top: 22px; }
  .lw-topics-heading > span { font-size: 14px; }
  .lw-mantel .lw-topics-heading h2 { font-size: 28px; }
}
@media (min-width: 520px) and (max-width: 760px) {
  .lw-home-links { grid-template-columns: 1fr 1fr; }
  .lw-mantel .lw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lesbarkeit: Lern- und Ergebnistext behalten ihr Gewicht, Metadaten bleiben kleiner. */
@media screen {
  body.lw-mantel { font-size: 18px; }
  .lw-mantel .lw-card-body > p { font-size: 18px; line-height: 1.6; }
  .lw-mantel .lw-card-product { font-size: 18px !important; }
  .lw-mantel :is(.lw-lesson-intro > p, .lw-reading-heading > p, .lw-route-help p, .lw-route-help li, .lw-self-check > ul) { font-size: 18px; }
  .lw-mantel[data-lw-area="lernstudio"] .lesson-task { font-size: 18px; }
  .lw-mantel :is(textarea, input[type="text"], select) { border-color: var(--lw-field); font-size: 18px; }
  .lw-mantel :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--lw-blue); }
}
@media (max-width: 359px) {
  .lw-mantel[data-lw-area] .lw-shell-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lw-mantel[data-lw-area] .lw-shell-nav > a,
  .lw-mantel[data-lw-area] .lw-shell-nav summary { justify-content: flex-start; padding-inline: 6px; }
}

@media print {
  .lw-home-links, .lw-home-intro > .lw-button { display: none !important; }
  .lw-mantel .lw-page { padding: 0; max-width: none; }
  .lw-mantel .lw-home-hero { display: block; padding: 0; }
  .lw-mantel .lw-home-hero h1 { font-size: 24pt; }
  .lw-mantel .lw-home-hero h1 span { color: #000; }
  .lw-mantel .lw-topics-heading h2 { font-size: 18pt; }
}

/* Regulärer Rechercheweg 2.0; historische Beispielausgabe bleibt unverändert. */
.lw-ref { max-width: 960px; margin-inline: auto; overflow-wrap: anywhere; }
.lw-ref :is(p,li,dd) { line-height: 1.65; }
.lw-ref h1 { font-size: clamp(32px,4vw,46px); line-height: 1.15; margin: 16px 0 24px; }
.lw-ref h2 { font-size: 28px; line-height: 1.25; }
.lw-ref h3 { font-size: 22px; }
.lw-ref-route { border-bottom: 1px solid var(--lw-line); margin-bottom: 28px; padding-bottom: 16px; }
.lw-ref-route > p { margin: 0 0 10px; font-weight: 700; color: var(--lw-muted); }
.lw-ref-route ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.lw-ref-route li { margin: 0; flex: 1; min-width: 220px; }
.lw-ref-route a { display: flex; gap: 10px; padding: 12px; text-decoration: none; color: var(--lw-ink); border-radius: 6px; }
.lw-ref-route [aria-current] { background: var(--lw-soft); font-weight: 700; box-shadow: inset 0 -3px var(--lw-blue); }
.lw-ref-route span,.lw-ref-home span { color: var(--lw-blue); font-weight: 700; }
.lw-ref-question { padding-left: 16px; border-left: 4px solid var(--lw-blue); font-size: 22px; font-weight: 700; }
.lw-ref-workplace { padding: 20px 24px; background: var(--lw-soft); border-radius: 8px; margin-bottom: 28px; }
.lw-ref-workplace h2 { margin: 0 0 12px; }
.lw-ref-workplace p:last-child { margin-bottom: 0; }
.lw-ref-block { padding: 12px 0 24px; margin-bottom: 20px; border-bottom: 1px solid var(--lw-line); }
.lw-ref-figure { margin: 24px 0; }
.lw-ref-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--lw-line); box-sizing: border-box; }
.lw-ref-figure img.lw-ref-moon { height: 300px; object-fit: contain; background: #090d13; border: 0; }
.lw-ref-figure figcaption { margin-top: 12px; font-size: 18px; line-height: 1.6; }
.lw-ref-credit { display: block; font-size: 14px; color: var(--lw-muted); margin-top: 8px; }
.lw-ref-enlarge { display: inline-block; min-height: 44px; padding-top: 10px; }
.lw-ref-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.lw-ref-note { border: 2px solid var(--lw-blue); padding: 20px 24px; margin: 24px 0; background: #fff; border-radius: 8px; }
.lw-ref-note h3 { margin: 0 0 18px; }
.lw-ref-note dt { font-weight: 700; color: var(--lw-blue); margin-top: 18px; }
.lw-ref-note dd { margin: 6px 0 16px; }
.lw-ref-note a { overflow-wrap: anywhere; }
.lw-ref-help { border: 1px solid var(--lw-line); border-radius: 8px; padding: 0 18px; margin: 16px 0; background: #fff; }
.lw-ref-help > summary { display: list-item; list-style: disclosure-closed inside; white-space: normal; padding: 16px 0; min-height: 48px; cursor: pointer; font-weight: 700; color: var(--lw-blue); background: transparent; border: 0; }
.lw-ref-help[open] > summary { list-style-type: disclosure-open; }
.lw-ref-help > summary::-webkit-details-marker { display: inline; }
.lw-ref-think { padding: 18px 24px; border-left: 4px solid #a55120; background: #fff4e8; margin: 28px 0; }
.lw-ref-think p { margin: 8px 0 0; }
.lw-ref-transition { font-weight: 700; padding: 16px 0; }
.lw-ref-check { border-left: 4px solid var(--lw-blue); padding: 4px 24px; margin: 28px 0; }
.lw-ref-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; margin: 32px 0; }
.lw-ref-next a { padding-block: 12px; }
.lw-ref-secondary { font-size: 16px; }
.lw-ref-home ol { padding: 0; list-style: none; margin: 28px 0; }
.lw-ref-home li { border-bottom: 1px solid var(--lw-line); margin: 0; }
.lw-ref-home a { display: flex; align-items: start; gap: 18px; padding: 24px 0; text-decoration: none; color: var(--lw-ink); }
.lw-ref-home strong { font-size: 24px; color: var(--lw-blue); }
.lw-ref-home p { margin: 8px 0 0; }
.lw-ref-home b { margin-left: auto; }
.lw-ref-image { max-width: none; }
.lw-ref-image img { width: auto; max-width: 100%; margin-inline: auto; }
.lw-ref-source-record p { white-space: normal; }
@media (max-width:760px) {
 .lw-ref-route ol { display: block; }
 .lw-ref-route li { min-width: 0; }
 .lw-ref-comparison { grid-template-columns: 1fr; gap: 0; }
 .lw-ref :is(.lw-ref-workplace,.lw-ref-note) { padding: 16px; }
 .lw-ref h2 { font-size: 25px; }
 .lw-ref-question { font-size: 20px; }
 .lw-ref-figure img.lw-ref-moon { height: 240px; }
 .lw-ref-credit { font-size: 14px; }
 .lw-ref-next { display: grid; }
}
@media (min-width:1200px) {
 .lw-ref :is(p,li,dd) { font-size: 20px; }
 .lw-ref-figure figcaption { font-size: 20px; }
 .lw-ref .lw-ref-credit { font-size: 15px; }
}
@media print {
 .lw-ref-route,.lw-ref-next,.lw-ref-secondary,.lw-ref-enlarge { display: none; }
 .lw-ref { max-width: none; }
 .lw-ref :is(.lw-ref-workplace,.lw-ref-note) { break-inside: avoid; }
 .lw-ref-figure img.lw-ref-moon { height: 180px; }
}

/* RQ03 R2: one route, faithful provenance, legible original pixels. */
body[data-lw-area="recherche"]:has(.lw-ref) :is(.lw-shell-nav,.lw-state-status) { display: none; }
.lw-ref-image-scroll { overflow-x: auto; }
.lw-ref-image-scroll:focus-visible { outline: 3px solid var(--lw-blue); outline-offset: 3px; }
.lw-ref-scroll-tip { display: none; }
.lw-ref :is(#lea-suche1,#lea-suche2,#lea-text) .lw-ref-image-scroll { border: 3px solid #a55120; }
.lw-ref-image .lw-ref-image-scroll img { max-width: none; min-width: 900px; width: auto; }
@media (max-width:760px) {
 .lw-ref-figure:not(:has(.lw-ref-moon)) .lw-ref-image-scroll img { width: auto; max-width: none; }
 .lw-ref-scroll-tip { display: block; color: var(--lw-muted); font-size: 16px; margin-top: 8px; }
 .lw-ref-image .lw-ref-image-scroll img { min-width: 0; width: auto; }
}

/* Source record keeps RQ02 text while rendering its tables and inline emphasis. */
.lw-ref-source-record { overflow-wrap: anywhere; }
.lw-ref-source-table { overflow-x: auto; margin-block: 24px; }
.lw-ref-source-table table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 18px; }
.lw-ref-source-table :is(th,td) { border: 1px solid var(--lw-line); padding: 14px; text-align: left; vertical-align: top; }
.lw-ref-source-table th { background: #eef0ff; }
.lw-ref-source-record code { font-size: .9em; }

/* RQ04: scoped chapter navigation and reading core */
.lw-ref-route summary{cursor:pointer;font-weight:700;padding:.6rem 0}.lw-ref-route details:not([open]){margin-bottom:.5rem}.lw-ref-core dt{font-weight:750;margin-top:1rem}.lw-ref-core dd{margin:.25rem 0 1rem}.lw-ref blockquote{margin:1.3rem 0;padding:1rem 1.25rem;border-left:5px solid #2e698c;background:#eef5f8}.lw-ref blockquote footer{font-size:.85em}.lw-ref-later{margin-top:2rem;padding:1rem;border-top:2px solid #d2dce4}.lw-ref h3{line-height:1.25}.lw-ref .lw-ref-tools a{display:inline-block;margin-bottom:.4rem}

/* RQ05: text alternative stays readable without a second image-navigation path. */
.lw-ref .lw-ref-text-image{margin:1.2rem 0;padding:1rem;background:#f5f5ef;border:1px solid #d5dad3;border-radius:.45rem;}
.lw-ref .lw-ref-text-image h3{font-size:1.05rem;margin-top:0;}
.lw-ref .lw-ref-text-image a{overflow-wrap:anywhere;}

/* RQ06-K1: readable excerpts, optional original context, knowledge at the workplace. */
.lw-ref-passages { display:grid; gap:12px; margin:20px 0; }
.lw-ref-passage { padding:16px 20px; border:1px solid var(--lw-line); border-radius:8px; background:#fff; }
.lw-ref-passage h3 { margin:0 0 8px; font-size:21px; }
.lw-ref-passage p { margin:8px 0; }
.lw-ref-passage blockquote { margin:12px 0 0; padding:12px 16px; }
.lw-ref-wordhelp { font-size:16px; color:var(--lw-muted); }
.lw-ref-credit-details { margin-top:8px; color:var(--lw-muted); font-size:14px; }
.lw-ref-credit-details summary { cursor:pointer; }
.lw-ref-credit-details p { font-size:14px; margin:8px 0; }
.lw-ref :is(.lw-ref-block,.lw-ref-note) { scroll-margin-top:24px; }
.lw-ref-knowledge .lw-ref-block:last-of-type { border-bottom:0; }
@media(max-width:600px) { .lw-ref-passage { padding:12px; } .lw-ref-passage blockquote { padding:10px 12px; } }
@media print { .lw-ref-credit-details > p { display:block; } .lw-ref-credit-details > summary { display:none; } }

.lw-ref-credit-print { display:none; }
@media print { .lw-ref-credit-details { display:none; } .lw-ref .lw-ref-credit-print { display:block; font-size:10pt; } }

/* RQ05-F1: embedded film and readable alternatives */
.lw-ref-film video{display:block;width:100%;max-width:100%;height:auto;background:#202838;border-radius:.75rem}.lw-ref-film-scene figure{margin:1rem 0}.lw-ref-film-scene figure img{display:block;max-width:100%;height:auto;border-radius:.5rem}.lw-ref-film-scene figcaption{font-size:.85rem;color:var(--muted,#536078);margin-top:.5rem}.lw-ref-film-gate{margin-top:1.25rem}
