*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
    --color-text: #1a1a1a;
    --color-muted: #666;
    --color-border: #e5e5e5;
    --color-bg: #fff;
    --color-accent: #0066cc;
    --color-accent-hover: #0052a3;
    --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "Fira Code", "Cascadia Code", monospace;
    --max-width: 820px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.8;
    font-size: 1.0625rem;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; background: var(--color-bg, #fff); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.site-nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.site-name { font-weight: 700; font-size: 1.25rem; color: var(--color-text); display: flex; align-items: center; }
.site-logo { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--color-muted); font-size: 0.9rem; }
.nav-lang-sep { color: var(--color-border); }
.nav-lang { font-size: 0.85rem; color: var(--color-accent) !important; font-weight: 500; }
.category-bar { border-top: 1px solid var(--color-border); overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; }
.category-bar::-webkit-scrollbar { display: none; }
.category-bar .container { display: flex; gap: 0; padding: 0; }
.category-bar__item { display: inline-block; padding: 7px 14px; font-size: 0.8rem; color: var(--color-muted); font-weight: 500; flex-shrink: 0; border-right: 1px solid var(--color-border); transition: background .15s, color .15s; }
.category-bar__item:first-child { border-left: none; }
.category-bar__item:hover { color: var(--color-accent); background: var(--color-bg-alt, #f7f7f7); }

/* RTL support */
[dir="rtl"] .article-body ul, [dir="rtl"] .article-body ol { margin: 0 28px 24px 0; }
[dir="rtl"] .article-body blockquote { border-left: none; border-right: 4px solid var(--color-border); padding: 8px 24px 8px 0; }
[dir="rtl"] .article-lead { border-left: none; border-right: 3px solid var(--color-border); padding-left: 0; padding-right: 20px; }
[dir="rtl"] .comment--reply { padding-left: 0; padding-right: 32px; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding: 32px 0; margin-top: 64px; color: var(--color-muted); text-align: center; font-size: 0.875rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; padding: 10px 20px; border-radius: 6px; font-size: 0.9375rem; font-weight: 500; cursor: pointer; border: none; transition: background 0.15s; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; text-decoration: none; }
.btn-secondary { background: #f0f0f0; color: var(--color-text); }
.btn-secondary:hover { background: #e0e0e0; text-decoration: none; }

/* Shared card utilities */
.card-category { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); display: inline-block; margin-bottom: 6px; }
.card-meta { font-size: 0.8rem; color: var(--color-muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Hero card */
.hero-section { padding: 40px 0 0; }
.hero-card { display: grid; grid-template-columns: 1fr 420px; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--color-border); text-decoration: none; color: inherit; transition: box-shadow 0.2s; }
.hero-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.08); text-decoration: none; }
.hero-card__thumb { overflow: hidden; aspect-ratio: 4/3; }
.hero-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.hero-card:hover .hero-card__thumb img { transform: scale(1.03); }
.hero-card__body { padding: 27px 31px; display: flex; flex-direction: column; justify-content: center; background: #fafafa; }
.hero-card__category { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 12px; }
.hero-card__title { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; margin: 0 0 12px; font-weight: 700; }
.hero-card__subtitle { color: var(--color-muted); font-size: 0.975rem; line-height: 1.6; margin: 0 0 20px; flex: 1; }
.hero-card__meta { font-size: 0.8rem; color: var(--color-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hero-card__meta-dot { opacity: 0.4; }

/* Featured section */
.featured-section { padding: 48px 0 0; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 16px; }
.featured-card { border-radius: 10px; overflow: hidden; border: 1px solid var(--color-border); background: #fff; transition: box-shadow 0.2s; }
.featured-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.featured-card__thumb { display: block; aspect-ratio: 16/9; overflow: hidden; }
.featured-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.featured-card:hover .featured-card__thumb img { transform: scale(1.04); }
.featured-card__thumb--empty { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #6366f1; }
.featured-card__body { padding: 14px 16px 16px; }
.featured-card__title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin: 0 0 4px; }
.featured-card__title a { color: inherit; }
.featured-card__title a:hover { color: var(--color-accent); text-decoration: none; }

/* Article grid (latest) */
.latest-section { padding: 48px 0 48px; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; margin-top: 16px; }
.article-tile { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; border: 1px solid var(--color-border); background: #fff; transition: box-shadow 0.2s; }
.article-tile:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.article-tile__thumb { display: block; aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0; }
.article-tile__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.article-tile:hover .article-tile__thumb img { transform: scale(1.04); }
.article-tile__thumb-empty { width: 100%; height: 100%; background: linear-gradient(135deg, #f0f4ff, #dbeafe); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700; color: #93c5fd; }
.article-tile__body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.article-tile__title { font-size: 1.05rem; font-weight: 700; line-height: 1.4; margin: 0 0 6px; }
.article-tile__title a { color: inherit; }
.article-tile__title a:hover { color: var(--color-accent); text-decoration: none; }
.article-tile__excerpt { font-size: 0.875rem; color: var(--color-muted); line-height: 1.55; margin: 0; flex: 1; }

/* Article List (legacy, kept for /articles page) */
.article-list { display: flex; flex-direction: column; gap: 32px; padding: 40px 0; }
.article-card { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; border-bottom: 1px solid var(--color-border); padding-bottom: 32px; }
.article-card:last-child { border-bottom: none; }
.article-card__thumb { display: block; border-radius: 8px; overflow: hidden; }
.article-card__thumb img { width: 200px; height: 130px; object-fit: cover; display: block; }
.article-card__category { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); }
.article-card__title { font-size: 1.25rem; line-height: 1.3; margin: 6px 0 8px; }
.article-card__title a { color: inherit; }
.article-card__title a:hover { color: var(--color-accent); text-decoration: none; }
.article-card__subtitle { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 8px; }
.article-card__meta { font-size: 0.8rem; color: var(--color-muted); display: flex; gap: 12px; }

/* Article Page */
.article-container { max-width: var(--max-width); margin: 0 auto; padding: 48px 20px; }
.article-header { margin-bottom: 32px; }
.article-category { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.article-sutitr { font-size: 1rem; color: var(--color-muted); margin: 8px 0; font-style: italic; }
.article-title { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; margin: 12px 0 16px; }
.article-subtitle { font-size: 1.25rem; color: var(--color-muted); line-height: 1.4; margin-bottom: 16px; }
.article-meta { display: flex; gap: 16px; font-size: 0.875rem; color: var(--color-muted); flex-wrap: wrap; }

.article-hero { margin: 0 0 0; line-height: 0; }
.article-hero img { width: 100%; height: clamp(280px, 55vh, 640px); object-fit: cover; display: block; }
.article-hero__caption { font-size: 0.8rem; color: var(--color-muted); text-align: center; padding: 8px 20px; line-height: 1.5; background: var(--color-bg-alt, #f9fafb); }

.article-lead { font-size: 1.2rem; color: var(--color-muted); border-left: 3px solid var(--color-border); padding-left: 20px; margin: 24px 0; line-height: 1.7; }

.article-body { font-size: 1.125rem; line-height: 1.85; }
.article-body h2 { font-size: 1.75rem; margin: 48px 0 16px; }
.article-body h3 { font-size: 1.375rem; margin: 36px 0 12px; }
.article-body p { margin-bottom: 24px; }
.article-body ul, .article-body ol { margin: 0 0 24px 28px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote { border-left: 4px solid var(--color-border); padding: 8px 24px; margin: 32px 0; color: var(--color-muted); font-style: italic; }
.article-body pre { background: #f8f8f8; border: 1px solid var(--color-border); border-radius: 6px; padding: 20px; overflow-x: auto; margin: 32px 0; font-size: 0.875rem; }
.article-body code { font-family: var(--font-mono); font-size: 0.875em; background: #f0f0f0; padding: 2px 6px; border-radius: 3px; }
.article-body pre code { background: none; padding: 0; }
.article-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 16px 0; }
.article-body a { text-decoration: underline; }

/* Related Articles */
.related-articles { display: flex; flex-direction: column; gap: 0; margin: 24px 0; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.related-card { display: flex; flex-direction: row; align-items: center; gap: 0; text-decoration: none; color: inherit; background: #fff; border-bottom: 1px solid #f1f5f9; transition: background .12s; }
.related-card:last-child { border-bottom: none; }
.related-card:hover { background: #f8fafc; }
.related-card__thumb { width: 72px; height: 52px; flex-shrink: 0; overflow: hidden; background: #f3f4f6; }
.related-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-card__body { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.related-card__title { font-size: 0.82rem; font-weight: 600; line-height: 1.3; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-card__summary { font-size: 0.75rem; color: var(--color-muted, #6b7280); margin: 0; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Related sections (books, projects, articles shown at bottom of detail pages) */
.related-section { padding: 32px 0; border-top: 1px solid var(--color-border); }
.related-section__title { font-size: 1rem; font-weight: 700; margin: 0 0 16px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.related-grid .related-card { flex-direction: column; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.related-grid .related-card__thumb { width: 100%; height: 120px; }
.related-grid .related-card__body { padding: 10px 12px; }
.related-grid .related-card__title { white-space: normal; font-size: .875rem; }
.related-grid .related-card__summary { white-space: normal; }

/* Tags */
.article-tags { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; padding: 4px 12px; background: #f0f0f0; border-radius: 999px; font-size: 0.8rem; color: var(--color-muted); }
.tag:hover { background: #e0e0e0; text-decoration: none; }

/* Comments */
.comments-section { padding: 48px 0; border-top: 1px solid var(--color-border); margin-top: 48px; }
.comments-section h2 { margin-bottom: 32px; }
.comment { padding: 20px 0; border-bottom: 1px solid var(--color-border); }
.comment--reply { padding-left: 32px; }
.comment-meta { display: flex; gap: 12px; margin-bottom: 8px; font-size: 0.875rem; color: var(--color-muted); }
.comment-form { margin-top: 40px; }
.comment-form h3 { margin-bottom: 20px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--color-border);
    border-radius: 6px; font-family: inherit; font-size: 1rem; background: var(--color-bg);
}
.form-group input:focus, .form-group textarea:focus { outline: 2px solid var(--color-accent); border-color: transparent; }
.search-form { display: flex; gap: 12px; margin: 24px 0; }
.search-form input { flex: 1; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }

/* Pagination */
.pagination { display: flex; gap: 16px; align-items: center; padding: 32px 0; }

/* Project / Book list */
.project-list, .book-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px; padding: 32px 0; }
.project-card img, .book-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; }
.project-card__body, .book-card__body { padding: 12px 0; }
.project-badges, .book-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; font-size: 0.8rem; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; background: #e8e8e8; color: var(--color-muted); }
.badge-oss { background: #d4edda; color: #155724; }
.badge-active { background: #cce5ff; color: #004085; }
.badge-completed { background: #d4edda; color: #155724; }
.project-links, .book-links { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.project-tech { margin: 32px 0; }
.project-tech h3 { margin-bottom: 12px; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 760px) {
    .hero-card { grid-template-columns: 1fr; }
    .hero-card__thumb { aspect-ratio: 16/9; order: -1; }
    .hero-card__body { padding: 20px; }
    .article-grid { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .dash-charts-row, .dash-tables-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    /* Nav */
    .site-nav { flex-wrap: wrap; gap: 10px; }
    .nav-links { gap: 12px; flex-wrap: wrap; font-size: 0.85rem; }

    /* Article page */
    .article-container { padding: 24px 16px; }
    .article-title { font-size: clamp(1.6rem, 8vw, 2.4rem); }
    .article-subtitle { font-size: 1.05rem; }
    .article-body { font-size: 1rem; line-height: 1.75; }
    .article-body h2 { font-size: 1.35rem; margin: 32px 0 12px; }
    .article-body h3 { font-size: 1.15rem; margin: 24px 0 10px; }
    .article-body pre { padding: 14px; font-size: 0.8rem; }
    .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .article-meta { gap: 8px; font-size: 0.8rem; }
    .article-lead { font-size: 1.05rem; padding-left: 14px; }
    .article-hero img { height: clamp(200px, 45vw, 360px); }

    /* Cards */
    .article-card { grid-template-columns: 1fr; }
    .article-card__thumb { display: none; }

    /* Comments */
    .comment--reply { padding-left: 16px; }
    .comments-section { padding: 32px 0; }

    /* Forms */
    .form-group input, .form-group textarea, .form-group select { font-size: 1rem; }

    /* Book/TOC */
    .book-toc { padding: 20px 16px; }
    .book-chapter { margin-top: 40px; padding-top: 28px; }

    /* Toast */
    .toast-container { left: 12px; right: 12px; max-width: 100%; }
}

/* Toast notifications */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 380px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 6px; font-size: 0.875rem; line-height: 1.5; box-shadow: 0 4px 12px rgba(0,0,0,.12); pointer-events: all; }
.toast--success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.toast--error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.toast span { flex: 1; }
.toast__close { background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1; opacity: .6; padding: 0; color: inherit; }
.toast__close:hover { opacity: 1; }
.toast-enter   { transition: transform .25s ease, opacity .25s ease; }
.toast-enter-start { opacity: 0; transform: translateX(40px); }
.toast-enter-end   { opacity: 1; transform: translateX(0); }
.toast-leave   { transition: transform .2s ease, opacity .2s ease; }
.toast-leave-start { opacity: 1; transform: translateX(0); }
.toast-leave-end   { opacity: 0; transform: translateX(40px); }
.section-heading { font-size: 1.1rem; font-weight: 700; margin-bottom: 0; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-muted); }

/* Responsive video embeds */
.article-body iframe { max-width: 100%; border-radius: 6px; margin: 16px 0; display: block; }
.article-body .video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 6px; margin: 16px 0; }
.article-body .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; margin: 0; }

/* Book TOC */
.book-toc { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 28px 32px; margin: 32px 0; }
.book-toc__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--color-muted, #6b7280); text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.book-toc__list { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.book-toc__item { counter-increment: toc; border-bottom: 1px solid #e2e8f0; }
.book-toc__item:last-child { border-bottom: none; }
.book-toc__link { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; color: var(--color-text, #1a1a1a); text-decoration: none; transition: color .15s; }
.book-toc__link::before { content: counter(toc); font-size: .8rem; font-weight: 700; color: var(--color-muted, #6b7280); min-width: 20px; flex-shrink: 0; }
.book-toc__link:hover { color: var(--accent, #2563eb); }
.book-toc__summary { display: block; font-size: .8rem; color: var(--color-muted, #6b7280); margin-top: 2px; }

/* Book chapters inline */
.book-chapter { margin-top: 56px; padding-top: 40px; border-top: 2px solid #e2e8f0; scroll-margin-top: 24px; }
.book-chapter__header { margin-bottom: 24px; }
.book-chapter__number { display: inline-block; background: var(--accent, #2563eb); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; margin-bottom: 8px; }
.book-chapter__title { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; margin: 0 0 8px; line-height: 1.2; }
.book-chapter__summary { color: var(--color-muted, #6b7280); font-size: 1rem; margin: 0; }
.book-chapter__back { display: inline-block; margin-top: 32px; font-size: .82rem; color: var(--color-muted, #6b7280); text-decoration: none; }
.book-chapter__back:hover { color: var(--accent, #2563eb); }
.book-intro-body { margin-bottom: 8px; }

[dir="rtl"] .book-toc__link::before { min-width: 20px; }

/* Article / Book cover figure */
.article-cover { margin: 32px 0; }
.article-cover img { max-width: 100%; width: 100%; height: auto; border-radius: 8px; display: block; }

/* Read Next — related articles at bottom of article page */
.read-next { padding: 48px 0 16px; border-top: 2px solid var(--color-border); margin-top: 40px; }
.read-next__header { margin-bottom: 24px; }
.read-next__label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--color-accent); }
.read-next__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.read-next__card { display: flex; flex-direction: column; text-decoration: none; color: var(--color-text); border-radius: 10px; overflow: hidden; border: 1px solid var(--color-border); transition: box-shadow .15s, transform .15s; }
.read-next__card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); transform: translateY(-2px); text-decoration: none; }
.read-next__thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.read-next__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.read-next__card:hover .read-next__thumb img { transform: scale(1.03); }
.read-next__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.read-next__category { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-accent); }
.read-next__title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0; }
.read-next__summary { font-size: .85rem; color: var(--color-muted); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-next__meta { font-size: .75rem; color: var(--color-muted); margin-top: auto; padding-top: 6px; }

/* Related books inline shortcode in article body */
.related-books-inline { margin: 32px 0; padding: 20px; background: var(--color-bg); border: 1px solid var(--color-border); border-left: 3px solid var(--color-accent); border-radius: 0 8px 8px 0; }
.related-books-inline .related-card--book { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--color-text); padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.related-books-inline .related-card--book:last-child { border-bottom: none; padding-bottom: 0; }
.related-books-inline .related-card--book:first-child { padding-top: 0; }
.related-books-inline .related-card__thumb { width: 56px; height: 72px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.related-books-inline .related-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-books-inline .related-card__body { flex: 1; }
.related-books-inline .related-card__type { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--color-accent); }
.related-books-inline .related-card__title { font-size: .9rem; font-weight: 700; margin: 2px 0 4px; line-height: 1.3; }
.related-books-inline .related-card__summary { font-size: .8rem; color: var(--color-muted); line-height: 1.4; }

/* Share buttons */
.share-buttons { display: flex; align-items: center; gap: 10px; padding: 24px 0; flex-wrap: wrap; }
.share-buttons__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--color-muted); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; font-size: .82rem; font-weight: 600; text-decoration: none; transition: opacity .15s, transform .1s; }
.share-btn:hover { opacity: .85; transform: translateY(-1px); text-decoration: none; }
.share-btn--twitter  { background: #000; color: #fff; }
.share-btn--whatsapp { background: #25d366; color: #fff; }
.share-btn--telegram { background: #2aabee; color: #fff; }
