/*
 * RaxBoard Blog — B.1 stylesheet
 *
 * Uses RDS design tokens (--rb-*) + utility classes (rb-card, rb-pill, rb-stat,
 * rb-empty-state). Domain-scoped classes live under `rb-blog-*`.
 */

/* ── Container + Layout ─────────────────────────────────────── */
.rb-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media (max-width: 480px) {
    .rb-blog-container { padding: 16px 12px; }
}

.rb-blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.rb-blog-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rb-blog-title i { color: var(--primary); }

.rb-blog-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted-foreground);
}

.rb-blog-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rb-blog-section-title i { color: #f59e0b; }

/* ── Push form ──────────────────────────────────────────────── */
.rb-blog-push-form {
    margin-bottom: 24px;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.rb-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-foreground);
    flex: 1;
    min-width: 200px;
}

/* .rb-input is a core design-system class (rb-core bundle); the addon inherits
   it so portal inputs match the rest of the board (themed focus ring etc.).
   Do NOT redefine it here — that overrode the global on every page blog.css loads. */

/* ── Featured strip ─────────────────────────────────────────── */
.rb-blog-featured {
    margin-bottom: 32px;
}

.rb-blog-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.rb-blog-featured-card {
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.rb-blog-featured-body { padding: 16px; }

/* ── Cover + placeholder ────────────────────────────────────── */
.rb-blog-cover,
.rb-blog-entry-cover {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
}

.rb-blog-cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    font-size: 40px;
    opacity: .4;
}

/* ── Grid: sidebar + main ───────────────────────────────────── */
.rb-blog-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .rb-blog-grid { grid-template-columns: 1fr; }
}

.rb-blog-sidebar-header {
    padding: 12px 14px;
    font-weight: 700;
    font-size: 13px;
    color: var(--foreground);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rb-blog-sidebar-list { padding: 6px; }

.rb-blog-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--foreground);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s;
}

.rb-blog-category-item:hover { background: var(--primary-soft); }

.rb-blog-category-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.rb-blog-cat-count {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--border);
    color: var(--muted-foreground);
}

/* ── Sort bar ───────────────────────────────────────────────── */
.rb-blog-sort-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.rb-blog-sort-tab {
    padding: 6px 12px;
    border-radius: 7px;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}

.rb-blog-sort-tab:hover { color: var(--foreground); }
.rb-blog-sort-tab.active {
    background: var(--primary);
    color: #fff;
}

/* ── Entry list + card ──────────────────────────────────────── */
.rb-blog-entry-list {
    display: grid;
    /* Admin-configurable column count (blog_columns → --rb-blog-cols). minmax(0,1fr)
       lets tracks shrink below content so they never overflow narrow viewports. */
    grid-template-columns: repeat(var(--rb-blog-cols, 3), minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1000px) { .rb-blog-entry-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .rb-blog-entry-list { grid-template-columns: 1fr; } }

.rb-blog-entry-card {
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.rb-blog-entry-body { padding: 14px; }

.rb-blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: var(--muted-foreground);
    margin-bottom: 8px;
    align-items: center;
}

.rb-blog-entry-title {
    /* Admin-configurable (blog_title_* options → vars on .rb-blog-container). */
    font-size: var(--rb-blog-title-size, 16px);
    font-weight: var(--rb-blog-title-weight, 700);
    color: var(--rb-blog-title-color, var(--foreground));
    margin: 0 0 6px;
    line-height: 1.3;
    transition: color .15s ease;
    /* line clamp */
    display: -webkit-box;
    -webkit-line-clamp: var(--rb-blog-title-lines, 2);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rb-card--interactive:hover .rb-blog-entry-title {
    color: var(--rb-blog-title-hover, var(--primary));
}

.rb-blog-excerpt {
    font-size: 13px;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin: 0 0 10px;
    /* 3-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rb-blog-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--muted-foreground);
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.rb-blog-byline i { margin-right: 4px; opacity: .7; }
.rb-blog-byline-author { display: inline-flex; align-items: center; gap: 5px; }
.rb-blog-byline-author .rb-avatar { color: #fff; }

/* ── Pagination ─────────────────────────────────────────────── */
.rb-blog-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.rb-blog-page-link {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--foreground);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 0 10px;
}

.rb-blog-page-link:hover { border-color: var(--primary); }
.rb-blog-page-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── Empty state helpers ───────────────────────────────────── */
.rb-blog-empty-icon {
    font-size: 36px;
    color: var(--muted-foreground);
    opacity: .5;
    display: block;
    margin-bottom: 12px;
}

.rb-blog-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 4px;
}

/* ── Admin dashboard ───────────────────────────────────────── */
.rb-blog-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.rb-blog-admin-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rb-blog-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.rb-blog-admin-stats .rb-stat {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}

.rb-blog-admin-push { padding: 16px; margin-bottom: 20px; }

.rb-blog-admin-push-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-top: 12px;
}

.rb-blog-admin-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rb-blog-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rb-blog-admin-table th,
.rb-blog-admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.rb-blog-admin-table th {
    font-weight: 700;
    color: var(--muted-foreground);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.rb-blog-admin-link {
    color: var(--foreground);
    text-decoration: none;
    font-weight: 600;
}

.rb-blog-admin-link:hover { color: var(--primary); }

/* .rb-button--sm, .rb-button--danger and .rb-pill--accent are core design-system
   classes — the addon inherits them from the rb-core bundle / rds.css instead of
   redefining (the old unscoped overrides leaked onto every page blog.css loads).
   The B.2 admin-form helpers (.rb-form-row/.rb-form-control/.rb-radio/.rb-blog-admin-*)
   were dead: admin templates use Tailwind + .btn/.card, so they're removed. */

/* ── B.3 View-swap shim ─────────────────────────────────────── */
.rb-blog-viewswap { margin: 12px 0 0; }

.rb-blog-viewswap__wrapper {
    margin: 8px 0 20px;
    padding: 12px 0;
}

.rb-blog-viewswap__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 6px 0 10px;
    grid-column: 1 / -1;
}

.rb-blog-viewswap__grid {
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

/* ── B.4 Featured widget ────────────────────────────────────── */
.rb-blog-featured-widget {
    --rb-blog-featured-height: 420px;
    --rb-blog-featured-title-color: #ffffff;
    --rb-blog-featured-title-shadow: rgba(0, 0, 0, .5);
    --rb-blog-featured-title-lines: 2;
    margin: 24px 0;
}

.rb-blog-featured-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rb-blog-featured-widget__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rb-blog-featured-widget__title i { color: #f59e0b; }

.rb-blog-featured-widget__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.rb-blog-featured-widget--hero .rb-blog-featured-widget__grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-auto-rows: calc(var(--rb-blog-featured-height) / 2 - 6px);
}

.rb-blog-featured-widget--hero .rb-blog-featured-widget__card--hero {
    grid-row: span 2;
    min-height: var(--rb-blog-featured-height);
}

.rb-blog-featured-widget__card {
    position: relative;
    display: block;
    height: calc(var(--rb-blog-featured-height) / 2 - 6px);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    background-size: cover;
    background-position: center;
    color: var(--rb-blog-featured-title-color);
    transition: transform .18s ease;
}

.rb-blog-featured-widget__card:hover { transform: translateY(-2px); }

.rb-blog-featured-widget__card-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: .25;
}

.rb-blog-featured-widget__card-body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 32px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Dark scrim so the white title/excerpt stay legible over light covers. */
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}

.rb-blog-featured-widget__card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--rb-blog-featured-title-color);
    text-shadow: 0 1px 4px var(--rb-blog-featured-title-shadow);
    display: -webkit-box;
    -webkit-line-clamp: var(--rb-blog-featured-title-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rb-blog-featured-widget__card-excerpt {
    font-size: 12px;
    color: var(--rb-blog-featured-title-color);
    opacity: .85;
    margin: 0;
    text-shadow: 0 1px 3px var(--rb-blog-featured-title-shadow);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rb-blog-featured-widget--hero .rb-blog-featured-widget__card--hero .rb-blog-featured-widget__card-title { font-size: 22px; }

@media (max-width: 700px) {
    .rb-blog-featured-widget--hero .rb-blog-featured-widget__grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .rb-blog-featured-widget--hero .rb-blog-featured-widget__card--hero,
    .rb-blog-featured-widget__card {
        grid-row: auto;
        min-height: 180px;
        height: 180px;
    }
}

/* ── B.4 Loaders + load-more + toast ────────────────────────── */
.rb-blog-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.rb-blog-loader__icon {
    font-size: 32px;
    color: var(--primary);
    animation: rb-blog-spin 1s linear infinite;
    display: inline-block;
}

/* Subtle alternates for some icons — all still spin. */
.rb-blog-loader__icon.fa-yin-yang,
.rb-blog-loader__icon.fa-record-vinyl,
.rb-blog-loader__icon.fa-compact-disc {
    animation-duration: 1.4s;
}

.rb-blog-loader__icon.fa-hurricane {
    animation-duration: .7s;
}

@keyframes rb-blog-spin {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}

.rb-blog-loadmore {
    display: block;
    margin: 20px auto 0;
}

.rb-blog-sentinel {
    height: 1px;
    margin-top: 20px;
}

.rb-blog-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: var(--surface);
    color: var(--foreground);
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    font-size: 13px;
    font-weight: 600;
    z-index: 1000;
}

.rb-blog-toast--show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── B.5 Inline edit ───────────────────────────────────────── */
.rb-blog-entry-card-wrap {
    position: relative;
}

.rb-blog-entry-card__edit {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .15s;
}

.rb-blog-entry-card__edit:hover {
    background: var(--primary);
    transform: scale(1.08);
}

.rb-blog-inline-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.rb-blog-inline-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    opacity: 0;
    transition: opacity .2s;
}

.rb-blog-inline-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    background: var(--surface);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .2);
}

.rb-blog-inline-drawer--open .rb-blog-inline-drawer__backdrop { opacity: 1; }
.rb-blog-inline-drawer--open .rb-blog-inline-drawer__panel    { transform: translateX(0); }

.rb-blog-inline-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.rb-blog-inline-drawer__header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--foreground);
}

.rb-blog-inline-drawer__body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
}

.rb-blog-inline-drawer__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.rb-blog-inline-drawer__status {
    font-size: 12px;
    color: var(--muted-foreground);
    margin-left: auto;
}

.rb-blog-inline-drawer__status--error { color: var(--rb-danger, #ef4444); }

/* ── B.6 Thread-view reading-time badge ─────────────────────── */
.rb-blog-thread-meta__readtime {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
}

/* ── B.7 Editor's picks row ──────────────────────────────── */
.rb-blog-editors-picks {
    margin: 24px 0;
}

.rb-blog-editors-picks__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.rb-blog-editors-pick-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rb-blog-editors-pick-card .rb-blog-entry-cover {
    height: 120px;
}

.rb-blog-editors-pick-card .rb-blog-entry-body {
    padding: 10px 12px;
}

.rb-blog-editors-pick-card .rb-blog-entry-title {
    font-size: 14px;
    -webkit-line-clamp: 2;
    margin-top: 4px;
}

/* ── B.8 Hero slider ────────────────────────────────────── */
.rb-blog-hero {
    position: relative;
    margin: 0 0 24px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    height: 420px;
}

.rb-blog-hero__viewport {
    position: relative;
    width: 100%;
    height: 100%;
}

.rb-blog-hero__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.rb-blog-hero__slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease;
    text-decoration: none;
    color: #fff;
    background-size: cover;
    background-position: center;
    background-color: #1f2937;
}

.rb-blog-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
}

.rb-blog-hero__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 24px 32px 36px;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rb-blog-hero__title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rb-blog-hero__excerpt {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, .9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rb-blog-hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(0, 0, 0, .45);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background .15s;
}

.rb-blog-hero__nav:hover { background: rgba(0, 0, 0, .75); }
.rb-blog-hero__nav--prev { left: 12px; }
.rb-blog-hero__nav--next { right: 12px; }

.rb-blog-hero__dots {
    position: absolute;
    left: 0; right: 0; bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.rb-blog-hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .35);
    cursor: pointer;
    padding: 0;
    transition: background .15s, transform .15s;
}

.rb-blog-hero__dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

@media (max-width: 700px) {
    .rb-blog-hero { height: 320px; }
    .rb-blog-hero__title { font-size: 22px; }
    .rb-blog-hero__body { padding: 18px 20px 30px; }
}

/* ── B.8 Related posts ────────────────────────────────── */
.rb-blog-related {
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.rb-blog-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}


/* ── M10: cover images as real <img> (lazy, crawler-visible) ─────────── */
.rb-blog-entry-cover img,
.rb-blog-featured-card .rb-blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── M1: dedicated article page ─────────────────────────────────────── */
.rb-blog-article { max-width: 820px; }
.rb-blog-article__crumbs {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 13px; color: var(--muted-foreground); margin-bottom: 18px;
}
.rb-blog-article__crumbs a { color: var(--muted-foreground); text-decoration: none; }
.rb-blog-article__crumbs a:hover { color: var(--primary); }
.rb-blog-article__crumb-sep { opacity: .5; }
.rb-blog-article__title {
    font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.15;
    margin: 12px 0 14px; color: var(--foreground);
}
.rb-blog-article__meta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    font-size: 13px; color: var(--muted-foreground); margin-bottom: 22px;
}
.rb-blog-article__meta i { margin-right: 4px; opacity: .8; }
.rb-blog-article__author {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted-foreground); text-decoration: none;
}
.rb-blog-article__author:hover strong { color: var(--primary); }
.rb-blog-article__edit { margin-left: auto; color: var(--primary); text-decoration: none; }
.rb-blog-article__cover {
    margin: 0 0 26px; border-radius: 16px; overflow: hidden;
    aspect-ratio: 16 / 9; background: var(--surface-2, rgba(127,127,127,.08));
}
.rb-blog-article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-blog-article__body { font-size: 16px; line-height: 1.75; color: var(--foreground); }
.rb-blog-article__body img { max-width: 100%; height: auto; border-radius: 10px; }
.rb-blog-article__body p { margin: 0 0 1.1em; }

/* ── M7: share cluster ──────────────────────────────────────────────── */
.rb-blog-article__share {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 30px 0; padding: 16px 0; border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.rb-blog-article__share-label { font-weight: 700; font-size: 14px; margin-right: 4px; }
.rb-blog-share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--foreground); cursor: pointer; text-decoration: none;
    transition: transform .12s ease, background .12s ease, color .12s ease;
}
.rb-blog-share-btn:hover { transform: translateY(-2px); }
.rb-blog-share-btn--x:hover        { background: #000;     color: #fff; }
.rb-blog-share-btn--facebook:hover { background: #1877f2; color: #fff; }
.rb-blog-share-btn--linkedin:hover { background: #0a66c2; color: #fff; }
.rb-blog-share-btn--whatsapp:hover { background: #25d366; color: #fff; }
.rb-blog-share-btn--copy:hover,
.rb-blog-share-btn--native:hover   { background: var(--primary); color: #fff; }
.rb-blog-article__footer { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 36px; }

@media (max-width: 640px) {
    .rb-blog-article__meta { gap: 10px; }
    .rb-blog-article__edit { margin-left: 0; }
}

/* ── M9: reading-progress bar ───────────────────────────────────────── */
.rb-blog-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    background: transparent; z-index: 1200; pointer-events: none;
}
.rb-blog-progress span {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent, var(--primary)));
    transition: width .08s linear;
}
