/* =====================================================================
   b.obiaushv.de – komplettes Design. Lädt KEINE externen Ressourcen.
   Schriften: reiner System-Font-Stack (kein @font-face, keine CDNs).
   ===================================================================== */
:root{
  --bg:#0a0d10; --surface:#12171c; --surface-2:#171d24; --surface-3:#1d242b;
  --border:#242c34; --border-strong:#2f3944;
  --text:#eef2f5; --text-strong:#ffffff; --muted:#9aa7b1; --muted-2:#737f89;
  --accent:#ff7b00; --accent-rgb:255,123,0;
  --accent-hover:#ff9433; --accent-ink:#1a0d02;
  --accent-soft:rgba(var(--accent-rgb),.10);
  --radius:14px; --radius-sm:8px;
  --shadow:0 6px 20px -6px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.25);
  --shadow-lg:0 20px 48px -12px rgba(0,0,0,.55), 0 6px 16px rgba(0,0,0,.30);
  --font-sans:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --maxw:820px; --maxw-wide:980px;
  color-scheme:dark;
}
[data-theme="light"]{
  --bg:#f7f7f5; --surface:#ffffff; --surface-2:#fafaf8; --surface-3:#f2f2ef;
  --border:#e3e3de; --border-strong:#d4d4cd;
  --text:#2b2d31; --text-strong:#0e0f12; --muted:#5c6068; --muted-2:#7a7f88;
  --accent:#e66a00; --accent-rgb:230,106,0;
  --accent-hover:#ff7b00; --accent-ink:#ffffff;
  --accent-soft:rgba(var(--accent-rgb),.10);
  --shadow:0 6px 20px -6px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:0 20px 48px -12px rgba(0,0,0,.18), 0 6px 16px rgba(0,0,0,.08);
  color-scheme:light;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{scroll-behavior:smooth;scroll-padding-top:5.5rem;-webkit-text-size-adjust:100%;scrollbar-color:var(--border-strong) transparent}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-sans);font-size:17px;line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:hidden;transition:background .25s,color .25s}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(900px 480px at 85% -180px, rgba(var(--accent-rgb),.14), transparent 70%),radial-gradient(700px 400px at -15% 40%, rgba(var(--accent-rgb),.06), transparent 70%)}
::selection{background:var(--accent);color:var(--accent-ink)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:8px;border:2px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:var(--muted-2)}
a{color:var(--accent);text-decoration:none;transition:color .15s}
a:hover{color:var(--accent-hover)}
img{max-width:100%;height:auto;display:block}
button{font:inherit;cursor:pointer}
button:disabled{opacity:.5;cursor:not-allowed}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.skip{position:absolute;top:-100px;left:8px;padding:.6em 1em;background:var(--accent);color:var(--accent-ink);border-radius:var(--radius-sm);font-weight:600;z-index:1000}
.skip:focus{top:8px}
.wrap{max-width:var(--maxw-wide);margin:0 auto;padding:0 1.5rem}
@media (max-width:640px){.wrap{padding:0 1.125rem}}
.progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:60;pointer-events:none;opacity:0;transition:opacity .2s}
.progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent-hover));box-shadow:0 0 10px rgba(var(--accent-rgb),.6)}
.header{position:sticky;top:0;z-index:50;background:rgba(10,13,16,.82);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid var(--border);transition:box-shadow .25s,border-color .25s,background .25s}
[data-theme="light"] .header{background:rgba(247,247,245,.86)}
.header.scrolled{box-shadow:0 6px 24px -12px rgba(0,0,0,.65);border-bottom-color:var(--border-strong)}
.header-in{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1.5rem;max-width:var(--maxw-wide);margin:0 auto}
@media (max-width:640px){.header-in{padding:.65rem 1.125rem}}
.brand{display:flex;align-items:center;text-decoration:none;min-width:0;padding:.2rem 0}
.brand img{height:clamp(34px,5vw,44px);width:auto;transition:transform .25s}
#logo{display:inline-block}
#logo-dark{display:none}
[data-theme="light"] #logo{display:none}
[data-theme="light"] #logo-dark{display:inline-block}
.brand:hover img{transform:scale(1.03)}
.brand .fallback{font-weight:800;font-size:1.45rem;letter-spacing:-.02em;color:var(--text-strong);line-height:1.2;white-space:nowrap}
.brand .fallback .idot{position:relative;display:inline-block}
.brand .fallback .idot::after{content:"";position:absolute;left:50%;transform:translateX(-50%);top:-.32em;width:.42em;height:.42em;border-radius:50%;background:var(--accent);box-shadow:0 0 14px rgba(var(--accent-rgb),.55)}
.header-right{display:flex;align-items:center;gap:.5rem;flex-shrink:0}
.icon-btn{position:relative;width:38px;height:38px;border-radius:50%;border:1px solid var(--border);background:transparent;color:var(--text);display:grid;place-items:center;font-size:1.05rem;line-height:1;transition:all .15s;padding:0}
.icon-btn:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.icon-btn .badge{position:absolute;top:-4px;right:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:.65rem;font-weight:800;display:grid;place-items:center;line-height:1}
.live{display:inline-flex;align-items:center}
.live i{width:10px;height:10px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px rgba(var(--accent-rgb),.75);animation:breathe 2.6s ease-in-out infinite}
@keyframes breathe{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.68);opacity:.45}}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;padding:.6rem 1.1rem;border-radius:999px;border:1px solid transparent;font-weight:600;font-size:.925rem;text-decoration:none;transition:all .18s ease;white-space:nowrap;line-height:1.4;background:none;color:var(--text)}
.btn-primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--accent-ink);transform:translateY(-1px);box-shadow:0 6px 18px -4px rgba(var(--accent-rgb),.55)}
.btn-ghost{border-color:var(--border);color:var(--text)}
.btn-ghost:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.btn-sm{padding:.45rem .85rem;font-size:.85rem}
.hero{padding:2.5rem 0 1.25rem;position:relative}
@media (max-width:640px){.hero{padding:1.75rem 0 1rem}}
.kicker{display:inline-flex;align-items:center;color:var(--accent);font-weight:700;letter-spacing:.16em;text-transform:uppercase;font-size:.74rem;margin:0 0 1.15rem;padding:.35em .95em;background:var(--accent-soft);border:1px solid rgba(var(--accent-rgb),.25);border-radius:999px}
.hero h1{font-size:clamp(2rem,5.8vw,3.6rem);line-height:1.08;letter-spacing:-.028em;margin:0 0 1.15rem;font-weight:800;color:var(--text-strong);max-width:16ch;text-wrap:balance}
.hero h1 .mark{background:linear-gradient(180deg, transparent 58%, rgba(var(--accent-rgb),.40) 0);padding:0 .15em}
.hero .sub{color:var(--muted);font-size:clamp(1rem,1.6vw,1.14rem);line-height:1.7;max-width:56ch;margin:0 0 1.75rem;text-wrap:pretty}
.hero-actions{display:flex;flex-wrap:wrap;gap:.7rem}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin:1.75rem 0 1.1rem;padding-bottom:.85rem;border-bottom:1px solid var(--border)}
.section-head h2{margin:0;font-size:1.35rem;font-weight:700;letter-spacing:-.015em;color:var(--text-strong)}
.section-head .count{color:var(--muted);font-size:.85rem;font-weight:500;padding:.25em .75em;background:var(--surface);border:1px solid var(--border);border-radius:999px;white-space:nowrap}
.list-tools{display:flex;flex-direction:column;gap:.7rem;margin:0 0 1.25rem}
#search{background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:.65rem 1.15rem;color:var(--text);font:inherit;font-size:.95rem;width:100%;max-width:440px;transition:border-color .2s,box-shadow .2s}
#search:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.18)}
#search::placeholder{color:var(--muted-2)}
.tagbar{display:flex;flex-wrap:wrap;gap:.4rem}
.chip-btn{border:1px solid var(--border);background:transparent;color:var(--muted);border-radius:999px;padding:.3rem .8rem;font-size:.78rem;font-weight:600;cursor:pointer;transition:all .15s}
.chip-btn:hover{border-color:var(--accent);color:var(--accent)}
.chip-btn[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.empty{border:1px dashed var(--border-strong);border-radius:var(--radius);padding:2.25rem;text-align:center;color:var(--muted)}
.card{display:block;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.4rem 1.5rem;margin-bottom:.85rem;text-decoration:none;color:var(--text);transition:all .25s ease;position:relative;overflow:hidden}
.card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent);transform:scaleY(0);transform-origin:bottom;transition:transform .3s ease}
.card:hover{border-color:var(--accent);background:var(--surface-2);transform:translateX(4px)}
.card:hover::before{transform:scaleY(1)}
.card-meta{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;color:var(--muted);font-size:.82rem;margin-bottom:.7rem;font-variant-numeric:tabular-nums}
.card-meta .dot{width:3px;height:3px;border-radius:50%;background:var(--muted-2)}
.card-meta time{color:var(--accent);font-weight:600}
.card h3{margin:0 0 .55rem;font-size:1.2rem;line-height:1.35;letter-spacing:-.012em;font-weight:700;color:var(--text-strong);text-wrap:balance}
.card p{margin:0 0 .75rem;color:var(--muted);font-size:.95rem;line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;hyphens:auto}
.card .more{color:var(--accent);font-weight:600;font-size:.9rem;display:inline-flex;align-items:center;gap:.4rem;transition:gap .2s}
.card:hover .more{gap:.65rem}
.back{display:inline-flex;align-items:center;gap:.45rem;margin:2rem 0 1.4rem;color:var(--muted);font-size:.9rem;font-weight:500;text-decoration:none;border-bottom:1px solid transparent;transition:all .2s}
.back:hover{color:var(--accent);border-bottom-color:var(--accent)}
.article-head{margin-bottom:2rem}
.article-head .chips{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:1rem}
.chip{display:inline-block;font-size:.7rem;padding:.3em .8em;border:1px solid var(--border);border-radius:999px;color:var(--muted);font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.article-head h1{font-size:clamp(1.65rem,4.2vw,2.4rem);line-height:1.18;letter-spacing:-.022em;margin:0 0 .9rem;font-weight:800;color:var(--text-strong);max-width:24ch;text-wrap:balance}
.article-head .meta{color:var(--muted);font-size:.9rem;margin-bottom:1.3rem;font-variant-numeric:tabular-nums;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.updated-note{color:var(--accent);font-size:.85rem;font-style:italic;margin-top:.25rem}
.note{background:var(--surface-2);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--radius-sm);padding:1rem 1.2rem;color:var(--muted);font-size:.92rem;margin:0 0 1.75rem;line-height:1.6}
.note a{text-decoration:underline;text-underline-offset:2px}
.toc{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.85rem 1.1rem;margin:0 0 1.75rem;font-size:.92rem}
.toc summary{cursor:pointer;font-weight:700;color:var(--text-strong);letter-spacing:.02em;list-style:none;display:flex;align-items:center;gap:.55rem}
.toc summary::-webkit-details-marker{display:none}
.toc summary::before{content:"";width:.5em;height:.5em;flex-shrink:0;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);transform:rotate(-45deg);transition:transform .2s;margin-left:.1em}
.toc[open] summary::before{transform:rotate(45deg)}
.toc ol{margin:.75rem 0 .25rem;padding-left:1.25rem;display:grid;gap:.35rem}
.toc a{color:var(--muted);text-decoration:none}
.toc a:hover{color:var(--accent)}
.prose{max-width:var(--maxw);font-size:1.08rem;line-height:1.78;color:var(--text)}
.prose p{margin:0 0 1.25em;hyphens:auto;orphans:3;widows:3;text-wrap:pretty}
.prose .lead{font-size:1.3rem;font-weight:600;color:var(--text-strong);line-height:1.55;margin-bottom:1.5rem;padding-bottom:1.4rem;border-bottom:1px solid var(--border);letter-spacing:-.005em;hyphens:none}
.prose h2{position:relative;padding-left:1.15rem;margin:2.4em 0 .9em;font-size:1.3rem;font-weight:750;letter-spacing:-.012em;color:var(--text-strong);line-height:1.3;scroll-margin-top:5.5rem;text-wrap:balance;cursor:pointer}
.prose h2::before{content:"";position:absolute;left:0;top:.22em;bottom:.22em;width:4px;border-radius:2px;background:var(--accent);box-shadow:0 0 14px rgba(var(--accent-rgb),.45)}
.prose h2::after{content:"#";position:absolute;right:.5em;top:.22em;font-size:.8em;color:var(--accent);opacity:0;transition:opacity .2s;font-weight:400}
.prose h2:hover::after{opacity:1}
.prose > h2:first-child,.prose .toc + h2,.prose .lead + h2{margin-top:1.4em}
.highlight{border-left:3px solid var(--accent);background:linear-gradient(90deg, rgba(var(--accent-rgb),.11), transparent 75%);border-radius:0 var(--radius-sm) var(--radius-sm) 0;padding:.85em 1.15em .85em 2.25em;margin:1.5em 0;font-weight:600;font-size:1.08em;line-height:1.58;color:var(--text-strong);font-style:italic;position:relative;hyphens:auto}
.highlight::before{content:"\201C";position:absolute;left:.35em;top:-.15em;font-size:3.5em;line-height:1;color:var(--accent);opacity:.35;font-family:var(--font-serif);font-weight:700;pointer-events:none}
.prose strong{color:var(--text-strong);font-weight:700}
.prose a{text-decoration:underline;text-underline-offset:3px}
.figure{margin:2.25em 0;border:1px solid var(--border-strong);border-radius:var(--radius);overflow:hidden;background:var(--surface-3);box-shadow:var(--shadow);transition:transform .3s,box-shadow .3s}
.figure:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg)}
.figure img{width:100%;height:auto;display:block}
.figure figcaption{padding:.9rem 1.1rem;color:var(--muted);font-size:.875rem;line-height:1.55;border-top:1px solid var(--border);background:var(--surface-2);font-style:italic}
.signature{margin-top:3rem;padding-top:1.5rem;border-top:1px solid var(--border);color:var(--muted);font-style:italic;font-size:.95rem;text-align:right}
.end{border:0;border-top:1px solid var(--border);margin:2.5rem 0 1.5rem}
.actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:2rem;padding:1.5rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}
.actions .label{width:100%;font-size:.8rem;color:var(--muted-2);text-transform:uppercase;letter-spacing:.14em;font-weight:700;margin-bottom:.25rem}
.masto-dialog{display:none;margin-top:.6rem;padding:1rem 1.1rem;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);width:100%}
.masto-dialog.open{display:block}
.masto-dialog label{display:block;font-size:.82rem;color:var(--muted);margin-bottom:.4rem;font-weight:600}
.masto-row{display:flex;gap:.5rem;flex-wrap:wrap}
.masto-row input{flex:1;min-width:180px;background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:.5rem 1rem;color:var(--text);font:inherit;font-size:.9rem}
.masto-row input:focus{outline:none;border-color:var(--accent)}
.related{margin-bottom:2.5rem;padding:1.5rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}
.related h2{margin:0 0 1rem;font-size:1.05rem;color:var(--text-strong);font-weight:700}
.related-list{display:grid;gap:.6rem}
.related-card{display:block;padding:.85rem 1rem;border:1px solid var(--border);border-radius:var(--radius-sm);text-decoration:none;color:var(--text);transition:all .2s}
.related-card:hover{border-color:var(--accent);background:var(--surface-2)}
.related-card time{font-size:.75rem;color:var(--muted);font-variant-numeric:tabular-nums}
.related-card .t{font-weight:600;font-size:.95rem;line-height:1.4;color:var(--text-strong);display:block;margin-top:.25rem}
.pn{display:grid;gap:.85rem;grid-template-columns:1fr 1fr;margin:0 0 4rem}
@media (max-width:640px){.pn{grid-template-columns:1fr}}
.pn a{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem 1.1rem;text-decoration:none;color:var(--text);display:flex;flex-direction:column;gap:.3rem;transition:all .2s}
.pn a:hover{border-color:var(--accent);transform:translateY(-2px)}
.pn .dir{font-size:.72rem;color:var(--muted-2);text-transform:uppercase;letter-spacing:.12em;font-weight:700}
.pn .t{font-weight:600;font-size:.95rem;line-height:1.4;color:var(--text-strong)}
.pn a.next{align-items:flex-end;text-align:right}
.totop{position:fixed;right:1.25rem;bottom:1.25rem;width:44px;height:44px;border-radius:50%;background:var(--surface-2);border:1px solid var(--border-strong);color:var(--text);font-size:1.1rem;display:grid;place-items:center;opacity:0;pointer-events:none;transform:translateY(8px);transition:all .25s;z-index:40;box-shadow:var(--shadow)}
.totop.show{opacity:1;pointer-events:auto;transform:none}
.totop:hover{border-color:var(--accent);color:var(--accent)}
footer{border-top:1px solid var(--border);margin-top:4rem;padding:2rem 0 2.5rem;background:linear-gradient(180deg, transparent, rgba(0,0,0,.15))}
[data-theme="light"] footer{background:linear-gradient(180deg, transparent, rgba(0,0,0,.03))}
.footer-in{display:flex;flex-wrap:wrap;gap:1.5rem 2rem;align-items:center;justify-content:space-between}
.footer-copy{color:var(--muted);font-size:.9rem}
.footer-in nav{display:flex;flex-wrap:wrap;gap:1.25rem;font-size:.88rem}
.footer-in nav a{color:var(--muted);text-decoration:none;font-weight:500}
.footer-in nav a:hover{color:var(--accent)}
.noscript{padding:3rem 1.5rem;text-align:center;color:var(--accent);font-weight:600;border:1px solid var(--accent);border-radius:var(--radius);margin:2rem auto;max-width:480px}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.85rem;margin:1.5rem 0 2.5rem}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem 1.35rem;text-align:center}
.stat-card .num{font-size:clamp(2rem,5vw,2.8rem);font-weight:800;color:var(--accent);letter-spacing:-.02em;line-height:1;margin-bottom:.35rem}
.stat-card .label{color:var(--muted);font-size:.85rem;text-transform:uppercase;letter-spacing:.1em;font-weight:600}
.stats-list{display:grid;gap:.5rem;margin:1rem 0}
.stats-list-item{display:flex;justify-content:space-between;align-items:center;padding:.6rem 1rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm)}
.stats-list-item .name{color:var(--text-strong);font-weight:600}
.stats-list-item .count{color:var(--accent);font-weight:700;font-variant-numeric:tabular-nums}
.bm-list{display:grid;gap:.7rem;margin:1.5rem 0 3rem}
.bm-card{display:flex;align-items:center;gap:1rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem 1.15rem;transition:all .2s}
.bm-card:hover{border-color:var(--accent)}
.bm-card .grow{flex:1;min-width:0}
.bm-card a{color:var(--text-strong);font-weight:600;text-decoration:none;display:block;line-height:1.4}
.bm-card a:hover{color:var(--accent)}
.bm-card time{font-size:.78rem;color:var(--muted);font-variant-numeric:tabular-nums}
.bm-remove{flex-shrink:0;width:34px;height:34px;border-radius:50%;border:1px solid var(--border);background:transparent;color:var(--muted);display:grid;place-items:center;font-size:.95rem;transition:all .15s;padding:0}
.bm-remove:hover{border-color:var(--accent);color:var(--accent)}
.tts-controls{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.5rem}
.tts-status{font-size:.8rem;color:var(--muted);font-style:italic}
.tts-status.speaking{color:var(--accent);font-style:normal}
.toast{position:fixed;bottom:5.5rem;left:50%;transform:translateX(-50%) translateY(20px);background:var(--surface-3);border:1px solid var(--border-strong);color:var(--text-strong);padding:.65rem 1.1rem;border-radius:999px;font-size:.88rem;font-weight:600;box-shadow:var(--shadow-lg);z-index:100;opacity:0;pointer-events:none;transition:all .3s;white-space:nowrap}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@keyframes fade-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media print{
  body{background:#fff;color:#000}
  body::before,.header,.actions,footer,.back,.chip,.note,.progress,.totop,.list-tools,.toc,.pn,.live,.related,.tts-controls,.icon-btn,.toast{display:none!important}
  .prose,.prose h2,.article-head h1,.hero h1{color:#000}
  .highlight{background:#f5f5f5;color:#000;border-color:#000}
  .figure{box-shadow:none;border-color:#999}
}
[data-theme="light"] #logo-dark{display:inline-block!important}

/* =====================================================================
   PAKET 1 & 2: CONTRAST, BADGES, QUELLEN, THREAD-EXPORT
   ===================================================================== */

/* 1. Light-Mode Kontrast (WCAG AA für Fließtext-Links) */
[data-theme="light"] a { color: #b84c00; }
[data-theme="light"] a:hover { color: #8a3900; }

/* 2. Beitragstypen-Badges */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25em .65em;
  border-radius: 4px;
  background: #242c34;
  color: #9aa7b1;
  margin-right: .6rem;
  vertical-align: middle;
  line-height: 1;
}
[data-theme="light"] .badge { background: #e5e7eb; color: #4b5563; }
.badge-kommentar { background: #ff7b00; color: #1a0d02; }
[data-theme="light"] .badge-kommentar { background: #ff7b00; color: #fff; }
.badge-bericht { background: #2563eb; color: #fff; }
.badge-statement { background: #10b981; color: #fff; }

/* 3. Quellen-Apparat (wenn als Liste oder Link-Block gerendert) */
.sources-block {
  background: #12161a;
  border-left: 3px solid #ff7b00;
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
  border-radius: 0 8px 8px 0;
}
[data-theme="light"] .sources-block { background: #f3f4f6; border-left-color: #b84c00; }
.sources-block h2 { font-size: 1.1rem; margin-top: 0; color: #ff7b00; }
[data-theme="light"] .sources-block h2 { color: #b84c00; }
.sources-block p { margin-bottom: .6rem; font-size: .9rem; line-height: 1.5; }
.sources-block a { word-break: break-word; }

/* 4. Bluesky Thread-Exporter Button */
.thread-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  border: 1px solid #ff7b00;
  color: #ff7b00;
  padding: .5rem 1rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all .2s;
}
.thread-btn:hover { background: #ff7b00; color: #0a0d10; }
[data-theme="light"] .thread-btn { border-color: #b84c00; color: #b84c00; }
[data-theme="light"] .thread-btn:hover { background: #b84c00; color: #fff; }

/* =====================================================================
   FIX: Fokus-Ring & Thread-Dialog
   ===================================================================== */

/* Programmatisch gesetzter Fokus (Screenreader-Startpunkt) ohne sichtbaren Rahmen */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

/* Thread-Dialog (analog zum Mastodon-Dialog) */
.thread-dialog{display:none;margin-top:.6rem;padding:1rem 1.1rem;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);width:100%}
.thread-dialog.open{display:block}
.thread-dialog label{display:block;font-size:.82rem;color:var(--muted);margin-bottom:.5rem;font-weight:600}
.thread-preview{display:grid;gap:.5rem;max-height:260px;overflow:auto;padding-right:.25rem}
.thread-post{display:block;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:.6rem .8rem;font-size:.85rem;line-height:1.5;color:var(--text);cursor:pointer;transition:border-color .15s;white-space:pre-wrap;font-family:inherit}
.thread-post:hover{border-color:var(--accent)}
.thread-post .num{display:inline-block;font-weight:700;color:var(--accent);margin-right:.4rem}
.thread-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}

/* =====================================================================
   PAKET 3: FUSSNOTEN, ARTIKEL ZITIEREN, FOKUS-MODUS
   ===================================================================== */

/* Fußnoten-Marken im Text */
.fn-ref{font-size:.7em;line-height:0;vertical-align:super}
.fn-ref a{color:var(--accent);font-weight:700;text-decoration:none;padding:0 .12em}
.fn-ref a:hover{text-decoration:underline}

/* Fußnoten-Apparat am Artikelende */
.footnotes{margin-top:2.75rem;padding-top:1.4rem;border-top:1px solid var(--border);font-size:.92rem}
.footnotes h2{font-size:1.05rem;margin:0 0 .9rem;color:var(--text-strong)}
.footnotes ol{margin:0;padding-left:1.4rem;display:grid;gap:.55rem}
.footnotes li{color:var(--muted);line-height:1.6;scroll-margin-top:5.5rem}
.footnotes li:target{color:var(--text);background:var(--accent-soft);border-radius:4px;padding:.15rem .35rem}
.footnotes .fn-text a{word-break:break-word}
.fn-back{color:var(--accent);text-decoration:none;font-weight:700;margin-left:.35rem}
.fn-back:hover{text-decoration:underline}

/* Zitieren-Dialog */
.cite-dialog{display:none;margin-top:.6rem;padding:1rem 1.1rem;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);width:100%}
.cite-dialog.open{display:block}
.cite-dialog label{display:block;font-size:.82rem;color:var(--muted);margin-bottom:.5rem;font-weight:600}
.cite-tabs{display:flex;gap:.4rem;margin-bottom:.6rem}
.cite-tab{border:1px solid var(--border);background:transparent;color:var(--muted);border-radius:999px;padding:.3rem .9rem;font-size:.8rem;font-weight:600;cursor:pointer;transition:all .15s}
.cite-tab:hover{border-color:var(--accent);color:var(--accent)}
.cite-tab.active{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.cite-out{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:.8rem .9rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.82rem;line-height:1.55;color:var(--text);white-space:pre-wrap;word-break:break-word;margin:0 0 .6rem;max-height:220px;overflow:auto}

/* Fokus-Modus */
.focus-exit{display:none;position:fixed;top:1rem;right:1rem;z-index:80;align-items:center;gap:.4rem;padding:.5rem 1rem;border-radius:999px;border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text);font-size:.85rem;font-weight:600;box-shadow:var(--shadow);cursor:pointer}
.focus-exit:hover{border-color:var(--accent);color:var(--accent)}
body.focus-mode .focus-exit{display:inline-flex}
body.focus-mode .header,
body.focus-mode footer,
body.focus-mode .back,
body.focus-mode .chips,
body.focus-mode .article-head .meta,
body.focus-mode .updated-note,
body.focus-mode .tts-controls,
body.focus-mode .toc,
body.focus-mode .actions,
body.focus-mode .related,
body.focus-mode .pn,
body.focus-mode .totop,
body.focus-mode .signature{display:none!important}
body.focus-mode .prose{max-width:68ch;margin:0 auto;font-size:1.12rem}
body.focus-mode .article-head{margin-bottom:1.4rem;text-align:center}
body.focus-mode .article-head h1{max-width:none;margin:0 auto}
body.focus-mode .wrap{padding-top:2.5rem}

/* Druck: neue Dialoge/Exit ausblenden, Fußnoten mitdrucken */
@media print{
  .cite-dialog,.focus-exit,.fn-back{display:none!important}
  .footnotes{border-top:1px solid #999}
  .footnotes li{color:#000}
}