/* Layout: breite Inhaltsspalte mit Kartenrastern, Lesespalte für Fließtext, klebender Kopf */
:root{
  --bg:#ffffff; --bg-soft:#f4f7f7; --surface:#ffffff; --fg:#111a1c; --muted:#5c6b6e;
  --line:#dde5e5; --accent:#0d7a72; --accent-ink:#0a5b55; --accent-soft:#e3f1ef; --warm:#c2683a;
  --font-ui:"Manrope","Segoe UI",system-ui,sans-serif;
  --font-text:"Source Serif 4",Georgia,serif;
  --col:38rem; --r:14px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0d1214; --bg-soft:#121a1c; --surface:#151e20; --fg:#e8eeee; --muted:#9aacae;
  --line:#243033; --accent:#4fd1c0; --accent-ink:#8ee6da; --accent-soft:#132b29; --warm:#e09a6e;
  color-scheme:dark;}}
:root[data-theme="dark"]{
  --bg:#0d1214; --bg-soft:#121a1c; --surface:#151e20; --fg:#e8eeee; --muted:#9aacae;
  --line:#243033; --accent:#4fd1c0; --accent-ink:#8ee6da; --accent-soft:#132b29; --warm:#e09a6e;
  color-scheme:dark;}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font-ui);
  font-size:1rem;line-height:1.6;-webkit-font-smoothing:antialiased}
.wrap{max-width:68rem;margin:0 auto;
  padding-left:max(16px,env(safe-area-inset-left,0px));
  padding-right:max(16px,env(safe-area-inset-right,0px))}
.wrap.narrow{max-width:50rem}

body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--bg)}
.site-head{position:sticky;top:env(safe-area-inset-top,0px);z-index:9;background:var(--bg);
  border-bottom:1px solid var(--line);backdrop-filter:saturate(1.2) blur(6px)}
.site-head .wrap{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.5rem;padding-block:.85rem}
.brand{display:flex;align-items:center;gap:.55rem;font-weight:800;font-size:1.02rem;
  letter-spacing:-.01em;text-decoration:none;color:var(--fg)}
.brand .dot{width:1.5rem;height:1.5rem;border-radius:7px;background:var(--accent);color:#fff;
  display:grid;place-items:center;font-size:.72rem;font-weight:800;letter-spacing:.02em}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .brand .dot{color:#07201e}}
:root[data-theme="dark"] .brand .dot{color:#07201e}
nav.main{margin-left:auto;display:flex;flex-wrap:wrap;gap:.2rem}
nav.main a{color:var(--muted);text-decoration:none;font-size:.9rem;font-weight:500;
  padding:.35rem .7rem;border-radius:999px}
nav.main a:hover{color:var(--fg);background:var(--bg-soft)}
nav.main a[aria-current="page"]{color:var(--accent-ink);background:var(--accent-soft)}

main .wrap{padding-block:2.75rem 3.5rem}
h1,h2,h3{font-family:var(--font-ui);font-weight:800;letter-spacing:-.02em;text-wrap:balance;line-height:1.15;margin:0}
h1{font-size:clamp(1.85rem,1.2rem+2.4vw,2.9rem)}
h2{font-size:clamp(1.25rem,1.05rem+.7vw,1.6rem);margin-top:3rem}
h3{font-size:1.05rem;font-weight:700;letter-spacing:-.01em;margin-top:1.8rem}
p{margin:1rem 0;max-width:var(--col)}
a{color:var(--accent-ink);text-underline-offset:.18em}
.eyebrow{font-size:.74rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  color:var(--accent);margin:0 0 .8rem}
.lede{font-size:clamp(1.05rem,1rem+.4vw,1.25rem);color:var(--muted);max-width:42rem;margin:1.1rem 0 0;line-height:1.55}
.meta{font-size:.84rem;color:var(--muted)}
hr.rule{border:0;border-top:1px solid var(--line);margin:3rem 0}

/* Fließtext */
.prose{font-family:var(--font-text);font-size:1.075rem;line-height:1.7}
.prose h2,.prose h3{font-family:var(--font-ui)}

/* Hero */
.hero{background:var(--bg-soft);border-bottom:1px solid var(--line)}
.hero .wrap{padding-block:3.5rem 3.25rem}
.hero .badges{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1.75rem}
.chip{font-size:.8rem;font-weight:600;padding:.35rem .75rem;border-radius:999px;
  background:var(--surface);border:1px solid var(--line);color:var(--muted);text-decoration:none}
.chip:hover{border-color:var(--accent);color:var(--accent-ink)}

/* Karten */
.grid{display:grid;gap:1rem;margin:1.75rem 0}
@media(min-width:46rem){.grid.two{grid-template-columns:repeat(2,1fr)}
.grid.three{grid-template-columns:repeat(3,1fr)}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:1.35rem 1.4rem;display:flex;flex-direction:column;gap:.5rem;min-width:0;
  text-decoration:none;color:inherit}
a.card:hover{border-color:var(--accent);transform:translateY(-1px)}
a.card{transition:border-color .15s,transform .15s}
.card .num{font-size:.73rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--accent)}
.card h3{margin:0;font-size:1.05rem}
.card p{margin:0;font-size:.94rem;color:var(--muted);max-width:none}
.card.feature{background:var(--accent-soft);border-color:transparent}

/* Beitragsliste */
.list{list-style:none;padding:0;margin:1.5rem 0 0;border-top:1px solid var(--line)}
.list li{border-bottom:1px solid var(--line)}
.list>li>a{display:grid;gap:.3rem;padding:1.25rem 0;text-decoration:none;color:inherit}
@media(min-width:52rem){.list>li>a{grid-template-columns:8.5rem minmax(0,1fr);gap:.3rem 1.75rem;align-items:baseline}
.list .side{grid-row:span 3}}
.list .side{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums;display:flex;flex-direction:column;gap:.2rem}
.list h3{margin:0;font-size:1.08rem}
.list>li>a:hover h3{color:var(--accent-ink)}
.list p{margin:0;color:var(--muted);font-size:.95rem;max-width:40rem}
.tag{display:inline-block;font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--accent);background:var(--accent-soft);padding:.15rem .5rem;border-radius:5px}
.ext::after{content:" \2197";font-weight:700}

/* Wissensbaum */
.tree{margin:2rem 0;display:flex;flex-direction:column;gap:.6rem}
.branch{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);overflow:hidden}
.branch>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:.9rem;
  padding:1rem 1.2rem;font-weight:700}
.branch>summary::-webkit-details-marker{display:none}
.branch>summary .step{flex:none;width:2rem;height:2rem;border-radius:9px;background:var(--accent-soft);
  color:var(--accent-ink);display:grid;place-items:center;font-size:.85rem;font-weight:800;font-variant-numeric:tabular-nums}
.branch>summary .caret{margin-left:auto;color:var(--muted);transition:transform .15s}
.branch[open]>summary .caret{transform:rotate(90deg)}
.branch[open]>summary{border-bottom:1px solid var(--line)}
.branch .leaves{padding:.4rem 1.2rem 1.1rem 4rem;display:flex;flex-direction:column;gap:.1rem}
.branch .leaves .q{padding:.55rem 0;border-bottom:1px dashed var(--line);font-size:.95rem}
.branch .leaves .q:last-child{border-bottom:0}
.branch .leaves .q a{text-decoration:none}
.branch .leaves .q a:hover{text-decoration:underline}
.branch .leaves .q span{color:var(--muted);display:block;font-size:.88rem}
.branch .sum{padding:.9rem 1.2rem .2rem 4rem;color:var(--muted);font-size:.95rem;max-width:42rem}

/* FAQ */
details.faq{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);margin-bottom:.6rem}
details.faq>summary{cursor:pointer;list-style:none;padding:1rem 2.6rem 1rem 1.2rem;position:relative;font-weight:600}
details.faq>summary::-webkit-details-marker{display:none}
details.faq>summary::after{content:"+";position:absolute;right:1.1rem;top:.85rem;font-size:1.3rem;
  color:var(--accent);line-height:1}
details.faq[open]>summary::after{content:"\2013"}
details.faq[open]>summary{color:var(--accent-ink)}
details.faq .answer{padding:0 1.2rem 1.1rem;font-family:var(--font-text);font-size:1.02rem}
details.faq .answer p:first-child{margin-top:0}
.filterbar{display:flex;flex-wrap:wrap;gap:.45rem;margin:1.75rem 0 1.25rem}
.filterbar button{font:inherit;font-size:.85rem;font-weight:600;cursor:pointer;padding:.4rem .85rem;
  border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--muted)}
.filterbar button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .filterbar button[aria-pressed="true"]{color:#07201e}}
:root[data-theme="dark"] .filterbar button[aria-pressed="true"]{color:#07201e}
input[type="search"]{font:inherit;padding:.55rem .85rem;border-radius:999px;border:1px solid var(--line);
  background:var(--surface);color:var(--fg);min-width:14rem;flex:1 1 14rem;max-width:22rem}

/* Tabelle Material */
.table-scroll{overflow-x:auto;max-width:100%;margin:1.5rem 0;border:1px solid var(--line);border-radius:var(--r)}
.doc .body,.doc .body>*{min-width:0;max-width:100%}
table{border-collapse:collapse;width:100%;min-width:34rem;font-size:.93rem}
th,td{text-align:left;padding:.8rem 1rem;border-bottom:1px solid var(--line);vertical-align:top}
th{font-size:.74rem;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);font-weight:700;background:var(--bg-soft)}
tr:last-child td{border-bottom:0}
td .ft{display:inline-block;font-size:.7rem;font-weight:800;letter-spacing:.05em;padding:.12rem .45rem;
  border-radius:5px;background:var(--accent-soft);color:var(--accent-ink)}
td small{color:var(--muted);display:block;margin-top:.2rem}
.num-col{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--muted)}

/* Hinweis */
.note{background:var(--bg-soft);border:1px solid var(--line);border-left:3px solid var(--warm);
  border-radius:0 var(--r) var(--r) 0;padding:1.05rem 1.25rem;margin:1.75rem 0;font-size:.94rem;max-width:44rem}
.note b{display:block;margin-bottom:.25rem}
.note p{margin:.5rem 0 0;max-width:none;font-size:.94rem}
.note code{font-size:.86em;background:var(--surface);padding:.1em .35em;border:1px solid var(--line);border-radius:4px}

/* Marginalspalte */
.doc{display:grid;grid-template-columns:1fr;gap:2rem}
@media(min-width:64rem){.doc{grid-template-columns:minmax(0,1fr) 12rem}
.doc>.margin{grid-column:2;grid-row:1;position:sticky;top:5.5rem;align-self:start}
.doc>.body{grid-column:1;grid-row:1;min-width:0}}
.margin{font-size:.84rem;color:var(--muted);border-left:2px solid var(--accent);padding-left:.9rem;
  display:flex;flex-direction:column;gap:.6rem}
.margin b{display:block;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--fg)}

.site-foot{border-top:1px solid var(--line);background:var(--bg-soft);margin-top:3.5rem}
.site-foot .wrap{padding-block:1.8rem 2.4rem;font-size:.86rem;color:var(--muted);
  display:flex;flex-wrap:wrap;gap:.6rem 1.4rem;align-items:baseline}
.site-foot a{color:var(--muted)}
.site-foot .spacer{margin-left:auto}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Klauseltext */
.klausel{border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:0 var(--r) var(--r) 0;
  padding:1.3rem 1.5rem;margin:1.75rem 0;background:var(--bg-soft)}
.klausel h2{margin-top:0;font-size:1.12rem}
.klausel h3{font-size:.95rem;margin-top:1.6rem;color:var(--accent-ink);letter-spacing:0}
.klausel ol[type="a"]{padding-left:1.4rem;margin:.6rem 0}
.klausel ol[type="a"] li{margin-bottom:.45rem}
.klausel .var{background:var(--accent-soft);border:1px dashed var(--accent);border-radius:4px;
  padding:0 .3em;font-family:var(--font-ui);font-weight:600;font-size:.92em}
.copybtn{font:inherit;font-family:var(--font-ui);font-size:.88rem;font-weight:600;cursor:pointer;
  padding:.5rem 1rem;border-radius:999px;border:1px solid var(--accent);background:var(--accent-soft);
  color:var(--accent-ink)}
.copybtn:hover{background:var(--accent);color:#fff}

/* Checklisten */
table.checkliste td.erl p{margin:.25rem 0;max-width:none}
table.checkliste td.erl p:first-child{margin-top:0}
table.checkliste td.erl p:last-child{margin-bottom:0}
table.checkliste td.check{text-align:center;font-size:1.2rem;color:var(--muted)}
table.checkliste td b{font-weight:700}
table.checkliste{min-width:46rem}
.list>li>.row{display:grid;gap:.3rem;padding:1.25rem 0}
@media(min-width:52rem){.list>li>.row{grid-template-columns:8.5rem minmax(0,1fr);gap:.3rem 1.75rem;align-items:baseline}}

/* Blog im Volltext */
.postlist{margin-top:2rem;display:flex;flex-direction:column}
.post{border-top:1px solid var(--line);padding:1.9rem 0}
.post:first-child{border-top:0;padding-top:.5rem}
.post-head{margin:0 0 .3rem;font-size:1.35rem;display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .7rem}
.post-head a{color:inherit;text-decoration:none}
.post-head a:hover{color:var(--accent-ink)}
.post-date{font-size:.82rem;font-weight:600;color:var(--muted);letter-spacing:.02em;
  font-variant-numeric:tabular-nums}
.permalink{font-family:var(--font-ui);font-size:.8rem;font-weight:700;color:var(--accent);
  text-decoration:none}
.permalink:hover{text-decoration:underline}
.post-body{margin-top:.6rem}
.post-body p:first-child{margin-top:.4rem}
.blognav{display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;
  border-top:1px solid var(--line);padding-top:1.4rem;margin-top:.5rem;
  font-family:var(--font-ui);font-size:.92rem;font-weight:600}
.blognav a{text-decoration:none}
.blognav a:hover{text-decoration:underline}
.blognav .neuer{margin-left:auto}

/* ---------------------------------------------------- Mobile Feinschliff */
/* Rasterspalte darf schrumpfen, damit breite Tabellen die Seite nicht aufziehen. */
.doc{grid-template-columns:minmax(0,1fr)}
.doc>*{min-width:0}
@media (min-width:64rem){.doc{grid-template-columns:minmax(0,1fr) 12rem}}

@media (max-width:40rem){
  /* Navigation als eine scrollbare Zeile statt drei Zeilen Umbruch */
  nav.main{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;
    gap:.1rem;padding-bottom:.1rem;scroll-padding-left:16px}
  nav.main::-webkit-scrollbar{display:none}
  nav.main a{white-space:nowrap;padding:.62rem .7rem;font-size:.92rem}
  .brand{padding-block:.3rem}
  /* Beschriftungen nicht unter 12px */
  .eyebrow{font-size:.78rem}
  .card .num,.list .side,.meta{font-size:.82rem}
  #skinpick-btn{padding:.5rem .7rem}
  /* Fußzeile: Ziele gro&szlig; genug zum Treffen */
  .site-foot a{display:inline-block;padding-block:.35rem}
}
table.technik{min-width:30rem}
table.technik td:first-child{width:34%}
table.technik td b{font-weight:700}

/* Bildergalerie */
.galerie{display:grid;gap:1rem;margin:2rem 0 .5rem}
@media(min-width:52rem){.galerie{grid-template-columns:repeat(2,1fr)}}
.galerie figure{margin:0;display:flex;flex-direction:column;gap:.5rem}
.galerie img{width:100%;height:auto;display:block;border-radius:var(--r);border:1px solid var(--line);
  background:var(--bg-soft);aspect-ratio:3/2;object-fit:cover}
.galerie figcaption{font-size:.82rem;color:var(--muted);line-height:1.45}

/* Blog nutzt die Seitenbreite: der Text läuft über die ganze Spalte, nicht in einem schmalen Band. */
.postlist .post-body p,
.postlist .post-body li,
.postlist .post-body blockquote,
.postlist .post-body ul,
.postlist .post-body ol{max-width:none}
.post-body{font-size:1.05rem}
.post .post-head{font-size:1.45rem}
.postlist{max-width:none}
/* Einzelbeitrag: Fließtext darf ebenfalls breiter laufen. */
.doc>.body .prose p,
.doc>.body .prose li,
.doc>.body .prose blockquote{max-width:52rem}

/* Stationen-Tabelle: auf schmalen Schirmen untereinander statt zweispaltig */
@media (max-width:40rem){
  table.technik{min-width:0;width:100%;display:block}
  table.technik tbody,table.technik tr,table.technik th,table.technik td{display:block;width:auto}
  table.technik tr{padding:.6rem 0;border-bottom:1px solid var(--line)}
  table.technik th{text-align:left;padding:0 0 .15rem}
  table.technik td{padding:0}
}

/* Letzte Sicherung gegen seitliches Wackeln auf schmalen Schirmen.
   clip statt hidden, damit sticky-Elemente weiter funktionieren. */
body{overflow-x:clip}
