:root{--ink:#173446;--muted:#475d68;--blue:#075e83;--deep:#09384e;--green:#146344;--soft:#edf5f7;--line:#c8d9df;--paper:#fff;--amber:#fff4da;font-family:"Segoe UI",Arial,sans-serif;color:var(--ink);font-size:18px;line-height:1.65}
*{box-sizing:border-box}
html,body{max-width:100%;overflow-x:clip}
body{margin:0;background:#fbfdfd}
a{color:var(--blue);text-underline-offset:.2em}
a:hover{text-decoration-thickness:2px}
button,input,select{font:inherit}
button,.button{cursor:pointer;display:inline-block;border:1px solid var(--blue);border-radius:.5rem;background:var(--blue);color:white;padding:.7rem 1rem;text-decoration:none;font-weight:650;max-width:100%}
button:hover,.button:hover{background:var(--deep)}
.secondary{background:white;color:var(--blue)}
.secondary:hover{color:white}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #9a4900;outline-offset:4px}
input[type=checkbox],input[type=radio]{width:1.2rem;height:1.2rem;accent-color:var(--blue);flex:none}
input[type=search],select{display:block;width:100%;max-width:100%;border:1px solid #69828d;border-radius:.35rem;padding:.65rem;background:white;color:var(--ink)}
[hidden]{display:none!important}
.skip{position:absolute;left:-9999px;top:0;z-index:10;background:white;padding:1rem}
.skip:focus{left:1rem}

/* Header & Navigation */
header{border-bottom:1px solid var(--line);background:white}
.nav{max-width:1240px;margin:auto;padding:.75rem 2rem;display:flex;justify-content:space-between;align-items:center;gap:.65rem 1rem;flex-wrap:wrap}
.brand{font-weight:800;font-size:1.3rem;text-decoration:none;color:var(--deep);flex:none}
.brand span{color:var(--green)}
.brand small{display:block;font-size:.57rem;letter-spacing:.24em}
.nav-utils{order:2;display:flex;align-items:center;gap:.35rem;flex:none;margin-left:auto}
.util-btn{display:inline-flex;align-items:center;gap:.24rem;padding:.28rem .52rem;border:1.5px solid var(--line);border-radius:.42rem;background:var(--paper);color:var(--deep);font-size:.76rem;font-weight:700;text-decoration:none;cursor:pointer;line-height:1.2}
.util-btn:hover{background:var(--soft);color:var(--deep);border-color:var(--blue);text-decoration:none}
.util-btn[aria-pressed=true],.util-btn[aria-current=page]{background:var(--deep);color:white;border-color:var(--deep)}
.menu-toggle{display:none}
.nav nav,footer nav{display:flex;gap:.75rem .9rem;flex-wrap:wrap}
.nav nav{order:1;max-width:none;align-items:center}
.nav nav a{font-size:.82rem;font-weight:650;text-decoration:none;color:var(--deep);padding:.22rem .06rem;border-bottom:3px solid transparent}
.nav nav a:hover{color:var(--blue);border-bottom-color:var(--line);text-decoration:none}
.nav nav a[aria-current=page]{color:var(--deep);border-bottom-color:var(--green);text-decoration:none}

/* Layout & Overflow Safety */
main{max-width:1240px;margin:auto;padding:0 2rem}
main,section,article,aside,.band,.lesson-v6,.lesson-page,.module-body,.module-body>*,.mcard,.hb-card,.hr-overview>*,.grid>*,.mgrid>*,.hb-grid>*,.paths-grid>*{min-width:0;max-width:100%}
main a,code{overflow-wrap:anywhere}
h1,h2,h3,h4,p,li,dt,dd,th,td,figcaption,summary{overflow-wrap:break-word}
section{padding:2.5rem 0;scroll-margin-top:1rem}
h1,h2,h3{line-height:1.22;letter-spacing:-.025em;color:var(--deep)}
h1{font-size:clamp(1.9rem,4.2vw,3.1rem);margin:.6rem 0 1.1rem}
h2{font-size:1.8rem;margin:0 0 1rem}
h3{font-size:1.25rem;margin:1.5rem 0 .6rem}
p{margin:.65rem 0 .95rem;max-width:68ch}
.lead{font-size:1.1rem;color:var(--muted)}
.eyebrow{font-size:.73rem;letter-spacing:.15em;font-weight:800;color:var(--green)}
.hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:3.5rem;padding:3rem 0}
.hero h1 span{color:var(--green)}
.actions{display:flex;gap:.8rem;flex-wrap:wrap;margin:1.3rem 0}
.roadmap{padding:1.7rem;background:var(--deep);color:#fff;border-radius:1.1rem;align-self:center;box-shadow:12px 12px 0 #d9e9e9}
.roadmap .eyebrow{color:#b4e4d1}
.roadmap ol{list-style:none;padding:0;margin:.5rem 0 0}
.roadmap li{border-top:1px solid #5c7f90;padding:.78rem 0}
.roadmap b,.roadmap li span{display:block}
.roadmap li span{color:#d4e6ee;font-size:.9rem}
.stat{display:flex;align-items:baseline;gap:.65rem;border-top:1px solid #5c7f90;padding-top:.7rem}
.stat strong{font-size:2rem}
.grid{display:grid;gap:1.2rem}
.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.card{border:1px solid var(--line);padding:1.5rem;border-radius:.75rem;background:white}
.card h3{margin-top:.8rem}
.tag{font-size:.65rem;font-weight:800;letter-spacing:.08em;color:var(--green)}
.band{padding:1.8rem;border-left:5px solid var(--green);background:#e5f2ec;border-radius:.5rem}
.band p{max-width:90ch}
.module{border:1px solid var(--line);border-radius:.6rem;margin:1rem 0;background:white;scroll-margin-top:1rem;overflow:clip}
.module summary{display:flex;align-items:center;gap:1rem;padding:1.25rem;cursor:pointer;list-style:none}
.module summary:before{content:'+';font-size:1.5rem;color:var(--blue);order:3;margin-left:auto}
.module details[open]>summary:before{content:'−'}
.module summary strong{display:block;font-size:1.15rem;line-height:1.35}
.num{font-size:1.2rem;font-weight:800;background:var(--soft);border-radius:.5rem;padding:.5rem;color:var(--blue)}
.meta,.muted,.refs{font-size:.82rem;color:var(--muted)}
.meta{display:block;margin-bottom:.35rem}
.lesson{padding:0 1.5rem 1.5rem;max-width:95ch}
.goal{background:var(--soft);padding:1rem;border-radius:.4rem}
.lesson aside,.notice{padding:1rem;background:var(--amber);border-left:4px solid #a45b05;margin:1rem 0}
.lesson aside p{margin-bottom:0}
.completion{display:flex;align-items:center;gap:.7rem;padding:.7rem 1.5rem;border-top:1px solid var(--line);font-size:.9rem;background:#f7fbfc}
.tools{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:1rem;background:var(--soft);padding:1.25rem;border-radius:.7rem}
.tools label{font-weight:650;font-size:.9rem}
.tools button{justify-self:start}
.tools p{margin:0}
.progressbox{padding:1.2rem;border:1px solid var(--line);border-radius:.6rem;margin:1.5rem 0}
.progressbox label{display:block;font-weight:700}
progress{display:block;width:100%;max-width:100%;height:1.2rem;accent-color:var(--green);margin:.7rem 0}
.case{margin:1.5rem 0}
.case h2{font-size:1.5rem}
.pagehead{padding-bottom:1.2rem;border-bottom:1px solid var(--line)}

/* Tables & Answer Lines */
.tablewrap{display:block;width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:.5rem;background:white;margin:.7rem 0}
table{width:100%;border-collapse:collapse;font-size:.9rem}
.tablewrap>table{margin:0}
th,td{padding:.75rem;border:1px solid var(--line);vertical-align:top;text-align:left}
th{background:var(--soft)}
caption{text-align:left;font-weight:700;padding:.55rem .75rem .25rem;margin-bottom:0}
.answer-line{display:block;width:100%;max-width:100%;height:1.35em;border-bottom:1.5px solid #69828d;margin:.15rem 0 .35rem}
.fill-line{display:inline-block;width:min(10rem,45vw);max-width:100%;height:1em;border-bottom:1.5px solid #69828d;vertical-align:baseline;margin:0 .15rem}

fieldset{margin:1.5rem 0;border:1px solid var(--line);padding:1.1rem;border-radius:.5rem;min-width:0}
legend{font-weight:700;max-width:100%;padding:0 .4rem}
.option{display:flex;align-items:center;gap:.7rem;padding:.65rem;margin:.4rem 0;background:var(--soft);border-radius:.3rem}
.feedback{padding:.8rem;background:#fff4da}
.correct .feedback{background:#e5f2ec}
.source{border-bottom:1px solid var(--line);padding:1.5rem 0;scroll-margin-top:1rem}
.source h2{font-size:1.2rem}
.source a{overflow-wrap:anywhere}
details.card summary{font-weight:750;cursor:pointer}
footer{background:var(--deep);color:#e4edf1;padding:2rem max(2rem,calc((100vw - 1170px)/2));display:flex;justify-content:space-between;gap:2rem;font-size:.8rem;margin-top:3rem}
footer nav{max-width:25rem;align-content:start}
footer a{color:white}
footer p{margin:.5rem 0}
li{margin:.5rem 0}

@media(max-width:950px){
  .hero{gap:2rem}
  .three{grid-template-columns:1fr}
  .card p{max-width:80ch}
}
@media(max-width:860px){
  .nav{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:.55rem 1rem;gap:.45rem}
  .nav-utils{order:0;margin-left:auto;gap:.28rem}
  .util-lbl{display:none}
  .util-btn{padding:.34rem .5rem;font-size:.84rem}
  .menu-toggle{display:inline-flex;align-items:center;gap:.35rem;background:white;color:var(--deep);border:1.5px solid var(--line);border-radius:.42rem;padding:.34rem .68rem;font-size:.84rem;font-weight:700}
  .menu-toggle:hover{background:var(--soft);color:var(--deep)}
  .menu-toggle[aria-expanded=true]{background:var(--deep);color:white;border-color:var(--deep)}
  .nav nav{order:3;display:none;flex-basis:100%;border-top:1px solid var(--line);padding-top:.55rem;margin-top:.2rem;gap:.25rem .9rem;flex-direction:row;flex-wrap:wrap}
  .nav nav.is-open{display:flex}
  .nav nav a{padding:.35rem .15rem;font-size:.9rem;flex:1 1 9rem;border-bottom-width:2px}
}
@media(scripting:none){
  .menu-toggle{display:none}
  .nav nav{display:flex}
}
@media(max-width:650px){
  :root{font-size:17px}
  main{padding:0 1rem}
  h1,h2,h3,h4{hyphens:auto;-webkit-hyphens:auto}
  h1{font-size:clamp(1.48rem,6.1vw,2rem);margin:.5rem 0 .85rem}
  h2{font-size:clamp(1.22rem,4.9vw,1.55rem)}
  .pagehead{padding-bottom:.9rem}
  .hero{grid-template-columns:1fr;padding:1.5rem 0}
  .roadmap{box-shadow:none;padding:1.25rem}
  .two,.tools{grid-template-columns:1fr}
  .band{padding:1.1rem .95rem}
  .module summary{padding:.9rem;gap:.7rem}
  .lesson{padding:0 1rem 1rem}
  .module summary strong{font-size:1.05rem}
  .meta{font-size:.75rem}
  .hr-table th,.hr-table td,.matrix th,.matrix td,th,td{padding:.48rem .55rem;font-size:.83rem}
  .matrix td:first-child{white-space:normal}
  footer{flex-direction:column;padding:1.5rem 1rem}
  section{padding:1.5rem 0}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
@page{margin:16mm}
@media print{
  header,footer,.skip,.tools,.progressbox,.completion,button,.actions{display:none!important}
  body{background:white;color:black;font-size:11pt}
  main{max-width:none;padding:0}
  section{padding:1rem 0}
  h1{font-size:24pt}
  h2{font-size:18pt}
  h3{font-size:13pt}
  .hero,.grid{display:block}
  .roadmap{background:white;color:black;border:1px solid black;box-shadow:none}
  .roadmap li span,.roadmap .eyebrow{color:black}
  .card,.module,fieldset{box-shadow:none;border:1px solid #777;margin:1rem 0}
  .module details::details-content{content-visibility:visible}
  .module details:not([open])>.lesson{display:block!important}
  a{color:black}
  p,li{orphans:3;widows:3}
  h2,h3,summary{break-after:avoid}
  .tablewrap{overflow:visible;border:0}
  .notice{background:white;border:1px solid black}
  .answer-line,.fill-line{border-bottom-color:#333}
}

.hr-overview{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:2rem;align-items:start}
.hr-route h2{font-size:1.3rem}
.hr-entry{border-top:5px solid var(--green)}
.hr-tasks{padding-left:1.5rem}
.hr-tasks li{padding:.35rem 0}
.hr-section-title{font-size:1.18rem;margin:1.7rem 0 .7rem}
.hr-route ol{padding-left:1.3rem}
@media(max-width:850px){.hr-overview{grid-template-columns:minmax(0,1fr)}}
@media print{.hr-overview{display:block}.hr-section-title{font-size:13pt}.hr-tasks li{break-inside:avoid}}

.lesson-page{max-width:79ch}
.lesson-page h2{margin-top:2.25rem}
.jump{display:flex;gap:1rem;flex-wrap:wrap;margin:1.25rem 0}
.terms{display:grid;grid-template-columns:minmax(7rem,1fr) minmax(0,2fr);gap:.65rem 1rem;background:var(--soft);padding:1rem;border-radius:.5rem}
.terms dt{font-weight:750}
.terms dd{margin:0}
.answer,.depth{border:1px solid var(--line);border-radius:.55rem;padding:.85rem 1rem;background:white;margin:.85rem 0}
.answer summary,.depth summary{cursor:pointer;font-weight:700;color:var(--deep)}
.depth[open]>summary{margin-bottom:.75rem;padding-bottom:.45rem;border-bottom:1px solid var(--line)}
.depth h3:first-of-type{margin-top:.2rem}
.flow{margin:1.5rem 0;padding:1.1rem;border:1px solid var(--line);background:var(--soft);border-radius:.6rem}
.flow figcaption{font-weight:780}
.flow ol{display:flex;align-items:stretch;gap:1.6rem;padding:0;list-style:none}
.flow li{background:white;border:1px solid var(--line);padding:.65rem;border-radius:.4rem;flex:1;position:relative}
.flow li:not(:last-child)::after{content:'→';position:absolute;right:-1.35rem;color:var(--blue);font-weight:750}
.depth h2,.depth h3{font-size:1.18rem}
.module,.case{scroll-margin-top:1rem}
@media(max-width:650px){
  .terms{grid-template-columns:1fr;gap:.25rem}
  .terms dd{margin-bottom:.7rem}
  .flow ol{display:block}
  .flow li:not(:last-child)::after{content:none}
}
@media print{.jump{display:none}.flow,.case h2,.case h3{break-after:avoid}.answer,.depth{padding:.5rem}.flow ol{display:block}.flow li:not(:last-child)::after{content:none}}

/* ===== Lernplattform-Komponenten ===== */
:root{--red:#9b2c1f;--redsoft:#fbeae7;--violet:#4b3b8f;--violetsoft:#efedf9;--greensoft:#e5f2ec;--bluesoft:#e6f1f7}
.badges{display:flex;flex-wrap:wrap;gap:.45rem;margin:.7rem 0 0;padding:0;list-style:none}
.badges li{margin:0;font-size:.78rem;font-weight:650;padding:.24rem .6rem;border-radius:2rem;background:var(--soft);border:1px solid var(--line);color:var(--deep)}
.badges li.lvl-Grundlagen{background:var(--greensoft)}
.badges li.lvl-Aufbau{background:var(--bluesoft)}
.badges li.lvl-Vertiefung{background:var(--violetsoft)}

.toc{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(13rem,100%),1fr));gap:.35rem 1rem;margin:.75rem 0 0;padding:.85rem 1rem;background:var(--soft);border-radius:.6rem;list-style:none;counter-reset:toc}
.toc li{margin:0;font-size:.86rem;counter-increment:toc}
.toc li::before{content:counter(toc) ". ";font-weight:700;color:var(--muted)}
.module-body{margin-top:.65rem}
.lesson-v6{max-width:80ch}
.lesson-v6>section{padding:1.45rem 0;border-bottom:1px solid var(--line)}
.lesson-v6 h2 .n{display:inline;min-width:0;padding-right:0;margin-right:.32em;color:var(--green)}
@media(min-width:1020px){
  .module-body{display:grid;grid-template-columns:minmax(0,41rem) 19rem;gap:2.2rem;align-items:start;justify-content:start}
  .module-body>.lesson-v6{grid-column:1;grid-row:1;max-width:none;width:100%}
  .module-body>.lesson-v6 p{max-width:68ch}
  .module-body>.toc{grid-column:2;grid-row:1;position:sticky;top:1rem;display:block;margin:.25rem 0 1.5rem;padding:.95rem 1.05rem;border:1px solid var(--line);border-radius:.65rem;background:var(--soft);max-height:calc(100vh - 2rem);overflow-y:auto}
  .module-body>.toc::before{content:"INHALTSVERZEICHNIS";display:block;font-size:.7rem;font-weight:800;letter-spacing:.12em;color:var(--green);margin-bottom:.5rem}
  .module-body>.toc li{padding:.22rem 0 .22rem .5rem;font-size:.83rem;line-height:1.38;border-left:3px solid transparent}
  .module-body>.toc li.is-active{border-left-color:var(--green)}
  .module-body>.toc a{text-decoration:none;color:var(--ink)}
  .module-body>.toc a:hover{color:var(--blue);text-decoration:underline}
  .module-body>.toc a.is-active{color:var(--deep);font-weight:750}
}
@media(max-width:650px){
  .toc{grid-template-columns:1fr;padding:.75rem .9rem}
  .lesson-v6>section{padding:1.15rem 0}
}

.law{border:1px solid var(--line);border-left-width:6px;border-radius:.5rem;padding:.8rem 1rem;margin:.9rem 0;background:white}
.law h3{margin:.2rem 0 .4rem;font-size:1.05rem}
.law p{margin:.3rem 0}
.law.R{border-left-color:var(--blue)}
.law.T{border-left-color:var(--green)}
.law.E{border-left-color:#a45b05}
.kind{display:inline-block;font-size:.68rem;letter-spacing:.08em;font-weight:800;text-transform:uppercase;padding:.15rem .5rem;border-radius:.3rem;margin-right:.4rem;vertical-align:middle}
.kind.R{background:var(--bluesoft);color:#064a68}
.kind.T{background:var(--greensoft);color:#0f4d35}
.kind.E{background:var(--amber);color:#6e3c02}
.legend{font-size:.85rem;color:var(--muted)}
.example{background:var(--bluesoft);border-radius:.6rem;padding:1rem 1.2rem}
.example h3{margin-top:0}
.mistakes li::marker{content:"✗  ";color:var(--red)}
.merk{background:var(--greensoft);border-radius:.6rem;padding:1rem 1.2rem;border-left:5px solid var(--green)}
.merk ul{margin:.3rem 0;padding-left:1.2rem}
.merk li::marker{content:"✓  ";color:var(--green)}
.task{border:2px solid var(--deep);border-radius:.6rem;padding:1rem 1.2rem;background:white}
.task ol{padding-left:1.4rem}
.pts{font-weight:750;color:var(--deep);white-space:nowrap}
.solution{border:1px dashed var(--green);border-radius:.6rem;padding:.8rem 1rem;background:#fbfefc;margin:1rem 0}
.solution>summary{cursor:pointer;font-weight:750;color:var(--green)}
.teachmode .solution,.teachmode [data-solution]{display:none!important}
.teach-banner{background:var(--violetsoft);border-left:5px solid var(--violet);padding:.65rem .9rem;border-radius:.4rem;margin:.6rem 0}

/* Kompakte Status- und Speicherleiste */
.statusbox{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.45rem .8rem;padding:.46rem .85rem;border:1px solid var(--line);border-radius:.5rem;background:#f7fbfc;margin:.6rem 0 .35rem;font-size:.86rem}
.statusbox p{margin:0;flex:1 1 auto}
.statusbox .status-actions{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}
button.small,.button.small{padding:.36rem .72rem;font-size:.84rem}
button.ghost{background:white;color:var(--blue)}
button.ghost:hover{color:white}
button[aria-pressed=true]{background:var(--green);border-color:var(--green);color:white}
button[aria-pressed=true]:hover{background:#0f4d35;border-color:#0f4d35;color:white}
.storage{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.45rem .8rem;border:1px solid var(--line);border-radius:.5rem;padding:.42rem .85rem;margin:.35rem 0 .75rem;background:var(--soft);font-size:.84rem}
.storage-info{flex:1 1 auto}
.storage-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem}
.storage-msg{color:var(--green);font-weight:700}
@media(max-width:650px){
  .statusbox,.storage{padding:.42rem .65rem;font-size:.81rem;gap:.35rem .5rem}
  button.small,.button.small{padding:.32rem .6rem;font-size:.8rem}
}

/* Quiz */
.q{border:1px solid var(--line);border-radius:.6rem;padding:1rem 1.1rem;margin:1.1rem 0;background:white}
.q legend,.q .qtext{font-weight:700;padding:0}
.q .qmeta{font-size:.78rem;color:var(--muted);margin:.1rem 0 .5rem;display:block}
.q .hint{font-size:.82rem;color:var(--violet);font-weight:650;margin:.2rem 0 .4rem}
.q fieldset{border:0;padding:0;margin:0}
.q .match{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.5rem 1rem;align-items:center;margin:.5rem 0}
.q .match select{display:block;width:100%;padding:.5rem;border:1px solid #69828d;border-radius:.35rem;background:white;font:inherit;font-size:.92rem}
.q textarea{width:100%;min-height:5rem;font:inherit;padding:.6rem;border:1px solid #69828d;border-radius:.35rem}
.q.ok{border-color:var(--green);background:#f6fbf8}
.q.bad{border-color:var(--red);background:#fffafa}
.q.part{border-color:#a45b05}
.q .fb{margin-top:.6rem;padding:.7rem .9rem;border-radius:.4rem;background:var(--amber)}
.q.ok .fb{background:var(--greensoft)}
.q.bad .fb{background:var(--redsoft)}
.q .fb p{margin:.25rem 0}
.q .sol{font-weight:650}
.opt-ok{outline:2px solid var(--green);border-radius:.3rem}
.opt-bad{outline:2px solid var(--red);border-radius:.3rem}
.selfrate{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.5rem}
.quizbar{position:sticky;top:0;z-index:5;background:white;border-bottom:1px solid var(--line);padding:.6rem 0;display:flex;flex-wrap:wrap;gap:1rem;align-items:center}
.quizbar progress{flex:1 1 12rem;margin:0}
.timer{font-variant-numeric:tabular-nums;font-weight:750}
.timer.low{color:var(--red)}
.config{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(14rem,100%),1fr));gap:1rem;background:var(--soft);padding:1.2rem;border-radius:.7rem}
.config label{font-weight:650;font-size:.92rem}
.config select{margin-top:.3rem}
.config fieldset{margin:0;border:0;padding:0}
.config .check{display:flex;gap:.5rem;align-items:center;font-weight:500}
.result{border:2px solid var(--deep);border-radius:.7rem;padding:1.2rem;margin:1.2rem 0;background:white}
.result:focus{outline:3px solid #9a4900}
.bar{height:.75rem;background:var(--soft);border-radius:1rem;overflow:hidden;min-width:4rem}
.bar span{display:block;height:100%;background:var(--green)}
.bar.warn span{background:#a45b05}
.bar.low span{background:var(--red)}

/* Lernkarten */
.cardbox{max-width:44rem;margin:1.2rem auto}
.flashcard{width:100%;text-align:left;min-height:15rem;border:2px solid var(--deep);border-radius:1rem;padding:1.6rem;background:white;color:var(--ink);font-weight:450;display:flex;flex-direction:column;justify-content:center;box-shadow:8px 8px 0 #d9e9e9}
.flashcard:hover{background:#f5fafb;color:var(--ink)}
.flashcard .side{font-size:.75rem;letter-spacing:.12em;font-weight:800;color:var(--green);margin-bottom:.6rem}
.flashcard .front{font-size:1.25rem;font-weight:700;color:var(--deep)}
.flashcard .back{font-size:1.05rem;font-weight:500;color:var(--deep);line-height:1.6}
.flashcard.flipped{background:var(--greensoft);color:var(--deep);border-color:var(--green)}
.flashcard.flipped:hover{background:#d6ece1;color:var(--deep)}
.cardnav{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:center;margin:1rem 0}
.cardmeta{display:flex;justify-content:space-between;font-size:.85rem;color:var(--muted);flex-wrap:wrap;gap:.5rem}

/* Startseite & Übersichtskarten */
.mgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(17rem,100%),1fr));gap:1rem}
.course-picker .course-grid{grid-template-columns:minmax(0,1fr);max-width:40rem;width:100%}
.course-picker .course-title{font-size:clamp(1.15rem,2.4vw,1.55rem);line-height:1.25;hyphens:none;-webkit-hyphens:none;overflow-wrap:normal;word-break:normal}
.course-picker .course-title a{hyphens:none;-webkit-hyphens:none;overflow-wrap:normal;word-break:normal}
.mcard{border:1px solid var(--line);border-radius:.7rem;padding:1.1rem;background:white;display:flex;flex-direction:column}
.mcard h3{margin:.2rem 0 .4rem;font-size:1.12rem}
.mcard p{font-size:.92rem;margin:.3rem 0}
.mcard .badges li{font-size:.72rem}
.mcard .state{margin-top:auto;padding-top:.6rem;font-size:.82rem;font-weight:700;color:var(--green)}

.paths-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.pathcard{border-top:6px solid var(--blue)}
.pathcard.p-hr{border-top-color:var(--green)}
.pathcard.p-dsb{border-top-color:var(--violet)}
.pathcard.p-sec{border-top-color:#a45b05}
.pathcard.path-main{grid-column:1 / -1;border-top-width:7px;background:linear-gradient(180deg,#f4fbf8 0%,#ffffff 100%);display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:.6rem 1.8rem;align-items:center;padding:1.25rem 1.45rem}
.pathcard.path-main h3{font-size:1.32rem;margin:.25rem 0 .45rem}
.path-main-links{display:flex;flex-wrap:wrap;gap:.45rem;align-content:start}
.path-main-links a{font-size:.82rem;font-weight:700;padding:.28rem .6rem;border:1px solid var(--line);border-radius:.35rem;background:white;text-decoration:none;color:var(--deep)}
.path-main-links a:hover{border-color:var(--green);background:var(--greensoft)}

.hero6{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:2.5rem;padding:2.2rem 0 1.8rem;align-items:center}
.hero6 h1{font-size:clamp(1.65rem,3.2vw,2.45rem);margin:.4rem 0 .85rem}
.hero6 h1 span{display:inline;color:var(--green)}
.hero-quick{margin-top:1.1rem;padding:.85rem 1rem;border:1px solid var(--line);border-left:5px solid var(--green);border-radius:.6rem;background:white;max-width:68ch}
.hero-quick .eyebrow{margin:0 0 .5rem}
.quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
.quick-links a{display:flex;flex-direction:column;gap:.05rem;padding:.48rem .7rem;border:1px solid var(--line);border-radius:.45rem;background:var(--soft);text-decoration:none;color:var(--deep)}
.quick-links a:hover{border-color:var(--green);background:var(--greensoft)}
.quick-links strong{font-size:.88rem;line-height:1.25}
.quick-links span{font-size:.76rem;color:var(--muted)}
.extra-paths{margin-top:1.15rem;background:#fbfdfd}
.extra-paths .paths-sub{margin-top:.35rem}
@media(max-width:520px){.quick-links{grid-template-columns:1fr}}
.offer{list-style:none;padding:0;margin:0;display:grid;gap:.6rem}
.offer li{margin:0;padding:.7rem .9rem;border:1px solid var(--line);border-radius:.5rem;background:white}
.offer li a{font-weight:700}
.matrix td:first-child{white-space:nowrap}
.cov{font-weight:750}
.cov.full{color:var(--green)}
.cov.part{color:#8a4b02}
.cov.none{color:var(--red)}
.klausur-input{display:flex;align-items:center;gap:.5rem;margin:.3rem 0}
.klausur-input input{width:5rem;padding:.4rem;border:1px solid #69828d;border-radius:.3rem;font:inherit}
.case .meta{font-weight:650}
.small{font-size:.88rem}
@media(max-width:850px){
  .hero6{grid-template-columns:1fr;gap:1.5rem;padding:1.4rem 0}
  .q .match{grid-template-columns:1fr}
  .paths-grid{grid-template-columns:1fr}
  .pathcard.path-main{grid-template-columns:1fr;padding:1.1rem}
}
@media print{.toc,.statusbox,.storage,.quizbar,.cardnav,.selfrate,.no-print{display:none!important}.solution{display:none!important}.print-solutions .solution{display:block!important}.law,.example,.merk,.task{break-inside:avoid}.flashcard{box-shadow:none}}
progress.pbar{display:inline-block;width:8rem;height:.8rem;vertical-align:middle;margin:0 .4rem 0 0;accent-color:var(--green)}
progress.pbar.warn{accent-color:#a45b05}
progress.pbar.low{accent-color:var(--red)}
@media print{.sheet{break-before:page}.sheet:first-of-type{break-before:auto}}
code{background:var(--soft);padding:.1rem .3rem;border-radius:.2rem;font-size:.9em}

/* ===== HR-Prüfungs- und Verständnis-Erweiterungen ===== */
.teachmode .toc-sol,.teachmode .no-teach{display:none!important}
.hr-table{width:100%;border-collapse:collapse;font-size:.92rem;margin:.5rem 0}
.hr-table th,.hr-table td{padding:.65rem .75rem;border:1px solid var(--line);vertical-align:top;text-align:left}
.hr-table th{background:var(--soft);color:var(--deep);font-weight:750}
.hr-table td.num,.hr-table th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.hr-table tr.total-row td,.hr-table tr.total-row th{background:#f3f9fb;font-weight:750;border-top:2px solid var(--deep)}
.hr-table tr.ko-row td{background:var(--redsoft)}
.perm{display:inline-block;padding:.12rem .45rem;border-radius:.25rem;font-size:.82rem;font-weight:750;white-space:nowrap}
.perm-rw{background:var(--greensoft);color:#0f4d35}
.perm-r{background:var(--bluesoft);color:#064a68}
.perm-no{background:var(--redsoft);color:var(--red)}
.perm-part{background:var(--amber);color:#6e3c02}
figure.diagram{margin:1.25rem 0;padding:.9rem;border:1px solid var(--line);border-radius:.65rem;background:var(--soft);width:100%;max-width:100%;min-width:0;overflow:hidden}
figure.diagram figcaption{font-weight:750;color:var(--deep);margin-bottom:.65rem;font-size:.95rem}
figure.diagram svg{display:block;width:100%;height:auto;max-width:100%;min-width:0}
@media(max-width:650px){figure.diagram{padding:.6rem}}
.diag-box{fill:#ffffff;stroke:#075e83;stroke-width:2}
.diag-box-deep{fill:#09384e;stroke:#09384e;stroke-width:2}
.diag-box-green{fill:#e5f2ec;stroke:#146344;stroke-width:2}
.diag-box-warn{fill:#fff4da;stroke:#a45b05;stroke-width:2}
.diag-box-bad{fill:#fbeae7;stroke:#9b2c1f;stroke-width:2}
.diag-title{font-family:"Segoe UI",Arial,sans-serif;font-size:15px;font-weight:700;fill:#09384e}
.diag-title-inv{font-family:"Segoe UI",Arial,sans-serif;font-size:15px;font-weight:700;fill:#ffffff}
.diag-sub{font-family:"Segoe UI",Arial,sans-serif;font-size:12.5px;fill:#173446}
.diag-sub-inv{font-family:"Segoe UI",Arial,sans-serif;font-size:12.5px;fill:#e4edf1}
.diag-warn-txt{font-family:"Segoe UI",Arial,sans-serif;font-size:12.5px;font-weight:700;fill:#9b2c1f}
.diag-ok-txt{font-family:"Segoe UI",Arial,sans-serif;font-size:12.5px;font-weight:700;fill:#146344}
.diag-line{stroke:#075e83;stroke-width:2;fill:none}
.diag-line-bad{stroke:#9b2c1f;stroke-width:2;stroke-dasharray:5 4;fill:none}
.diag-line-green{stroke:#146344;stroke-width:2;fill:none}
.calc-box{border:1px solid var(--line);border-left:5px solid var(--blue);border-radius:.5rem;padding:.9rem 1.1rem;background:#fbfdfe;margin:.9rem 0}
.calc-box p{margin:.3rem 0}
.calc-line{display:flex;justify-content:space-between;gap:1rem;border-bottom:1px dashed var(--line);padding:.25rem 0;font-variant-numeric:tabular-nums}
.calc-line.calc-total{border-top:2px solid var(--deep);border-bottom:0;font-weight:750;margin-top:.35rem;padding-top:.45rem;color:var(--deep)}
.exam-model{border:1px solid var(--green);border-left:5px solid var(--green);border-radius:.55rem;padding:1rem 1.15rem;background:#f7fbf9;margin:1rem 0}
.exam-model h3,.exam-model h4{margin-top:0;color:var(--deep)}
.step-tag{display:inline-block;font-size:.72rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;background:var(--greensoft);color:#0f4d35;border:1px solid #9fd0bb;padding:.1rem .45rem;border-radius:.25rem;margin-right:.4rem}
.hb-note{border:1px solid var(--line);border-left:5px solid var(--violet);background:var(--violetsoft);padding:.9rem 1.1rem;border-radius:.5rem;margin:1rem 0}
.hb-note strong{color:var(--deep)}
.glossary-cat{margin-top:1.8rem;border-bottom:2px solid var(--line);padding-bottom:.35rem}
.gloss-meta{font-size:.75rem;font-weight:750;color:var(--muted);margin-left:.5rem}
.kbd-hint{font-size:.82rem;color:var(--muted)}
@media print{
  figure.diagram,.calc-box,.exam-model,.hb-note,.hr-table tr{break-inside:avoid}
  .diag-box-deep{fill:#edf5f7;stroke:#000}
  .diag-title-inv,.diag-sub-inv{fill:#000}
}
.hb-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:1rem;margin:1.1rem 0}
.hb-card{border:1px solid var(--line);border-top:5px solid var(--blue);border-radius:.6rem;padding:1.05rem 1.15rem;background:var(--paper);display:flex;flex-direction:column;justify-content:space-between;gap:.65rem}
.hb-card.hb2{border-top-color:#8a4b00}
.hb-card.hb3{border-top-color:var(--green)}
.hb-card.hb4{border-top-color:var(--violet)}
.hb-card.hbfg{border-top-color:#075e83}
.hb-card h3{margin:.15rem 0 .25rem}
.hb-pill{display:inline-block;font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;padding:.15rem .5rem;border-radius:.25rem;background:var(--bluesoft);color:var(--deep)}
.hb-card.hb2 .hb-pill{background:#fff4e2;color:#6c3a00}
.hb-card.hb3 .hb-pill{background:var(--greensoft);color:#0f4d35}
.hb-card.hb4 .hb-pill{background:var(--violetsoft);color:#42236e}

.subnav-wrap{background:#f3f8fa;border-top:1px solid var(--line)}
.subnav{max-width:1240px;margin:auto;padding:.45rem 2rem;display:flex;gap:.45rem .95rem;flex-wrap:wrap;align-items:center}
.subnav a{font-size:.82rem;font-weight:700;color:var(--deep);text-decoration:none;padding:.2rem .4rem;border-radius:.3rem}
.subnav a:hover{background:var(--bluesoft);text-decoration:underline}
.subnav a[aria-current=page]{background:var(--deep);color:#fff}
.subnav .subnav-lbl{font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--green);margin-right:.2rem}
@media(max-width:860px){
  .subnav{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:.42rem 1rem;gap:.35rem;white-space:nowrap}
  .subnav::-webkit-scrollbar{display:none}
  .subnav a,.subnav .subnav-lbl{flex:0 0 auto}
}
@media print{.subnav-wrap{display:none!important}}

/* ===== Suche, Lage-Einstieg, Nach-oben, Lesehilfe & Dunkelmodus ===== */
.quick-search{margin-top:1.05rem;padding:.8rem .95rem;border:1px solid var(--line);border-left:5px solid var(--green);border-radius:.6rem;background:var(--paper);max-width:68ch}
.quick-search label{display:block;font-size:.73rem;letter-spacing:.12em;font-weight:800;color:var(--green);margin-bottom:.42rem;text-transform:uppercase}
.quick-search form{display:block}
.quick-search-row{display:flex;gap:.45rem;align-items:stretch}
.quick-search input[type=search]{flex:1 1 auto;min-width:0;padding:.48rem .65rem;font-size:.92rem}
.quick-search .quick-results{margin-top:.65rem}
.quick-search .quick-foot{margin:.45rem 0 0;font-size:.82rem}
.quick-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;margin-bottom:.45rem}
.quick-list .mcard{padding:.65rem .8rem}
.quick-list .mcard h3{font-size:.94rem;margin:.12rem 0 .22rem}
.quick-list .mcard p:not(.tag){font-size:.8rem;margin:0}
.search-chips{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:.42rem}
.search-chips-lbl{font-size:.8rem;font-weight:750;color:var(--muted);margin-right:.15rem}
.chip-btn{padding:.28rem .72rem;border-radius:2rem;border:1.5px solid var(--line);background:var(--paper);color:var(--deep);font-size:.82rem;font-weight:650;line-height:1.25}
.chip-btn:hover{background:var(--greensoft);color:var(--deep);border-color:var(--green)}
.chip-btn[aria-pressed=true]{background:var(--green);color:#fff;border-color:var(--green)}
.search-results-wrap{margin-top:1.2rem}
.situation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.pathcard.p-blue{border-top-color:var(--blue)}
.sit-links{display:flex;flex-wrap:wrap;gap:.45rem .85rem;margin-top:auto;padding-top:.6rem;font-size:.85rem;font-weight:700}
@media(max-width:750px){.situation-grid,.quick-list{grid-template-columns:1fr}}

.to-top{position:fixed;right:1.1rem;bottom:1.1rem;z-index:40;display:inline-flex;align-items:center;gap:.3rem;padding:.52rem .88rem;border-radius:2rem;border:1.5px solid var(--deep);background:var(--deep);color:#fff;font-size:.83rem;font-weight:750;box-shadow:0 4px 14px rgba(9,56,78,.24)}
.to-top:hover{background:var(--blue);border-color:var(--blue)}
@media(max-width:650px){.to-top span{display:none}.to-top{right:.85rem;bottom:.85rem;padding:.52rem .82rem}}
@media print{.to-top{display:none!important}}
.footer-partner{color:#d4e6ee;opacity:.95}

/* Lesehilfe (größere Schrift) */
html.font-lg{font-size:21px;line-height:1.72}
@media(max-width:650px){html.font-lg{font-size:19.5px}}

/* Dunkelmodus */
html.theme-dark{--ink:#e4eef3;--muted:#a8bec9;--blue:#64c3eb;--deep:#edf6fa;--green:#5ad09b;--soft:#1b2a36;--line:#2f4757;--paper:#16222c;--amber:#342812;--red:#f07b6d;--redsoft:#3b1e1d;--violet:#b5a7f5;--violetsoft:#262040;--greensoft:#173529;--bluesoft:#152e3d}
html.theme-dark body{background:#0f1820;color:var(--ink)}
html.theme-dark header{background:#131f29;border-bottom-color:var(--line)}
html.theme-dark .subnav-wrap{background:#101b24;border-top-color:var(--line)}
html.theme-dark .subnav a:hover{background:var(--bluesoft)}
html.theme-dark .subnav a[aria-current=page]{background:var(--blue);color:#09141b}
html.theme-dark .util-btn,html.theme-dark .menu-toggle{background:#1a2935;color:var(--ink);border-color:var(--line)}
html.theme-dark .util-btn:hover,html.theme-dark .menu-toggle:hover{background:#233747;color:#fff}
html.theme-dark .util-btn[aria-pressed=true],html.theme-dark .util-btn[aria-current=page],html.theme-dark .menu-toggle[aria-expanded=true]{background:var(--blue);color:#09141b;border-color:var(--blue)}
html.theme-dark button,html.theme-dark .button{background:#12719b;border-color:#2c8fb8;color:#fff}
html.theme-dark button:hover,html.theme-dark .button:hover{background:#0b5272}
html.theme-dark .secondary,html.theme-dark button.ghost{background:#1a2935;color:var(--blue);border-color:var(--line)}
html.theme-dark .secondary:hover,html.theme-dark button.ghost:hover{background:#233747;color:#fff}
html.theme-dark .chip-btn{background:#1a2935;color:var(--ink);border-color:var(--line)}
html.theme-dark .chip-btn:hover{background:var(--greensoft);color:#fff;border-color:var(--green)}
html.theme-dark button[aria-pressed=true],html.theme-dark .chip-btn[aria-pressed=true]{background:#1b7a55;border-color:#5ad09b;color:#fff}
html.theme-dark .card,html.theme-dark .mcard,html.theme-dark .hb-card,html.theme-dark .law,html.theme-dark .task,html.theme-dark .answer,html.theme-dark .depth,html.theme-dark .tablewrap,html.theme-dark .q,html.theme-dark .result,html.theme-dark .flashcard,html.theme-dark .offer li,html.theme-dark .quick-search,html.theme-dark .module,html.theme-dark .quizbar{background:var(--paper);border-color:var(--line)}
html.theme-dark .band,html.theme-dark .solution{background:#142820;border-color:var(--green)}
html.theme-dark .statusbox,html.theme-dark .completion{background:#15242f;border-color:var(--line)}
html.theme-dark .calc-box,html.theme-dark .exam-model{background:#190031;border-color:var(--line)}
html.theme-dark .extra-paths{background:#13202a}
html.theme-dark .pathcard.path-main{background:linear-gradient(180deg,#162b24 0%,#16222c 100%)}
html.theme-dark .path-main-links a{background:#1b2a36;color:var(--ink);border-color:var(--line)}
html.theme-dark .path-main-links a:hover{background:var(--greensoft);border-color:var(--green)}
html.theme-dark .hr-table tr.total-row td,html.theme-dark .hr-table tr.total-row th{background:#1c2e3a}
html.theme-dark .flow li{background:#16222c}
html.theme-dark .q.ok{background:#142a21;border-color:var(--green)}
html.theme-dark .q.bad{background:#2f1919;border-color:var(--red)}
html.theme-dark .flashcard{box-shadow:8px 8px 0 #1f3340;color:var(--ink)}
html.theme-dark .flashcard:hover{background:#1b2a36}
html.theme-dark .flashcard.flipped{background:var(--greensoft);color:var(--ink)}
html.theme-dark .flashcard.flipped:hover{background:#1f4435}
html.theme-dark input[type=search],html.theme-dark select,html.theme-dark textarea,html.theme-dark .klausur-input input{background:#101a22;color:var(--ink);border-color:#486375}
/* Native selects inside matching questions have a more specific light-mode background. Override it explicitly in dark mode, including the popup options. */
html.theme-dark .q .match select,html.theme-dark .config select{background-color:#101a22;color:#e4eef3;border-color:#486375;color-scheme:dark}
html.theme-dark select option{background-color:#101a22;color:#e4eef3}
html.theme-dark select option:disabled{color:#a8bec9}
html:not(.theme-dark) select{color-scheme:light}
html:not(.theme-dark) select option{background-color:#fff;color:#173446}
html.theme-dark .roadmap{background:#0b151d;border:1px solid var(--line);box-shadow:12px 12px 0 #1b2c37}
html.theme-dark footer{background:#091118;border-top:1px solid var(--line)}
html.theme-dark .to-top{background:#12719b;border-color:#64c3eb;color:#fff;box-shadow:0 4px 14px rgba(0,0,0,.45)}
html.theme-dark .kind.R{color:#9fdbf5}
html.theme-dark .kind.T{color:#92e6be}
html.theme-dark .kind.E{color:#ffd58a}
html.theme-dark .cov.part{color:#f5b762}
html.theme-dark .perm-rw{color:#92e6be}
html.theme-dark .perm-r{color:#9fdbf5}
html.theme-dark .perm-part{color:#ffd58a}
html.theme-dark figure.diagram{background:#14212b}
html.theme-dark .diag-box{fill:#1c2c38;stroke:#64c3eb}
html.theme-dark .diag-box-deep{fill:#0e4159;stroke:#64c3eb}
html.theme-dark .diag-box-green{fill:#173529;stroke:#5ad09b}
html.theme-dark .diag-box-warn{fill:#352811;stroke:#e0a143}
html.theme-dark .diag-box-bad{fill:#3b1e1d;stroke:#f07b6d}
html.theme-dark .diag-title{fill:#edf6fa}
html.theme-dark .diag-sub{fill:#d0e0e8}
html.theme-dark .diag-ok-txt{fill:#73e6af}
html.theme-dark .diag-warn-txt{fill:#ff9b8e}
html.theme-dark .diag-line{stroke:#64c3eb}
html.theme-dark .diag-line-green{stroke:#5ad09b}
html.theme-dark .diag-line-bad{stroke:#ff9b8e}
@media print{
  html.theme-dark body,html.theme-dark .card,html.theme-dark .mcard,html.theme-dark .law,html.theme-dark .task,html.theme-dark .band{background:white!important;color:black!important}
}

