/* ═══════════════════════════════════════════════════════════
   Farada — Blog Styles (2026 Enhanced)
   Prefix: fbg-
   ═══════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════
   1. HERO SECTION
   ═══════════════════════════════════════════════════════════ */

.fbg-hero {
    padding-bottom: 40px !important;
}

.fbg-hero-stats {
    display: inline-flex;
    align-items: center;
    padding: 12px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, .06);
}

.fbg-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    min-width: 70px;
}

.fbg-hero-num {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fbg-hero-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 5px;
}

.fbg-hero-sep {
    width: 1px;
    height: 32px;
    background: var(--border);
}

@media (max-width: 640px) {
    .fbg-hero-stats {
        padding: 10px 4px;
        overflow-x: auto;
        scrollbar-width: none;
        max-width: 100%;
    }

    .fbg-hero-stats::-webkit-scrollbar {
        display: none;
    }

    .fbg-hero-stat {
        padding: 0 14px;
        min-width: 60px;
    }

    .fbg-hero-num {
        font-size: 16px;
    }

    .fbg-hero-label {
        font-size: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════
   2. TOOLBAR
   ═══════════════════════════════════════════════════════════ */

.fbg-toolbar-section {
    background: rgba(255, 255, 255, .85);
    border-bottom: 1px solid var(--border-soft);
    padding: 20px 0;
    position: sticky;
    top: 68px;
    z-index: 50;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

[data-theme="midnight"] .fbg-toolbar-section {
    background: rgba(30, 41, 59, .85);
}

.fbg-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fbg-pills-container {
    overflow: hidden;
}

.fbg-pills {
    display: flex;
    gap: 8px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.fbg-pills::-webkit-scrollbar {
    display: none;
}

.fbg-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    color: var(--body);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 300ms ease, color 300ms ease;
    font-family: inherit;
}

.fbg-pill i {
    font-size: 11px;
}

.fbg-pill:hover {
    border-color: rgba(99, 102, 241, .35);
    color: #6366f1;
}

.fbg-pill-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, .35);
}

.fbg-pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    background: var(--bg);
    color: var(--muted);
    border-radius: 100px;
    font-size: 10.5px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.fbg-pill-active .fbg-pill-badge {
    background: rgba(255, 255, 255, .22) !important;
    color: #fff !important;
}

.fbg-search-container {
    position: relative;
    width: 100%;
}

.fbg-search-field {
    width: 100%;
    padding: 13px 44px 13px 44px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--heading);
    outline: none;
    transition: border-color 300ms ease, box-shadow 300ms ease;
    font-family: inherit;
}

.fbg-search-field:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
}

.fbg-search-field::placeholder {
    color: var(--muted);
}

.fbg-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
}

.fbg-search-clear {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg);
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 250ms ease, color 250ms ease;
}

.fbg-search-clear:hover {
    background: #ef4444;
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════
   3. FEATURED CARD (کوچک‌تر و مناسب‌تر)
   ═══════════════════════════════════════════════════════════ */

.fbg-featured-section {
    padding: 48px 0 24px;
    background: var(--bg);
}

.fbg-featured-head {
    text-align: center;
    margin-bottom: 28px;
}

.fbg-featured-heading {
    font-size: 22px;
    font-weight: 900;
    color: var(--heading);
    letter-spacing: -0.02em;
    margin-top: 12px;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .fbg-featured-heading {
        font-size: 26px;
    }
}

.fbg-featured-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 24px rgba(99, 102, 241, .08);
    transition: transform 400ms ease, box-shadow 400ms ease, border-color 400ms ease;
    position: relative;
}

@media (min-width: 900px) {
    .fbg-featured-card {
        grid-template-columns: 1fr 1.1fr;
        min-height: 340px;
    }
}

.fbg-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -12px rgba(99, 102, 241, .2);
    border-color: rgba(99, 102, 241, .3);
}

.fbg-featured-cover {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

@media (min-width: 900px) {
    .fbg-featured-cover {
        aspect-ratio: auto;
        height: 100%;
    }
}

.fbg-featured-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255, 255, 255, .15) 2px, transparent 2.5px),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, .1) 2.5px, transparent 3px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .08) 1.5px, transparent 2px);
    background-size: 40px 40px, 55px 55px, 25px 25px;
    pointer-events: none;
    z-index: 1;
}

.fbg-featured-cover::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    filter: blur(30px);
    z-index: 1;
}

.fbg-featured-icon-box {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 100px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 16px 32px rgba(0, 0, 0, .12),
        0 4px 10px rgba(0, 0, 0, .05);
    transition: transform 400ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

[data-theme="midnight"] .fbg-featured-icon-box {
    background: #1e293b;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .3);
}

.fbg-featured-card:hover .fbg-featured-icon-box {
    transform: scale(1.05);
}

.fbg-featured-icon-box i {
    font-size: 46px;
}

.fbg-featured-badge,
.fbg-featured-new-badge {
    position: absolute;
    top: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    color: #fff;
    border-radius: 100px;
    font-size: 10.5px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.fbg-featured-badge {
    right: 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.fbg-featured-new-badge {
    left: 16px;
    background: linear-gradient(135deg, #10b981, #059669);
}

.fbg-featured-badge i {
    font-size: 9px;
}

.fbg-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: fbgPulse 2s infinite;
}

@keyframes fbgPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, .7);
    }

    70% {
        box-shadow: 0 0 0 5px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.fbg-featured-body {
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 640px) {
    .fbg-featured-body {
        padding: 22px 18px;
    }
}

.fbg-featured-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: rgba(99, 102, 241, .08);
    color: #6366f1;
    border-radius: 100px;
    border: 1px solid rgba(99, 102, 241, .15);
    font-size: 10.5px;
    font-weight: 800;
    margin-bottom: 14px;
    align-self: flex-start;
}

.fbg-featured-cat i {
    font-size: 9px;
}

.fbg-featured-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--heading);
    line-height: 1.4;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .fbg-featured-title {
        font-size: 22px;
    }
}

@media (min-width: 1024px) {
    .fbg-featured-title {
        font-size: 24px;
    }
}

.fbg-featured-summary {
    font-size: 13px;
    line-height: 1.9;
    color: var(--body);
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fbg-featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 12px;
    flex-wrap: wrap;
}

.fbg-featured-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fbg-featured-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
}

.fbg-featured-author-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fbg-featured-author-info strong {
    font-size: 12px;
    font-weight: 800;
    color: var(--heading);
}

.fbg-featured-author-info span {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 600;
}

.fbg-featured-meta-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
}

.fbg-featured-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--body);
    font-weight: 700;
}

.fbg-featured-stat i {
    color: #6366f1;
    font-size: 10.5px;
}

.fbg-featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 18px;
}

.fbg-featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--body);
}

.fbg-featured-tag i {
    font-size: 8px;
    color: #6366f1;
}

.fbg-featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    align-self: flex-start;
    transition: transform 300ms ease, box-shadow 300ms ease;
    box-shadow: 0 5px 16px rgba(99, 102, 241, .3);
}

.fbg-featured-card:hover .fbg-featured-cta {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, .4);
}

.fbg-featured-cta i {
    font-size: 10px;
    transition: transform 300ms ease;
}

.fbg-featured-card:hover .fbg-featured-cta i {
    transform: translateX(-3px);
}


/* ═══════════════════════════════════════════════════════════
   4. BLOG GRID + CARDS
   ═══════════════════════════════════════════════════════════ */

.fbg-grid-section {
    padding: 40px 0 80px;
    background: var(--bg);
}

.fbg-grid-head {
    text-align: center;
    margin-bottom: 40px;
}

.fbg-grid-heading {
    font-size: 24px;
    font-weight: 900;
    color: var(--heading);
    letter-spacing: -0.02em;
    margin-top: 14px;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .fbg-grid-heading {
        font-size: 28px;
    }
}

.fbg-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .fbg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .fbg-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.fbg-item {
    position: relative;
    height: auto;
    min-height: 500px;
    cursor: pointer;
    background: transparent;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    animation: fbgFadeIn 400ms ease forwards;
    animation-delay: var(--fbg-delay, 0ms);
}

@keyframes fbgFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fbg-item-inner {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    min-height: 500px;
    transition: transform 400ms cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 400ms ease, border-color 400ms ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.fbg-item:hover .fbg-item-inner {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px -12px rgba(99, 102, 241, .15);
    border-color: rgba(99, 102, 241, .25);
}

.fbg-item-cover {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.fbg-item-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .15) 2px, transparent 2.5px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .1) 2.5px, transparent 3px);
    background-size: 40px 40px, 55px 55px;
    pointer-events: none;
    z-index: 1;
}

.fbg-item-icon-box {
    position: relative;
    z-index: 3;
    width: 76px;
    height: 76px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

[data-theme="midnight"] .fbg-item-icon-box {
    background: #1e293b;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
}

.fbg-item-icon-box i {
    font-size: 34px;
}

.fbg-item-badges {
    position: absolute;
    top: 14px;
    right: 14px;
    left: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 4;
    pointer-events: none;
    gap: 8px;
}

.fbg-badge-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #0f172a;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    white-space: nowrap;
    line-height: 1;
}

.fbg-badge-cat i {
    font-size: 10px;
    color: #6366f1;
}

.fbg-badge-new {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(16, 185, 129, .35);
    white-space: nowrap;
}

.fbg-badge-new i {
    font-size: 8px;
}

.fbg-item-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fbg-item-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--heading);
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.fbg-item-summary {
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--body);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 66px;
}

.fbg-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 11.5px;
}

.fbg-item-author {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

.fbg-item-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    flex-shrink: 0;
}

.fbg-item-author strong {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fbg-item-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-weight: 600;
    flex-shrink: 0;
}

.fbg-item-time i {
    font-size: 10px;
    color: #6366f1;
}

.fbg-item-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    overflow: hidden;
    margin: 0 0 14px;
    min-height: 26px;
    align-items: center;
}

.fbg-item-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--body);
    white-space: nowrap;
    flex-shrink: 0;
}

.fbg-item-tag i {
    font-size: 8px;
    color: #6366f1;
}

.fbg-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
    margin-top: auto;
    gap: 10px;
}

.fbg-item-stats {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.fbg-item-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fbg-item-stat i {
    color: #6366f1;
    font-size: 10px;
}

.fbg-item-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #6366f1;
}

.fbg-item-read i {
    font-size: 10px;
    transition: transform 300ms ease;
}

.fbg-item:hover .fbg-item-read i {
    transform: translateX(-3px);
}


/* ═══════════════════════════════════════════════════════════
   5. EMPTY STATE
   ═══════════════════════════════════════════════════════════ */

.fbg-empty {
    text-align: center;
    padding: 80px 20px;
}

.fbg-empty-icon {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .1), rgba(168, 85, 247, .1));
    border: 1px solid rgba(99, 102, 241, .2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.fbg-empty-icon i {
    font-size: 40px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fbg-empty h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--heading);
    margin-bottom: 10px;
}

.fbg-empty p {
    font-size: 14px;
    color: var(--body);
    margin-bottom: 26px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.9;
}

.fbg-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 300ms ease, box-shadow 300ms ease;
    font-family: inherit;
}

.fbg-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, .4);
}


/* ═══════════════════════════════════════════════════════════
   6. NEWSLETTER (فقط لیست)
   ═══════════════════════════════════════════════════════════ */

.fbg-newsletter-section {
    padding: 40px 0 80px;
    background: var(--bg);
}

.fbg-newsletter-card {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .fbg-newsletter-card {
        padding: 56px 48px;
    }
}

.fbg-newsletter-card::before,
.fbg-newsletter-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}

.fbg-newsletter-card::before {
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
}

.fbg-newsletter-card::after {
    bottom: -40%;
    left: -15%;
    width: 350px;
    height: 350px;
}

.fbg-newsletter-icon {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, .15);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 20px;
}

.fbg-newsletter-card h2 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {
    .fbg-newsletter-card h2 {
        font-size: 32px;
    }
}

.fbg-newsletter-card p {
    font-size: 14px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .85);
    max-width: 500px;
    margin: 0 auto 28px;
    position: relative;
    z-index: 1;
}

.fbg-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {
    .fbg-newsletter-form {
        flex-direction: row;
    }
}

.fbg-newsletter-input-wrap {
    position: relative;
    flex: 1;
}

.fbg-newsletter-input-wrap i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, .5);
    font-size: 14px;
    pointer-events: none;
}

.fbg-newsletter-input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: background 300ms ease, border-color 300ms ease;
}

.fbg-newsletter-input::placeholder {
    color: rgba(255, 255, 255, .5);
}

.fbg-newsletter-input:focus {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .3);
}

.fbg-newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    color: #4338ca;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.fbg-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.fbg-newsletter-btn i {
    font-size: 12px;
}

.fbg-newsletter-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .7);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.fbg-newsletter-note i {
    color: rgba(255, 255, 255, .7);
    font-size: 11px;
}


/* ═══════════════════════════════════════════════════════════
   7. READING PROGRESS
   ═══════════════════════════════════════════════════════════ */

.fbg-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    z-index: 10000;
    width: 0%;
    transition: width 100ms ease;
}


/* ═══════════════════════════════════════════════════════════
   8. ARTICLE HERO
   ═══════════════════════════════════════════════════════════ */

.fbg-article-hero {
    position: relative;
    padding: 60px 0 40px;
    overflow: hidden;
}

.fbg-article-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, .05), rgba(168, 85, 247, .05));
    z-index: 0;
}

.fbg-article-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.fbg-article-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, .08);
    color: #6366f1;
    border-radius: 100px;
    border: 1px solid rgba(99, 102, 241, .15);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 20px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fbg-article-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--heading);
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .fbg-article-title {
        font-size: 34px;
    }
}

@media (min-width: 1024px) {
    .fbg-article-title {
        font-size: 40px;
    }
}

.fbg-article-meta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, .06);
    flex-wrap: wrap;
    justify-content: center;
}

.fbg-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.fbg-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.fbg-meta-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.fbg-meta-info strong {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--heading);
}

.fbg-meta-info span {
    font-size: 10.5px;
    color: var(--muted);
}

.fbg-meta-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.fbg-meta-simple {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--body);
    font-weight: 700;
}

.fbg-meta-simple i {
    color: #6366f1;
    font-size: 11px;
}


/* ═══════════════════════════════════════════════════════════
   9. ARTICLE MAIN LAYOUT
   ═══════════════════════════════════════════════════════════ */

.fbg-article-section {
    padding: 40px 0 80px;
    background: var(--surface);
}

.fbg-article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (min-width: 1024px) {
    .fbg-article-grid {
        grid-template-columns: 1fr 320px;
    }
}

.fbg-article-main {
    min-width: 0;
}


/* ═══════════════════════════════════════════════════════════
   10. ARTICLE COVER
   ═══════════════════════════════════════════════════════════ */

.fbg-article-cover {
    position: relative;
    aspect-ratio: 16/9; /* the cover pictures are 16:9: shown whole, never cropped */
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    box-shadow: 0 20px 60px rgba(99, 102, 241, .12);
}

.fbg-cover-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .15) 2px, transparent 2.5px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .1) 2.5px, transparent 3px);
    background-size: 40px 40px, 55px 55px;
}

.fbg-article-cover i {
    position: relative;
    z-index: 2;
    font-size: 100px;
    color: #fff;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .2));
}


/* ═══════════════════════════════════════════════════════════
   11. SUMMARY BOX
   ═══════════════════════════════════════════════════════════ */

.fbg-article-summary {
    position: relative;
    padding: 20px 22px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    margin-bottom: 32px;
}

.fbg-summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.fbg-summary-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(99, 102, 241, .08);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.fbg-summary-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fbg-summary-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(99, 102, 241, .1);
    color: #6366f1;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    font-family: 'JetBrains Mono', monospace;
    width: fit-content;
}

.fbg-summary-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--heading);
}

.fbg-article-summary p {
    font-size: 14px;
    line-height: 2;
    color: var(--body);
    font-weight: 500;
    margin: 0;
}


/* ═══════════════════════════════════════════════════════════
   12. ARTICLE CONTENT
   ═══════════════════════════════════════════════════════════ */

.fbg-article-content {
    font-size: 15px;
    line-height: 2.1;
    color: var(--body);
    margin-bottom: 32px;
}

.fbg-article-content h2 {
    font-size: 24px;
    font-weight: 900;
    color: var(--heading);
    letter-spacing: -0.02em;
    margin: 40px 0 16px;
    scroll-margin-top: 100px;
    position: relative;
    padding-right: 18px;
}

.fbg-article-content h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: linear-gradient(to bottom, #6366f1, #a855f7);
    border-radius: 4px;
}

.fbg-article-content h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -0.01em;
    margin: 32px 0 14px;
}

.fbg-article-content p {
    margin-bottom: 18px;
}

.fbg-article-content strong {
    color: var(--heading);
    font-weight: 800;
}

.fbg-article-content ul,
.fbg-article-content ol {
    margin: 18px 0;
    padding-right: 24px;
}

/* the site-wide reset removes list markers; article lists need them back (numbers in Persian digits) */
.fbg-article-content ul { list-style: disc outside; }

.fbg-article-content ol {
    list-style: decimal outside;
    list-style-type: persian;
}

.fbg-article-content ul li::marker,
.fbg-article-content ol li::marker {
    color: #6366f1;
    font-weight: 800;
}

.fbg-article-content li {
    margin-bottom: 10px;
}

.fbg-article-content code {
    background: rgba(99, 102, 241, .08);
    padding: 3px 9px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #6366f1;
    direction: ltr;
    display: inline-block;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, .12);
}

/* ═══ CODE BLOCK — Dark IDE Style ═══ */

.fbg-article-content pre {
    position: relative !important;
    background: #0d1117 !important;
    color: #c9d1d9 !important;
    padding: 52px 20px 18px 20px !important;
    border-radius: 10px !important;
    overflow-x: auto !important;
    margin: 28px 0 !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
    font-size: 13px !important;
    line-height: 1.85 !important;
    direction: ltr !important;
    text-align: left !important;
    border: 1px solid #21262d !important;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .2),
        0 4px 8px rgba(0, 0, 0, .1),
        inset 0 1px 0 rgba(255, 255, 255, .03) !important;
    tab-size: 4 !important;
}

/* Header Bar */
.fbg-article-content pre::before {
    content: 'Example.cs' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    padding: 10px 60px 10px 16px !important;
    background: #161b22 !important;
    color: #8b949e !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    font-family: 'JetBrains Mono', monospace !important;
    border-bottom: 1px solid #21262d !important;
    border-radius: 10px 10px 0 0 !important;
    box-sizing: border-box !important;
    letter-spacing: 0.02em !important;
}

/* Traffic Lights */
.fbg-article-content pre::after {
    content: '' !important;
    position: absolute !important;
    top: 13px !important;
    right: 14px !important;
    width: 48px !important;
    height: 12px !important;
    z-index: 2 !important;
    background-image:
        radial-gradient(circle at 6px 6px, #ff5f57 5px, transparent 5.5px),
        radial-gradient(circle at 24px 6px, #febc2e 5px, transparent 5.5px),
        radial-gradient(circle at 42px 6px, #28c840 5px, transparent 5.5px) !important;
    background-repeat: no-repeat !important;
}

.fbg-article-content pre code {
    background: transparent !important;
    padding: 0 !important;
    color: inherit !important;
    display: block !important;
    border: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
}


/* ═══ BLOCKQUOTE — IDE Style ═══ */

.fbg-article-content blockquote {
    position: relative !important;
    margin: 28px 0 !important;
    padding: 44px 18px 14px 18px !important;
    background: var(--bg) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 8px !important;
    font-size: 14.5px !important;
    line-height: 2 !important;
    color: var(--heading) !important;
    font-weight: 600 !important;
    font-style: normal !important;
}

[data-theme="midnight"] .fbg-article-content blockquote {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    font-weight: 500 !important;
}

.fbg-article-content blockquote p {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
}

/* Header — inside the box */
.fbg-article-content blockquote::before {
    content: '// نقل‌قول' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    padding: 8px 16px !important;
    background: var(--surface) !important;
    color: #6366f1 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    font-family: 'JetBrains Mono', 'Lahzeh', monospace !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 7px 7px 0 0 !important;
    direction: ltr !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

[data-theme="midnight"] .fbg-article-content blockquote::before {
    background: #1e293b !important;
    color: #94a3b8 !important;
    border-bottom-color: #334155 !important;
}

/* 3 Dots */
.fbg-article-content blockquote::after {
    content: '' !important;
    position: absolute !important;
    top: 10px !important;
    right: 14px !important;
    width: 40px !important;
    height: 10px !important;
    z-index: 2 !important;
    background-image:
        radial-gradient(circle at 5px 5px, #ef4444 3px, transparent 3.5px),
        radial-gradient(circle at 19px 5px, #f59e0b 3px, transparent 3.5px),
        radial-gradient(circle at 33px 5px, #10b981 3px, transparent 3.5px) !important;
    background-repeat: no-repeat !important;
}


/* ═══ IMAGE & VIDEO IN CONTENT — طراحی حرفه‌ای ═══ */

.fbg-article-content img,
.fbg-article-content .fbg-content-image,
.fbg-article-content .fbg-content-video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 32px auto;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(99, 102, 241, .15);
    cursor: zoom-in;
    transition: transform 400ms ease, box-shadow 400ms ease;
    border: 1px solid var(--border);
}

.fbg-article-content img:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, .25);
}

/* Figure Wrapper */
.fbg-article-content figure {
    margin: 32px 0;
    padding: 0;
}

.fbg-article-content figure img,
.fbg-article-content figure video {
    margin: 0;
}

.fbg-article-content figcaption {
    margin-top: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .05), rgba(168, 85, 247, .03));
    border: 1px solid rgba(99, 102, 241, .1);
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--body);
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-right: 40px;
}

.fbg-article-content figcaption::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6366f1;
    font-size: 14px;
}

/* Video */
.fbg-article-content video,
.fbg-article-content .fbg-content-video {
    background: #000;
    cursor: default;
}

.fbg-article-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    margin: 32px auto;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(99, 102, 241, .15);
    border: 1px solid var(--border);
    display: block;
}

/* Image Gallery */
.fbg-article-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 32px 0;
}

@media (min-width: 640px) {
    .fbg-article-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.fbg-article-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 12px;
    cursor: zoom-in;
    transition: transform 300ms ease;
}

.fbg-article-gallery img:hover {
    transform: scale(1.03);
}


/* ═══════════════════════════════════════════════════════════
   13. TAGS + AUTHOR BIO + ACTIONS
   ═══════════════════════════════════════════════════════════ */

.fbg-article-tags-wrap {
    padding: 22px;
    background: var(--bg);
    border-radius: 12px;
    margin-bottom: 24px;
}

.fbg-tags-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--heading);
    margin-bottom: 12px;
}

.fbg-tags-title i {
    color: #6366f1;
    font-size: 12px;
}

.fbg-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fbg-article-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--body);
    transition: border-color 300ms ease, color 300ms ease;
}

.fbg-article-tag:hover {
    border-color: rgba(99, 102, 241, .35);
    color: #6366f1;
}

.fbg-article-tag i {
    font-size: 10px;
    color: #6366f1;
}

.fbg-author-bio {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .04), rgba(168, 85, 247, .04));
    border: 1px solid rgba(99, 102, 241, .1);
    border-radius: 14px;
    margin-bottom: 24px;
    align-items: flex-start;
}

@media (max-width: 640px) {
    .fbg-author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 24px 20px;
    }
}

.fbg-author-bio-avatar {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(99, 102, 241, .3);
}

.fbg-author-bio-content {
    flex: 1;
    min-width: 0;
}

.fbg-author-bio-label {
    font-size: 10px;
    font-weight: 800;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.fbg-author-bio-content h4 {
    font-size: 17px;
    font-weight: 900;
    color: var(--heading);
    margin-bottom: 6px;
}

.fbg-author-bio-content p {
    font-size: 13px;
    line-height: 1.9;
    color: var(--body);
    margin-bottom: 14px;
}

.fbg-author-bio-social {
    display: flex;
    gap: 8px;
}

@media (max-width: 640px) {
    .fbg-author-bio-social {
        justify-content: center;
    }
}

.fbg-bio-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}

.fbg-bio-link:hover {
    background: var(--sc);
    color: #fff;
    border-color: var(--sc);
}

.fbg-article-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.fbg-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--body);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 300ms ease, color 300ms ease;
}

.fbg-action-btn:hover {
    border-color: rgba(99, 102, 241, .35);
    color: #6366f1;
}

.fbg-action-btn.active {
    background: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .3);
    color: #ef4444;
}

.fbg-action-btn.active i {
    color: #ef4444;
}

.fbg-action-btn i {
    font-size: 13px;
}

.fbg-action-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
}

.fbg-share-mini {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}

.fbg-share-mini:hover {
    background: var(--sc);
    color: #fff;
    border-color: var(--sc);
}


/* ═══════════════════════════════════════════════════════════
   14. COMMENTS
   ═══════════════════════════════════════════════════════════ */

.fbg-comments-section {
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    scroll-margin-top: 100px;
}

@media (max-width: 640px) {
    .fbg-comments-section {
        padding: 22px 18px;
    }
}

.fbg-comments-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.fbg-comments-head-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, .3);
    flex-shrink: 0;
}

.fbg-comments-head-info h3 {
    font-size: 20px;
    font-weight: 900;
    color: var(--heading);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.fbg-comments-head-info p {
    font-size: 12.5px;
    color: var(--body);
}

.fbg-comments-head-info strong {
    color: #6366f1;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.fbg-comment-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    transition: border-color 300ms ease;
}

@media (max-width: 640px) {
    .fbg-comment-form {
        padding: 20px 16px;
    }
}

.fbg-comment-form:focus-within {
    border-color: rgba(99, 102, 241, .3);
}

.fbg-comment-form-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--border-soft);
}

.fbg-comment-form-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.fbg-comment-form-head h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--heading);
    margin-bottom: 3px;
}

.fbg-comment-form-head p {
    font-size: 11.5px;
    color: var(--muted);
}

.fbg-comment-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

@media (min-width: 640px) {
    .fbg-comment-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fbg-comment-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.fbg-comment-form-row .fbg-comment-field {
    margin-bottom: 0;
}

.fbg-comment-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--heading);
}

.fbg-comment-field label i {
    color: #6366f1;
    font-size: 11px;
}

.fbg-comment-field input,
.fbg-comment-field textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--heading);
    outline: none;
    transition: border-color 300ms ease, background 300ms ease;
    font-family: inherit;
}

.fbg-comment-field input:focus,
.fbg-comment-field textarea:focus {
    border-color: #6366f1;
    background: var(--surface);
}

.fbg-comment-field input::placeholder,
.fbg-comment-field textarea::placeholder {
    color: var(--muted);
}

.fbg-comment-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.7;
}

.fbg-comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.fbg-comment-form-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
}

.fbg-comment-form-note i {
    color: #10b981;
    font-size: 11px;
}

.fbg-comment-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.fbg-comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
}

.fbg-comment-submit i {
    font-size: 11px;
}

.fbg-comments-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fbg-comments-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--body);
    font-weight: 700;
}

.fbg-comments-count i {
    color: #6366f1;
    font-size: 13px;
}

.fbg-comments-count strong {
    color: #6366f1;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
}

.fbg-comments-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fbg-comments-sort>span {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 700;
    margin-left: 4px;
}

.fbg-sort-btn {
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: color 300ms ease, border-color 300ms ease;
}

.fbg-sort-btn:hover {
    color: #6366f1;
    border-color: rgba(99, 102, 241, .3);
}

.fbg-sort-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.fbg-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fbg-comment {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 300ms ease;
}

@media (max-width: 640px) {
    .fbg-comment {
        padding: 16px 14px;
    }
}

.fbg-comment:hover {
    border-color: rgba(99, 102, 241, .15);
}

.fbg-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.fbg-comment-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.fbg-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.fbg-comment-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.fbg-comment-user-info h4 {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -0.01em;
}

.fbg-comment-date {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fbg-comment-date i {
    font-size: 9px;
    color: #6366f1;
}

.fbg-comment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

.fbg-comment-badge i {
    font-size: 9px;
}

.fbg-comment-body {
    padding: 14px 16px;
    background: var(--bg);
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--body);
}

.fbg-comment-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fbg-comment-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}

.fbg-comment-action:hover {
    background: rgba(99, 102, 241, .06);
    color: #6366f1;
    border-color: rgba(99, 102, 241, .25);
}

.fbg-comment-action i {
    font-size: 11px;
}

.fbg-comment-action.liked {
    background: rgba(239, 68, 68, .08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, .25);
}

.fbg-comment-action.liked i {
    color: #ef4444;
}

.fbg-comment-replies {
    margin-top: 16px;
    padding-right: 20px;
    border-right: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 640px) {
    .fbg-comment-replies {
        padding-right: 14px;
        margin-top: 14px;
    }
}

.fbg-comment-reply {
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
}

@media (max-width: 640px) {
    .fbg-comment-reply {
        padding: 14px 12px;
    }
}

.fbg-comment-reply .fbg-comment-body {
    background: var(--surface);
    font-size: 12.5px;
    padding: 12px 14px;
}

.fbg-comment-reply .fbg-comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px;
    border-radius: 10px;
}

.fbg-comment-reply .fbg-comment-user-info h4 {
    font-size: 12.5px;
}


/* ═══════════════════════════════════════════════════════════
   15. SIDEBAR
   ═══════════════════════════════════════════════════════════ */

.fbg-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (min-width: 1024px) {
    .fbg-sidebar {
        position: sticky;
        top: 80px;
        align-self: start;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(99, 102, 241, .2) transparent;
        padding-left: 4px;
        overscroll-behavior: contain;
    }

    .fbg-sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .fbg-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .fbg-sidebar::-webkit-scrollbar-thumb {
        background: rgba(99, 102, 241, .2);
        border-radius: 10px;
    }

    .fbg-sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(99, 102, 241, .35);
    }
}

/* ═══ Author Card ═══ */

.fbg-side-author-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.fbg-side-author-cover {
    height: 70px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    position: relative;
    overflow: hidden;
}

.fbg-side-author-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .15) 1.5px, transparent 2px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .1) 2px, transparent 2.5px);
    background-size: 28px 28px, 36px 36px;
}

.fbg-side-author-avatar-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin: -32px auto 0;
    z-index: 2;
}

.fbg-side-author-avatar {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, .3);
    border: 3px solid var(--surface);
}

.fbg-side-author-status {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 3px solid var(--surface);
    border-radius: 50%;
}

.fbg-side-author-body {
    padding: 14px 18px 18px;
    text-align: center;
}

.fbg-side-author-body h4 {
    font-size: 15px;
    font-weight: 900;
    color: var(--heading);
    letter-spacing: -0.01em;
    margin-bottom: 3px;
}

.fbg-side-author-body p {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 14px;
}

.fbg-side-author-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--bg);
    border-radius: 12px;
}

.fbg-side-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.fbg-side-stat strong {
    font-size: 15px;
    font-weight: 900;
    color: var(--heading);
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.fbg-side-stat span {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}

.fbg-side-stat-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
}


/* ═══ Standard Side Card ═══ */

.fbg-side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.fbg-side-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--heading);
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
    letter-spacing: -0.01em;
}

.fbg-side-title-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(99, 102, 241, .08);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}


/* TOC */

.fbg-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fbg-toc-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--body);
    text-decoration: none;
    transition: background 300ms ease, color 300ms ease;
    line-height: 1.5;
}

.fbg-toc-list li a::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
    transition: background 300ms ease;
}

.fbg-toc-list li a:hover {
    background: rgba(99, 102, 241, .05);
    color: #6366f1;
}

.fbg-toc-list li a:hover::before {
    background: #6366f1;
}


/* Info List */

.fbg-info-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fbg-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 12.5px;
}

.fbg-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fbg-info-lbl {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-weight: 600;
}

.fbg-info-lbl i {
    color: #6366f1;
    font-size: 11px;
    width: 14px;
    text-align: center;
}

.fbg-info-val {
    color: var(--heading);
    font-weight: 800;
    text-align: left;
    font-size: 12px;
}


/* Side Share */

.fbg-side-share {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.fbg-side-share-btn {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 10px;
    font-size: 13px;
    text-decoration: none;
    transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}

.fbg-side-share-btn:hover {
    background: var(--sc);
    color: #fff;
    border-color: var(--sc);
}


/* ═══════════════════════════════════════════════════════════
   16. RELATED
   ═══════════════════════════════════════════════════════════ */

.fbg-related {
    padding-top: 40px;
    border-top: 1px solid var(--border-soft);
    margin-top: 40px;
}


/* ═══════════════════════════════════════════════════════════
   17. LIGHTBOX (برای عکس‌ها)
   ═══════════════════════════════════════════════════════════ */

.fbg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    cursor: zoom-out;
    animation: fbgLightboxIn 300ms ease;
}

@keyframes fbgLightboxIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fbg-lightbox.open {
    display: flex;
}

.fbg-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    animation: fbgLightboxImgIn 400ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes fbgLightboxImgIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fbg-lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 300ms ease, transform 300ms ease;
    z-index: 10002;
}

.fbg-lightbox-close:hover {
    background: rgba(255, 255, 255, .25);
    transform: rotate(90deg);
}
/* ═══════════════════════════════════════════════════════════
   Phase 3.9 — article meta on phones, author card, share buttons
   ═══════════════════════════════════════════════════════════ */
button.fbg-share-mini, button.fbg-side-share-btn { cursor: pointer; font: inherit; padding: 0; }
.fbg-share-mini.is-copied, .fbg-side-share-btn.is-copied { background: #10b981; border-color: #10b981; color: #fff; }
.fbg-action-share { flex-wrap: wrap; }

/* phones: author on its own row, then date · reading time · views as three equal cells (was one squeezed pill) */
@media (max-width: 640px) {
    .fbg-article-meta {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: 100%;
        padding: 0; border-radius: 12px; overflow: hidden;
    }
    .fbg-article-meta .fbg-meta-divider { display: none; }
    .fbg-article-meta .fbg-meta-item {
        grid-column: 1 / -1; justify-content: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--border);
    }
    .fbg-article-meta .fbg-meta-simple {
        flex-direction: column; gap: 4px; padding: 10px 4px; font-size: 11.5px; text-align: center; justify-content: center;
    }
    .fbg-article-meta .fbg-meta-simple + .fbg-meta-divider + .fbg-meta-simple { border-right: 1px solid var(--border); }
    .fbg-article-meta .fbg-meta-simple i { font-size: 13px; }
}

/* author card under the article: stays a row on phones (avatar beside the text), no centred stack */
.fbg-author-bio { border-radius: 12px; padding: 20px; gap: 16px; align-items: center; }
.fbg-author-bio-avatar { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; }
.fbg-author-bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fbg-author-bio-content h4 { margin-bottom: 4px; }
.fbg-author-bio-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.fbg-author-bio-meta i { color: #6366f1; margin-left: 5px; font-size: 11px; }
.fbg-author-bio-content p { margin-bottom: 10px; }
.fbg-author-bio-content p:last-child, .fbg-author-bio-social:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
    .fbg-author-bio { flex-direction: row; text-align: right; align-items: flex-start; padding: 16px; gap: 12px; }
    .fbg-author-bio-avatar { width: 52px; height: 52px; border-radius: 12px; font-size: 20px; }
    .fbg-author-bio-social { justify-content: flex-start; }
}

/* the sidebar repeats the article info and share bar, so on phones it only keeps the table of contents */
@media (max-width: 1023px) {
    .fbg-sidebar > .fbg-side-card:not(nav) { display: none; }
}
.fbg-toc-mobile { display: none; }
@media (max-width: 1023px) {
    .fbg-sidebar { display: none; }
    .fbg-toc-mobile { display: block; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
    .fbg-toc-mobile summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 13px; font-weight: 800; color: var(--heading); cursor: pointer; list-style: none; }
    .fbg-toc-mobile summary::-webkit-details-marker { display: none; }
    .fbg-toc-mobile summary > i:first-child { color: #6366f1; }
    .fbg-toc-chev { margin-inline-start: auto; font-size: 11px; color: var(--muted); transition: transform .2s; }
    .fbg-toc-mobile[open] .fbg-toc-chev { transform: rotate(180deg); }
    .fbg-toc-mobile .fbg-toc-list { padding: 0 14px 12px; }
}

/* article tables (phase 3.11): full-width, rounded, light header; on phones see the block below */
.fbg-article-content table {
    display: table;
    width: 100%;
    margin: 26px 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    font-size: 14px;
    line-height: 1.9;
}

.fbg-article-content table thead th {
    padding: 13px 18px;
    background: rgba(99, 102, 241, .10);
    color: var(--heading);
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.fbg-article-content table td {
    padding: 13px 18px;
    text-align: right;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.fbg-article-content table tbody tr:last-child td { border-bottom: 0; }

.fbg-article-content table tbody tr:nth-child(even) td { background: rgba(99, 102, 241, .04); }

.fbg-article-content table td:first-child { color: var(--heading); font-weight: 700; }

/* key/value tables (two columns): the key column stays narrow */
.fbg-article-content table[data-cols="2"] td:first-child,
.fbg-article-content table[data-cols="2"] thead th:first-child { width: 38%; }

/* phones: no sideways scrolling.
   Two-column tables stay tables (compact, text wraps); wider tables turn each row into a small card: the first cell is
   the card's title and every other cell shows its column name as a small label (data-label, added by ArticleHtml.Render). */
@media (max-width: 640px) {
    .fbg-article-content table { margin: 22px 0; font-size: 13px; line-height: 1.85; }

    .fbg-article-content table[data-cols="2"] { table-layout: fixed; }
    .fbg-article-content table[data-cols="2"] thead th { padding: 10px 12px; white-space: normal; overflow-wrap: anywhere; }
    .fbg-article-content table[data-cols="2"] td { padding: 10px 12px; overflow-wrap: anywhere; }
    .fbg-article-content table[data-cols="2"] td:first-child,
    .fbg-article-content table[data-cols="2"] thead th:first-child { width: 40%; }
    .fbg-article-content table[data-cols="2"] td:first-child { background: rgba(99, 102, 241, .06); }
    .fbg-article-content table[data-cols="2"] tbody tr:nth-child(even) td:last-child { background: none; }

    .fbg-article-content table:not([data-cols="2"]) {
        display: block;
        border: 0;
        border-radius: 0;
        background: none;
        overflow: visible;
    }

    .fbg-article-content table:not([data-cols="2"]) thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .fbg-article-content table:not([data-cols="2"]) tbody,
    .fbg-article-content table:not([data-cols="2"]) tr,
    .fbg-article-content table:not([data-cols="2"]) td { display: block; }

    .fbg-article-content table:not([data-cols="2"]) tr {
        margin: 0 0 12px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface);
        box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
        overflow: hidden;
    }

    .fbg-article-content table:not([data-cols="2"]) td {
        padding: 10px 14px;
        border: 0;
        background: none !important;
    }

    .fbg-article-content table:not([data-cols="2"]) td:first-child {
        padding: 12px 14px;
        border-inline-start: 3px solid #6366f1;
        background: rgba(99, 102, 241, .07) !important;
        color: var(--heading);
        font-size: 13.5px;
        font-weight: 800;
        line-height: 1.8;
    }

    .fbg-article-content table:not([data-cols="2"]) td:not(:first-child) + td { border-top: 1px dashed var(--border); }

    .fbg-article-content table:not([data-cols="2"]) td[data-label]:not(:first-child)::before {
        content: attr(data-label);
        display: block;
        width: fit-content;
        margin-bottom: 4px;
        padding: 1px 9px;
        border-radius: 999px;
        background: rgba(99, 102, 241, .10);
        color: #4f46e5;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.7;
    }

    [data-theme="midnight"] .fbg-article-content table:not([data-cols="2"]) td[data-label]:not(:first-child)::before {
        background: rgba(129, 140, 248, .16);
        color: #a5b4fc;
    }
}

/* article structure (phase 3.11): a clear two-level hierarchy.
   h2 = a section (accent bar, hairline under it, generous space above); h3 = an item inside it (small dot, tighter). */
.fbg-article-content > :first-child { margin-top: 0; }

.fbg-article-content h2 {
    margin: 56px 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.fbg-article-content h2::before { top: 6px; bottom: 20px; }

.fbg-article-content h3 {
    position: relative;
    margin: 34px 0 12px;
    padding-right: 16px;
    font-size: 18px;
    line-height: 1.7;
}

.fbg-article-content h3::before {
    content: '';
    position: absolute;
    right: 2px;
    top: .72em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #818cf8, #6366f1);
}

.fbg-article-content h2 + h3 { margin-top: 24px; }

.fbg-article-content hr {
    margin: 44px 0 28px;
    border: 0;
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .fbg-article-content h2 { margin: 44px 0 16px; padding-bottom: 12px; font-size: 21px; }
    .fbg-article-content h3 { margin: 28px 0 10px; font-size: 17px; }
}
