/* ============================================================================
   FEATURE-735: Blog (Uebersicht, Artikelseite, Artikel-Bloecke, Lightbox, Forum-Karte)
   Nutzt die globalen Variablen aus style.css (Dark/Light wechseln ueber body.light-mode).
   Handy: 412 px ohne seitlichen Ueberlauf - Raster mit minmax(0, 1fr), Tabellen im eigenen Scroll-Rahmen.
   ============================================================================ */

.blog-page {
    --blog-radius: 10px;
    --blog-accent-text: var(--accent-primary-text, #a5b4fc);
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    box-sizing: border-box;
    color: var(--text-primary);
}
body.light-mode .blog-page { --blog-accent-text: var(--accent-primary, #4f46e5); }
.blog-page *, .blog-page *::before, .blog-page *::after { box-sizing: border-box; }
.blog-page a:focus-visible,
.blog-page button:focus-visible,
.blog-lightbox button:focus-visible,
.blog-embed a:focus-visible {
    outline: 2px solid var(--blog-accent-text, #a5b4fc);
    outline-offset: 2px;
}

/* ---------- gemeinsame Bausteine ---------- */
.blog-tag {
    font: 600 10.5px/1 var(--font-mono, ui-monospace, Consolas, monospace);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--blog-accent-text, var(--accent-primary-text));
}
.blog-byline {
    display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
    font-size: 12.5px; color: var(--text-muted);
}
.blog-comments-count { color: var(--blog-accent-text, var(--accent-primary-text)); font-weight: 600; }
.blog-crumbs { font-size: 12.5px; color: var(--text-muted); }
.blog-crumbs a { color: inherit; text-decoration: none; }
.blog-crumbs a:hover { text-decoration: underline; }

/* ---------- Uebersicht ---------- */
.blog-index__head { display: grid; gap: 8px; margin-bottom: 20px; }
.blog-index__title { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: .01em; }
.blog-index__sub { margin: 0; color: var(--text-secondary); max-width: 66ch; }

.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.blog-chip {
    display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary);
    font-size: 13px; text-decoration: none;
}
.blog-chip:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.blog-chip.is-on {
    border-color: var(--accent-primary); background: rgba(99, 102, 241, .14); color: var(--blog-accent-text, var(--accent-primary-text));
}

.blog-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--blog-radius);
    overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0;
    transition: border-color .15s ease, transform .15s ease;
}
.blog-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.blog-card__media {
    display: block; background: var(--bg-dark); aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border);
}
.blog-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-card__media--empty {
    background: linear-gradient(160deg, rgba(99, 102, 241, .22), var(--bg-dark));
}
.blog-card__txt { padding: 14px 16px 16px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.blog-card__title { margin: 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.blog-card__title a { color: inherit; text-decoration: none; }
.blog-card__title a:hover { text-decoration: underline; }
.blog-card__teaser { margin: 0; color: var(--text-secondary); font-size: 14px; overflow-wrap: anywhere; }

.blog-card--lead { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto; margin-bottom: 18px; }
.blog-card--lead .blog-card__media { aspect-ratio: auto; min-height: 220px; border-bottom: 0; border-right: 1px solid var(--border); }
.blog-card--lead .blog-card__txt { padding: 22px; align-content: center; gap: 10px; }
.blog-card--lead .blog-card__title { font-size: 24px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.blog-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 28px; }
.blog-pager__info { color: var(--text-muted); font-size: 13px; }
.blog-pager a, .blog-pager span.is-off {
    display: inline-flex; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-primary); text-decoration: none; font-size: 14px;
}
.blog-pager a:hover { border-color: var(--accent-primary); }
.blog-pager span.is-off { opacity: .45; }

.blog-empty {
    background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--blog-radius);
    padding: 28px 22px; display: grid; gap: 10px; justify-items: start;
}
.blog-empty h2 { margin: 0; font-size: 20px; }
.blog-empty p { margin: 0; color: var(--text-secondary); }

/* ---------- Artikelseite ---------- */
.blog-article { display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 40px; }
.blog-article__head { grid-column: 1 / -1; display: grid; gap: 14px; max-width: none; padding: 8px 0 14px; }
.blog-article__title { margin: 0; font-size: clamp(28px, 4.6vw, 38px); line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.blog-article__lede { margin: 0; font-size: 18px; color: var(--text-secondary); max-width: 1000px; }
.blog-preview-note {
    margin: 0; padding: 8px 12px; border-radius: 8px; font-size: 13px;
    background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .4); color: var(--text-primary);
}
.blog-author { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 15px; line-height: 1.4; color: var(--text-secondary); }
/* Name passend zum Avatar: groesser und kraeftiger als Datum und Lesezeit */
.blog-author > strong { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-left: -4px; }
.blog-author > .blog-author__avatar { width: 36px; height: 36px; font-size: 15px; }
.blog-author > .blog-author__avatar--emoji { font-size: 20px; }
.blog-author__avatar {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-primary), #22d3ee);
    display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
}
.blog-author__avatar--emoji { background: var(--bg-tertiary, #334155); font-size: 18px; }
.blog-author a { color: var(--blog-accent-text, var(--accent-primary-text)); }

/* "Auch verfuegbar in": andere Sprachfassungen direkt unter der Autorzeile */
.blog-langs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px;
    font-size: 13px; color: var(--text-muted);
}
.blog-langs a {
    padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px;
    color: var(--blog-accent-text, var(--accent-primary-text)); text-decoration: none;
}
.blog-langs a:hover { border-color: var(--accent-primary); }

.blog-hero {
    grid-column: 1 / -1; margin: 0 0 28px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
    background: var(--bg-card);
}
/* Hohe Bilder (Screenshots) werden unten statt mittig gekappt: Kopfzeilen und Titel bleiben sichtbar. */
.blog-hero img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; object-position: top center; }
.blog-hero figcaption {
    padding: 10px 16px; font-size: 13px; line-height: 1.5; color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.blog-article__main { min-width: 0; }
/* Lesespalte ~760 px (rund 75 Zeichen je Zeile); Bilder (breit/voll) und Galerien nutzen die ganze Spalte neben dem
   Inhaltsverzeichnis, damit Screenshots lesbar bleiben. */
.blog-body { max-width: none; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.blog-body > * { margin-top: 0; margin-bottom: 20px; max-width: 760px; }
.blog-body > .blog-figure--wide, .blog-body > .blog-figure--full, .blog-body > .blog-gallery { max-width: none; }
.blog-body img { max-width: 100%; height: auto; }

.blog-aside { position: sticky; top: 90px; align-self: start; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.blog-toc a { overflow-wrap: anywhere; }
.blog-toc, .blog-forumbox {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--blog-radius);
    padding: 14px 16px; font-size: 13.5px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0;
}
.blog-forumbox .btn { white-space: normal; text-align: center; justify-content: center; }
.blog-toc__title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; }
.blog-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.blog-toc a { color: var(--text-secondary); text-decoration: none; display: block; }
.blog-toc a:hover { color: var(--text-primary); }
.blog-toc a.is-cur { color: var(--blog-accent-text, var(--accent-primary-text)); font-weight: 600; }
.blog-forumbox__big { font-size: 26px; font-weight: 700; line-height: 1.1; }
.blog-forumbox__sub { color: var(--text-muted); font-size: 12.5px; }

/* Handy-Aufklapper fuer das Inhaltsverzeichnis (Desktop nutzt die Seitenspalte) */
.blog-toc-mobile { display: none; grid-column: 1 / -1; margin: 0 0 18px; }
.blog-toc-mobile summary { cursor: pointer; font-weight: 600; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
.blog-toc-mobile ol { list-style: none; margin: 8px 0 0; padding: 0 4px; display: grid; gap: 8px; }
.blog-toc-mobile a { color: var(--text-secondary); text-decoration: none; }

/* ---------- Diskussion ---------- */
.blog-discussion {
    grid-column: 1; max-width: 760px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border);
    display: grid; gap: 14px;
}
.blog-discussion__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.blog-discussion__head h2 { margin: 0; font-size: 22px; }
.blog-comment {
    display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--blog-radius);
    padding: 12px 14px; font-size: 14px;
}
.blog-comment__who { font-size: 12.5px; color: var(--text-muted); }
.blog-comment__who b { color: var(--text-primary); }
.blog-comment p { margin: 4px 0 0; overflow-wrap: anywhere; }
.blog-guestbox {
    background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--blog-radius);
    padding: 16px; display: grid; gap: 10px; justify-items: start; font-size: 14px;
}
.blog-guestbox__big { font-size: 26px; font-weight: 700; line-height: 1.1; }
.blog-guestbox p { margin: 0; color: var(--text-secondary); }

/* feste Leiste auf dem Handy */
.blog-mobilebar { display: none; }

/* ---------- Artikel-Bloecke (BlogRenderer) ---------- */
.blog-h { scroll-margin-top: 90px; line-height: 1.25; text-wrap: balance; }
.blog-body .blog-h { margin-top: 32px; margin-bottom: 12px; }
.blog-h2 { font-size: 24px; }
.blog-h3 { font-size: 19px; }

.blog-richtext > :first-child { margin-top: 0; }
.blog-richtext > :last-child { margin-bottom: 0; }
.blog-richtext p { margin: 0 0 1em; }
.blog-richtext a { color: var(--blog-accent-text, var(--accent-primary-text)); }
.blog-richtext ul, .blog-richtext ol { padding-left: 1.4em; margin: 0 0 1em; }
.blog-richtext code {
    font: 14px var(--font-mono, ui-monospace, Consolas, monospace);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px;
}
.blog-richtext pre { overflow-x: auto; max-width: 100%; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
.blog-richtext table {
    display: block; max-width: 100%; overflow-x: auto; border-collapse: separate; border-spacing: 0;
    border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
}
.blog-richtext th, .blog-richtext td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.blog-richtext th { background: var(--bg-card); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

.blog-quote {
    margin: 0 0 20px; padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; font-style: italic; color: var(--text-secondary);
}
.blog-quote p { margin: 0; }
.blog-quote cite { display: block; margin-top: 6px; font-size: 12.5px; font-style: normal; color: var(--text-muted); }
.blog-quote cite a { color: inherit; }
.blog-quote--large {
    background: none; border: 0; border-left: 4px solid var(--accent-primary); border-radius: 0;
    padding: 4px 0 4px 22px; font-style: normal; font-size: 22px; line-height: 1.45; font-weight: 600; color: var(--text-primary);
}

.blog-figure { margin: 0 0 20px; display: grid; gap: 8px; }
.blog-figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.blog-figure figcaption { font-size: 13px; color: var(--text-muted); }
.blog-figure--wide, .blog-figure--full { margin-left: 0; margin-right: 0; }
.blog-figure--left, .blog-figure--right { width: 44%; margin-bottom: 12px; }
.blog-figure--left { float: left; margin-right: 22px; }
.blog-figure--right { float: right; margin-left: 22px; }
.blog-body::after { content: ""; display: block; clear: both; }
.blog-fb-hint {
    display: inline-flex; gap: 6px; align-items: center; width: fit-content; max-width: 100%;
    font-size: 12px; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 6px; padding: 2px 8px;
}
.blog-lightbox-link { display: block; cursor: zoom-in; border-radius: 10px; }

.blog-gallery { display: grid; gap: 8px; margin: 0 0 20px; }
.blog-gallery--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blog-gallery--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.blog-gallery--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.blog-gallery__item { margin: 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.blog-gallery__item img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.blog-gallery__item figcaption { font-size: 12.5px; color: var(--text-muted); }
.blog-gallery--slider {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
}
.blog-gallery--slider .blog-gallery__item { flex: 0 0 min(78%, 340px); scroll-snap-align: start; }

.blog-callout {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 16px;
    border-radius: 8px; font-size: 15px; line-height: 1.6;
    background: rgba(99, 102, 241, .08); border: 1px solid rgba(99, 102, 241, .35);
}
.blog-callout--success { background: rgba(74, 222, 128, .08); border-color: rgba(74, 222, 128, .35); }
.blog-callout--warning { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .4); }
.blog-callout--error { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .4); }
.blog-callout--tip { background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .35); }
.blog-callout__title { display: block; margin-bottom: 2px; }
.blog-callout__body > div > :first-child { margin-top: 0; }
.blog-callout__body > div > :last-child { margin-bottom: 0; }

.blog-cta { margin: 0 0 20px; }

.blog-list { margin: 0 0 20px; padding-left: 1.4em; display: grid; gap: 6px; }
.blog-list--steps { list-style: none; padding-left: 0; counter-reset: blogstep; }
.blog-list--steps > li { counter-increment: blogstep; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.blog-list--steps > li::before {
    content: counter(blogstep); width: 24px; height: 24px; border-radius: 50%;
    background: rgba(99, 102, 241, .18); color: var(--blog-accent-text, var(--accent-primary-text));
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

.blog-divider { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.blog-divider--space { border: 0; height: 32px; margin: 0; }

/* ---------- Lightbox ---------- */
.blog-lightbox {
    position: fixed; inset: 0; z-index: 10000; display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px; grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px 12px; padding: 20px 12px 14px; background: rgba(2, 6, 15, .94); color: #e2e8f0;
}
.blog-lightbox[hidden] { display: none; }
.blog-lightbox__stage {
    grid-column: 2; grid-row: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y;
}
.blog-lightbox__img {
    max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px;
    transition: opacity .18s ease;
}
.blog-lightbox__img.is-loading { opacity: .35; }
.blog-lightbox__nav {
    align-self: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #475569;
    background: #1e293b; color: #f8fafc; font-size: 22px; line-height: 1; cursor: pointer;
    display: grid; place-items: center; padding: 0;
}
.blog-lightbox__nav:hover { background: #334155; }
.blog-lightbox__nav[hidden] { display: none; }
.blog-lightbox__prev { grid-column: 1; grid-row: 1; }
.blog-lightbox__next { grid-column: 3; grid-row: 1; }
.blog-lightbox__foot {
    grid-column: 2; grid-row: 2; display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 14px;
}
.blog-lightbox__caption { margin: 0; max-width: 70ch; color: #cbd5e1; }
.blog-lightbox__count { color: #94a3b8; font-size: 13px; }
.blog-lightbox__close {
    position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid #475569; background: #1e293b; color: #f8fafc; font-size: 22px; cursor: pointer;
    display: grid; place-items: center; padding: 0; z-index: 1;
}
.blog-lightbox__close:hover { background: #334155; }
body.blog-lightbox-open { overflow: hidden; }

/* ---------- Forum-Artikelkarte ---------- */
.blog-embed {
    margin: 16px 0; display: grid; grid-template-columns: 220px minmax(0, 1fr);
    border: 1px solid var(--border); border-radius: var(--blog-radius, 10px); overflow: hidden; background: var(--bg-dark);
}
.blog-embed__media { display: block; background: var(--bg-card); border-right: 1px solid var(--border); min-height: 120px; }
.blog-embed__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-embed__body { padding: 14px; display: grid; gap: 6px; align-content: center; min-width: 0; }
.blog-embed__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--text-muted); }
.blog-embed__title { margin: 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.blog-embed__teaser { margin: 0; color: var(--text-secondary); font-size: 14px; overflow-wrap: anywhere; }
.blog-embed__cta { margin: 4px 0 0; }
.blog-embed:not(:has(.blog-embed__media)) { grid-template-columns: minmax(0, 1fr); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .blog-article { grid-template-columns: minmax(0, 1fr); }
    .blog-aside { display: none; }
    .blog-toc-mobile { display: block; }
    .blog-figure--wide, .blog-figure--full { margin-left: 0; margin-right: 0; }
    .blog-discussion { grid-column: 1; }
}
@media (max-width: 900px) {
    .blog-grid { grid-template-columns: minmax(0, 1fr); }
    .blog-card--lead { grid-template-columns: minmax(0, 1fr); }
    .blog-card--lead .blog-card__media { aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
    .blog-embed { grid-template-columns: minmax(0, 1fr); }
    .blog-embed__media { border-right: 0; border-bottom: 1px solid var(--border); aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
    .blog-page { padding: 14px 12px 32px; }
    .blog-body { font-size: 16px; }
    .blog-article__lede { font-size: 17px; }
    .blog-gallery--cols-3, .blog-gallery--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-figure--left, .blog-figure--right { float: none; width: 100%; margin-left: 0; margin-right: 0; }
    .blog-quote--large { font-size: 18px; padding-left: 14px; }
    .blog-lightbox { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; padding: 56px 8px 10px; }
    .blog-lightbox__stage, .blog-lightbox__foot { grid-column: 1; }
    .blog-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; opacity: .85; }
    .blog-lightbox__prev { left: 6px; }
    .blog-lightbox__next { right: 6px; }

    /* feste Leiste "Kommentare - Mitdiskutieren" - Inhalt bekommt Platz darunter */
    .blog-page--article { padding-bottom: 84px; }
    .blog-mobilebar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; align-items: center;
        justify-content: space-between; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: var(--bg-card); border-top: 1px solid var(--border); font-size: 14px;
    }
    .blog-mobilebar a { color: var(--blog-accent-text, var(--accent-primary-text)); font-weight: 600; text-decoration: none; }
    /* In der App liefert Flutter die eigene untere Navigation */
    body.app-mode .blog-mobilebar { display: none; }
    body.app-mode .blog-page--article { padding-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card, .blog-lightbox__img { transition: none; }
    .blog-card:hover { transform: none; }
    .blog-gallery--slider { scroll-behavior: auto; }
}

/* Tabellen-Baustein (Blocktyp table): Basis-Tabelle .handbook-table aus components/handbook.css (Abschnitt 5c) hier
   bewusst dupliziert, weil handbook.css 160 KB gross ist und nur auf Handbuchseiten geladen wird. Aenderungen am
   Tabellen-Design in beiden Dateien nachziehen. */
.handbook-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0.9rem 0 1.4rem;
    font-size: 0.86rem;
    line-height: 1.5;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.11);
    background: #1a2742;          /* etwas heller als bg-card für Kontrast */
    box-shadow: 0 4px 20px -6px rgba(0,0,0,0.45);
}
.handbook-table thead tr {
    background: rgba(255,255,255,0.085);
}
.handbook-table thead th {
    padding: 0.7rem 1.05rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.52);
    border-bottom: 1px solid rgba(255,255,255,0.14);
    border-right: 1px solid rgba(255,255,255,0.07);
    white-space: nowrap;
}
.handbook-table thead th:last-child { border-right: none; }

.handbook-table tbody tr { background: transparent; }
.handbook-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.035); }

.handbook-table tbody td {
    padding: 0.7rem 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    border-right: 1px solid rgba(255,255,255,0.06);
    vertical-align: top;
    color: rgba(255,255,255,0.88);
}
.handbook-table tbody td:last-child { border-right: none; }
.handbook-table tbody tr:last-child td { border-bottom: none; }
.handbook-table tbody tr:hover { background: rgba(255,255,255,0.06) !important; }
.handbook-table tbody tr:hover td { transition: none; }

/* tfoot — Summenzeile */
.handbook-table tfoot tr {
    background: rgba(255,255,255,0.07);
}
.handbook-table tfoot td {
    padding: 0.75rem 1.05rem;
    border-top: 2px solid rgba(255,255,255,0.18);
    border-right: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.95);
    font-size: 0.88rem;
}
.handbook-table tfoot td:last-child { border-right: none; }

/* Light-Mode: solide Farben, klare Trennung */
body.light-mode .handbook-table {
    background: #ffffff;
    border: 1px solid #c8d3e0;
    box-shadow: 0 2px 10px -4px rgba(15,23,42,0.14);
}
body.light-mode .handbook-table thead tr { background: #eef2f8; }
body.light-mode .handbook-table thead th {
    color: #475569;
    border-bottom: 1px solid #c8d3e0;
    border-right: 1px solid #dde3ec;
}
body.light-mode .handbook-table tbody tr:nth-child(even) { background: #f7f9fc; }
body.light-mode .handbook-table tbody td {
    border-bottom: 1px solid #dde3ec;
    border-right: 1px solid #e8edf4;
    color: #1e293b;
}
body.light-mode .handbook-table tbody tr:hover { background: #eef2f8 !important; }
body.light-mode .handbook-table tfoot tr { background: #eef2f8; }
body.light-mode .handbook-table tfoot td {
    border-top: 2px solid #b0bfcf;
    border-right: 1px solid #dde3ec;
    color: #1e293b;
}

.blog-table-wrapper { margin: 1.5em 0; overflow-x: auto; }
.blog-table-wrapper .handbook-table { margin: 0; display: table; }
.blog-table tbody th { padding: 0.7rem 1.05rem; text-align: left; font-weight: 700; vertical-align: top; color: rgba(255,255,255,0.95); border-bottom: 1px solid rgba(255,255,255,0.07); border-right: 1px solid rgba(255,255,255,0.06); }
.blog-table tbody tr:last-child th { border-bottom: none; }
body.light-mode .blog-table tbody th { color: #1e293b; border-bottom-color: #dde3ec; border-right-color: #dde3ec; }
.blog-table caption { caption-side: top; text-align: left; padding: 0 0 8px; color: var(--text-muted); font-size: 14px; }
