:root{
  --bg:#f7f7f8;
  --card:#ffffff;
  --text:#111;
  --accent:#1a73e8;
  --muted:#666;
  --max-width:1024px;
}
html,body{height:100%;margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;font-size:16px;color:var(--text);background:var(--bg);}
.container{max-width:var(--max-width);margin:28px auto;padding:20px;}
header{display:flex;align-items:center;gap:20px;flex-wrap:wrap;}
.logo{flex:1;min-width:220px;}
.logo img{width:100%;max-width:420px;height:auto;display:block;border-radius:6px;}
nav{display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
nav a{display:inline-block;padding:10px 14px;border-radius:8px;color:var(--text);text-decoration:none;font-weight:600;background:transparent;}
nav a:hover{background:#eef6ff;color:var(--accent);}
.nav-bar{background:var(--card);padding:10px;border-radius:10px;box-shadow:0 1px 4px rgba(16,24,40,0.06);}
main{margin-top:20px;background:linear-gradient(180deg,rgba(255,255,255,0.8),rgba(255,255,255,0.95));padding:22px;border-radius:10px;box-shadow:0 6px 18px rgba(15,23,42,0.06);}
h1{margin:0 0 8px;font-size:20px;}
p.lead{color:var(--muted);line-height:1.6;margin:0 0 12px;}
.note{background:#fff7eb;border-left:4px solid #ffb020;padding:12px;border-radius:6px;color:#6a4a00;margin-top:12px;}
footer{margin-top:22px;color:var(--muted);font-size:14px;text-align:center;}

/* TOC & Blog-Layout: gilt ab jetzt IMMER, nicht nur unter 640px (war der Bug) */
.toc{width:220px;position:sticky;top:24px;background:var(--card);padding:12px;border-radius:8px;box-shadow:0 1px 6px rgba(0,0,0,0.06);font-size:14px;}
.toc strong{display:block;margin-bottom:8px;color:var(--muted);}
.toc nav a{display:block;padding:6px 0;color:var(--accent);text-decoration:none;}
.toc nav a:hover{text-decoration:underline;}
.article{display:flex;gap:24px;align-items:flex-start;}
article{flex:1;max-width:780px;padding:0 6px;background:transparent;}
article h1, article h2, article h3{scroll-margin-top:80px;}
article p{line-height:1.6;color:var(--text);}
.post-meta{color:var(--muted);font-size:14px;margin-bottom:12px;}

/* Ab hier: Sidebar klappt auf schmalen Screens unter den Artikel */
@media (max-width:900px){
  .article{flex-direction:column;}
  .toc{width:100%;position:relative;order:2;margin-top:10px;}
}

@media (max-width:640px){
  .container{margin:14px;padding:14px;}
  nav a{padding:8px 10px;font-size:15px;}
}
