/* ============================================================
   Blog Editorial Redesign - HAI UAE
   Modern magazine-style skin for /blog, /blog/{slug},
   /blog/category/{slug}. Loaded AFTER bizdire-public-integration.css.
   Uses fresh `.be-*` namespace so it cannot collide with legacy skins.
   ============================================================ */

:root,
body,
body.hai-public,
body.hai-public.page-blog,
body.hai-public.page-blog-category,
body.hai-public.page-blog-detail {
    --be-ink: #14213d;
    --be-ink-2: #1b2c50;
    --be-subtle: #5f6f86;
    --be-accent: #ef6c00;
    --be-accent-dark: #cf5c00;
    --be-canvas: #fafaf8;
    --be-line: #e7e9ee;
    --be-radius: 16px;
    --be-shadow-sm: 0 1px 3px rgba(20, 33, 61, 0.06), 0 1px 2px rgba(20, 33, 61, 0.04);
    --be-shadow-md: 0 10px 30px rgba(20, 33, 61, 0.10);
}

body.hai-public.page-blog,
body.hai-public.page-blog-category,
body.hai-public.page-blog-detail {
    background: var(--be-canvas);
}

body.hai-public.page-blog .section,
body.hai-public.page-blog-category .site-main {
    padding-top: 0;
}

/* ------------------------------------------------------------
   Masthead hero (listing + category)
   ------------------------------------------------------------ */
.be-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 85% -60%, rgba(239, 108, 0, 0.35), transparent 65%),
        radial-gradient(700px 380px at -10% 120%, rgba(59, 91, 148, 0.45), transparent 60%),
        linear-gradient(135deg, var(--be-ink) 0%, var(--be-ink-2) 100%);
    color: #fff;
    padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 84px);
    margin-bottom: clamp(32px, 5vw, 56px);
}

.be-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px 0;
    height: 42px;
    background: var(--be-canvas);
    clip-path: polygon(0 100%, 100% 100%, 100% 62%, 0 0);
}

.be-hero-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.be-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ffb27a;
    margin-bottom: 18px;
}

.be-hero-kicker::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--be-accent);
    border-radius: 2px;
}

.be-hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: #fff;
}

.be-hero p {
    max-width: 620px;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

.be-hero-count {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
}

.be-hero-count i { color: var(--be-accent); }

/* Breadcrumb (light band under hero) */
.be-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 1140px;
    margin: 0 auto clamp(24px, 4vw, 36px);
    padding: 0 20px;
    font-size: 0.9rem;
    color: var(--be-subtle);
}

.be-crumb a {
    color: var(--be-subtle);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.be-crumb a:hover { color: var(--be-accent); }

.be-crumb .sep { color: #c3cad6; }

.be-crumb [aria-current="page"] {
    color: var(--be-ink);
    font-weight: 600;
}

.be-shell {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px 64px;
}

/* ------------------------------------------------------------
   Featured story
   ------------------------------------------------------------ */
.be-section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--be-accent);
}

.be-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--be-line);
}

.be-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: var(--be-radius);
    overflow: hidden;
    box-shadow: var(--be-shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    margin-bottom: clamp(40px, 6vw, 64px);
}

.be-featured:hover {
    box-shadow: var(--be-shadow-md);
    transform: translateY(-3px);
}

.be-featured-media {
    position: relative;
    min-height: 320px;
}

.be-featured-media img,
.be-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.be-featured-media .be-media-fallback,
.be-card-media .be-media-fallback {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    padding: 16px;
    background: linear-gradient(140deg, var(--be-ink) 0%, #2c4370 55%, var(--be-accent) 160%);
}

.be-featured-body {
    padding: clamp(28px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.be-featured-body h2 {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 14px 0;
}

.be-featured-body h2 a {
    color: var(--be-ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.be-featured-body h2 a:hover { color: var(--be-accent); }

.be-featured-body p {
    color: var(--be-subtle);
    line-height: 1.7;
    margin: 0 0 22px;
}

.be-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    background: var(--be-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.be-btn:hover {
    background: var(--be-accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* Category chip */
.be-chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--be-accent);
    background: rgba(239, 108, 0, 0.10);
    width: fit-content;
}

.be-chip:hover {
    background: rgba(239, 108, 0, 0.18);
    color: var(--be-accent-dark);
    text-decoration: none;
}

/* Toolbar (sticky filter bar) */
.be-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 18px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--be-line);
    border-radius: 14px;
    box-shadow: var(--be-shadow-sm);
}

.be-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.be-toolbar-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--be-subtle);
    white-space: nowrap;
}

.be-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 34px 8px 14px;
    border: 1px solid var(--be-line);
    border-radius: 10px;
    background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6f86' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--be-ink);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.be-select:hover { border-color: #cdd4e0; }

.be-select:focus {
    outline: none;
    border-color: var(--be-accent);
    box-shadow: 0 0 0 3px rgba(239, 108, 0, 0.14);
}

.be-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--be-ink);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.be-tag-pill i { color: #ffb27a; }

.be-tag-pill:hover { background: var(--be-ink-2); color: #fff; }

/* Card grid + unified card */
.be-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
    gap: 26px;
    margin-bottom: 44px;
}

article.be-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: var(--be-radius);
    overflow: hidden;
    box-shadow: var(--be-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
}

article.be-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--be-shadow-md);
    border-color: #d8dde6;
}

.be-card-media {
    position: relative;
    overflow: hidden;
}

.be-card-media img {
    aspect-ratio: 16 / 10;
    transition: transform 0.45s ease;
}

article.be-card:hover .be-card-media img {
    transform: scale(1.04);
}

.be-card-media .be-media-fallback { aspect-ratio: 16 / 10; }

.be-card-media--compact img,
.be-card-media--compact .be-media-fallback {
    aspect-ratio: 21 / 9;
}

.be-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}

.be-card-title {
    font-size: 1.13rem;
    font-weight: 700;
    line-height: 1.38;
    margin: 12px 0 10px;
}

.be-card-title a {
    color: var(--be-ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.be-card-title a:hover { color: var(--be-accent); }

.be-card-excerpt {
    flex: 1;
    color: var(--be-subtle);
    font-size: 0.93rem;
    line-height: 1.65;
    margin-bottom: 18px;
}

.be-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding-top: 14px;
    border-top: 1px solid var(--be-line);
    font-size: 0.83rem;
    color: var(--be-subtle);
}

.be-meta span,
.be-meta time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.be-meta i { font-size: 0.82rem; color: var(--be-subtle); }

.be-meta a { color: inherit; text-decoration: none; }
.be-meta a:hover { color: var(--be-accent); }

/* Related-posts compact variant */
.be-card--related .be-card-title { font-size: 1rem; margin-top: 10px; }
.be-card--related .be-card-body { padding: 18px; }

/* Minimal list ("fresh" strip) */
.be-min-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 14px;
    margin-bottom: 48px;
}

.be-min-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.be-min-item:hover {
    border-color: var(--be-accent);
    transform: translateX(2px);
}

.be-min-item .num {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--be-accent);
    min-width: 22px;
}

.be-min-item .t {
    color: var(--be-ink);
    font-weight: 600;
    font-size: 0.94rem;
    line-height: 1.45;
}

.be-result-hint {
    font-size: 0.9rem;
    color: var(--be-subtle);
    margin: -8px 0 18px;
}

.be-empty {
    text-align: center;
    padding: 72px 24px;
    background: #fff;
    border: 1px dashed #d4dae4;
    border-radius: var(--be-radius);
}

.be-empty i { font-size: 2.4rem; color: #c3cad6; margin-bottom: 18px; }

.be-empty h3 {
    color: var(--be-ink);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.be-empty p { color: var(--be-subtle); }
.be-empty a { color: var(--be-accent); font-weight: 600; }

/* Pagination */
.be-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 24px;
}

.be-pagination .pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--be-line);
    background: #fff;
    color: var(--be-ink);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.be-pagination .pg:hover:not(.current):not(.disabled) {
    border-color: var(--be-accent);
    color: var(--be-accent);
}

.be-pagination .pg.current {
    background: var(--be-accent);
    border-color: var(--be-accent);
    color: #fff;
    cursor: default;
}

.be-pagination .pg.disabled { opacity: 0.45; cursor: default; }
.be-pagination .dots { color: #aab3c2; padding: 0 2px; }

.be-page-info {
    text-align: center;
    font-size: 0.85rem;
    color: var(--be-subtle);
    margin-bottom: 40px;
}

/* CTA */
.be-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(26px, 4vw, 38px);
    border-radius: var(--be-radius);
    background: linear-gradient(120deg, var(--be-ink) 0%, var(--be-ink-2) 70%, #27407a 130%);
    color: #fff;
}

.be-cta h2 {
    color: #fff;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    font-weight: 800;
    margin: 0 0 8px;
}

.be-cta p {
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    max-width: 520px;
}

/* ============================================================
   ARTICLE DETAIL PAGE
   ============================================================ */

/* Reading progress bar */
#be-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--be-accent);
    z-index: 2000;
    transition: width 0.08s linear;
}

/* Article header */
.be-art-header,
.be-detail-header {
    max-width: 860px;
    margin: 0 auto clamp(24px, 4vw, 40px);
    padding: 0 20px;
}

.be-art-header h1,
.be-detail-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--be-ink);
    margin: 16px 0 20px;
}

.be-art-meta,
.be-meta--detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    font-size: 0.9rem;
    color: var(--be-subtle);
    padding-top: 14px;
    border-top: 1px solid var(--be-line);
}

.be-art-meta > span,
.be-art-meta > time,
.be-meta--detail > span,
.be-meta--detail > time {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.be-art-meta i,
.be-meta--detail i { color: var(--be-accent); }

.be-art-author,
.be-author-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    color: var(--be-ink);
}

.be-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--be-ink), #35507f);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* Article layout */
.be-art-wrap,
.be-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(260px, 28vw, 340px);
    gap: 36px;
    align-items: start;
}

.be-art-main,
.be-article { min-width: 0; }

/* Featured image */
.be-art-figure,
.be-detail-hero {
    margin: 0 auto 36px;
    border-radius: var(--be-radius);
    overflow: hidden;
    box-shadow: var(--be-shadow-sm);
    max-width: 1140px;
}

.be-art-figure img,
.be-detail-hero img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Standfirst (excerpt as lede) */
.be-lede,
.be-lead {
    font-size: 1.12rem;
    line-height: 1.7;
    color: var(--be-ink-2);
    font-weight: 500;
    border-left: 3px solid var(--be-accent);
    padding: 4px 0 4px 18px;
    margin: 16px 0 28px;
}

/* Key takeaways callout */
.be-takeaways {
    background: linear-gradient(135deg, rgba(239, 108, 0, 0.07), rgba(20, 33, 61, 0.04));
    border: 1px solid rgba(239, 108, 0, 0.25);
    border-radius: var(--be-radius);
    padding: 22px 26px;
    margin-bottom: 32px;
}

.be-takeaways h2,
.be-takeaways .be-takeaways-title,
.be-takeaways .be-takeaways-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--be-accent-dark);
    margin: 0 0 14px;
}

.be-takeaways .be-takeaways-head i,
.be-takeaways .be-takeaways-title i { color: var(--be-accent); font-size: 1.1rem; }

.be-takeaways ol,
.be-takeaways ul {
    margin: 0;
    padding-left: 22px;
    color: var(--be-ink);
}

.be-takeaways li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.96rem;
}

.be-takeaways li:last-child { margin-bottom: 0; }

.be-takeaways h2,
.be-takeaways .be-takeaways-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--be-accent-dark);
    margin: 0 0 14px;
}

.be-takeaways ol,
.be-takeaways ul {
    margin: 0;
    padding-left: 22px;
    color: var(--be-ink);
}

.be-takeaways li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.96rem;
}

.be-takeaways li:last-child { margin-bottom: 0; }

/* Table of contents */
.be-toc {
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: var(--be-radius);
    padding: 20px 22px;
    box-shadow: var(--be-shadow-sm);
    font-size: 0.88rem;
    margin-bottom: 24px;
}

.be-toc-title,
.be-toc .be-side-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--be-subtle);
    margin: 0 0 12px;
}

.be-toc-title i,
.be-toc .be-side-title i { color: var(--be-accent); }

.be-toc nav a {
    display: block;
    padding: 6px 10px;
    border-left: 2px solid transparent;
    color: var(--be-subtle);
    text-decoration: none;
    line-height: 1.45;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.be-toc nav a:hover { color: var(--be-accent); }

.be-toc nav a.active {
    color: var(--be-ink);
    font-weight: 700;
    border-left-color: var(--be-accent);
    background: rgba(239, 108, 0, 0.06);
}

.be-toc nav a.toc-h3,
.be-toc nav a.be-toc-3 { padding-left: 24px; font-size: 0.84rem; }

/* Mobile TOC (collapsed details element above article) */
details.be-toc-mobile {
    display: none;
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: 12px;
    margin-bottom: 26px;
}

details.be-toc-mobile summary {
    cursor: pointer;
    padding: 13px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--be-ink);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

details.be-toc-mobile summary::after {
    content: "\f078";
    font-family: FontAwesome;
    margin-left: auto;
    color: var(--be-subtle);
    font-size: 0.75rem;
}

details.be-toc-mobile[open] summary::after { content: "\f077"; }

details.be-toc-mobile nav {
    padding: 0 18px 16px;
    font-size: 0.88rem;
}

details.be-toc-mobile nav a {
    display: block;
    padding: 6px 0;
    color: var(--be-subtle);
    text-decoration: none;
}

details.be-toc-mobile nav a:hover { color: var(--be-accent); }

/* Article body typography */
.be-article {
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: var(--be-radius);
    box-shadow: var(--be-shadow-sm);
    padding: clamp(24px, 4vw, 44px);
    font-size: 1.02rem;
    line-height: 1.78;
    color: #2a3550;
}

.be-article h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--be-ink);
    margin: 40px 0 16px;
    scroll-margin-top: 96px;
}

.be-article h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--be-ink);
    margin: 30px 0 12px;
    scroll-margin-top: 96px;
}

.be-article h4 { scroll-margin-top: 96px; }

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

.be-article p,
.be-article li,
.be-article dd {
    max-inline-size: 68ch;
}

.be-article a {
    color: var(--be-accent-dark);
    text-decoration: underline;
    text-decoration-color: rgba(239, 108, 0, 0.35);
    text-underline-offset: 2px;
}

.be-article a:hover {
    color: var(--be-accent);
    text-decoration-color: currentColor;
}

.be-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.be-article blockquote {
    border-left: 3px solid var(--be-accent);
    background: rgba(239, 108, 0, 0.05);
    border-radius: 0 12px 12px 0;
    padding: 16px 22px;
    margin: 24px 0;
    font-style: italic;
    color: var(--be-ink);
}

.be-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.92rem;
    display: block;
    overflow-x: auto;
}

.be-article th,
.be-article td {
    border: 1px solid var(--be-line);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.be-article th {
    background: var(--be-ink);
    color: #fff;
    font-weight: 700;
}

.be-article tr:nth-child(even) td { background: #f7f8fb; }

.be-article pre,
.be-article code {
    font-size: 0.9em;
    background: #f3f5f9;
    border-radius: 8px;
}

.be-article pre {
    padding: 16px 18px;
    overflow-x: auto;
}

/* FAQ accordion */
.be-faq,
.be-faq-section {
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: var(--be-radius);
    box-shadow: var(--be-shadow-sm);
    padding: clamp(22px, 3vw, 34px);
    margin-top: 32px;
}

.be-faq h2,
.be-faq-section h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--be-ink);
    margin: 0 0 18px;
}

.be-faq .accordion-item {
    border: 1px solid var(--be-line);
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 10px;
}

.be-faq .accordion-button {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--be-ink);
    background: #fafbfc;
    padding: 15px 18px;
}

.be-faq .accordion-button:not(.collapsed) {
    color: var(--be-accent-dark);
    background: rgba(239, 108, 0, 0.06);
    box-shadow: none;
}

.be-faq .accordion-button:focus-visible { outline-offset: -3px; }
.be-faq .accordion-body { color: var(--be-subtle); line-height: 1.7; font-size: 0.95rem; }

/* FAQ semantic details/summary list */
.be-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.be-faq-item {
    background: #fafbfc;
    border: 1px solid var(--be-line);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.be-faq-item summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.96rem;
    color: var(--be-ink);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.be-faq-item summary::-webkit-details-marker { display: none; }
.be-faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--be-accent);
    margin-left: 10px;
    line-height: 1;
}

.be-faq-item[open] summary::after { content: "\2212"; }
.be-faq-item[open] summary {
    background: rgba(239, 108, 0, 0.05);
    color: var(--be-accent-dark);
    border-bottom: 1px solid var(--be-line);
}

.be-faq-body {
    padding: 14px 18px;
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--be-subtle);
}

.be-faq-body p { margin: 0; }

/* Tags + share */
.be-tags-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--be-line);
}

.be-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f1f3f7;
    color: var(--be-subtle);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.be-tag:hover {
    background: var(--be-accent);
    color: #fff;
    text-decoration: none;
}

.be-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--be-line);
}

.be-share-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--be-subtle);
    margin-right: 6px;
}

.be-share .btn-be-share,
.be-share .be-share-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--be-line);
    background: #fff;
    color: var(--be-subtle);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.be-share .btn-be-share:hover,
.be-share .be-share-btn:hover {
    background: var(--be-ink);
    border-color: var(--be-ink);
    color: #fff;
    transform: translateY(-2px);
}

/* Author card */
.be-author-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: var(--be-radius);
    box-shadow: var(--be-shadow-sm);
    padding: 26px 28px;
    margin-top: 28px;
}

.be-author-card .be-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.be-author-card h3 {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--be-ink);
    margin: 4px 0 8px;
}

.be-author-card p {
    color: var(--be-subtle);
    font-size: 0.93rem;
    line-height: 1.65;
    margin: 0;
}

.be-author-role {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--be-accent);
}

/* Freshness badge */
.be-fresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(46, 160, 67, 0.10);
    color: #22863a;
}

/* Sidebar layout & widgets */
.be-sidebar {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.be-sidebar::-webkit-scrollbar {
    width: 5px;
}

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

.be-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.be-sidebar .widget,
.be-sidebar .be-side-block {
    background: #fff;
    border: 1px solid var(--be-line);
    border-radius: var(--be-radius);
    box-shadow: var(--be-shadow-sm);
    padding: 22px 24px;
    margin-bottom: 24px;
}

.be-sidebar .widget h3,
.be-sidebar .be-side-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--be-ink);
    margin: 0 0 14px;
}

.be-sidebar .widget h3 i,
.be-sidebar .be-side-title i { color: var(--be-accent); }

/* Sidebar search widget */
.be-side-search form { margin: 0; }
.be-side-search .input-group {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--be-line);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.be-side-search .input-group:focus-within {
    border-color: var(--be-accent);
    box-shadow: 0 0 0 3px rgba(239, 108, 0, 0.15);
}
.be-side-search .form-control {
    border: none;
    font-size: 0.88rem;
    padding: 10px 14px;
    background: #fff;
    color: var(--be-ink);
}
.be-side-search .form-control:focus {
    box-shadow: none;
    outline: none;
}
.be-side-search .btn {
    border: none;
    border-radius: 0;
    background: var(--be-accent);
    color: #fff;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.be-side-search .btn:hover {
    background: var(--be-accent-dark);
}

.be-side-posts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.be-side-post {
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f3f7;
}

.be-side-post:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.be-side-post h4 {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 4px;
}

.be-side-post h4 a {
    color: var(--be-ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.be-side-post h4 a:hover { color: var(--be-accent); }

.be-side-post time {
    font-size: 0.78rem;
    color: var(--be-subtle);
}

.be-related-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--be-line);
}

.be-side-item {
    display: flex;
    gap: 14px;
    padding: 11px 0;
    text-decoration: none;
}

.be-side-item + .be-side-item { border-top: 1px solid #eef0f4; }

.be-side-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--be-ink);
    margin: 0 0 4px;
    transition: color 0.15s ease;
}

.be-side-item:hover h4 { color: var(--be-accent); }

.be-side-item small {
    font-size: 0.78rem;
    color: var(--be-subtle);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.be-cat-list { list-style: none; margin: 0; padding: 0; }

.be-cat-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 2px;
    color: var(--be-ink);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border-bottom: 1px solid #eef0f4;
    transition: color 0.15s ease;
}

.be-cat-list li:last-child a { border-bottom: 0; }

.be-cat-list li a:hover { color: var(--be-accent); }

.be-cat-list .count {
    min-width: 28px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f3f7;
    color: var(--be-subtle);
    font-size: 0.76rem;
    font-weight: 700;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1199.98px) {
    .be-art-wrap {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 28px;
    }
}

@media (max-width: 991.98px) {
    .be-featured { grid-template-columns: 1fr; }
    .be-featured-media { min-height: 240px; }

    .be-art-wrap { grid-template-columns: 1fr; }

    /* Sidebar drops below content and TOC becomes collapsible block */
    .be-toc { display: none; }
    details.be-toc-mobile { display: block; }
    .be-sidebar { order: 2; margin-top: 36px; }

    /* Keep the sticky filter toolbar clear of the fixed mobile header */
    .be-toolbar { top: 72px; }
}

@media (max-width: 575.98px) {
    .be-shell { padding: 0 14px 48px; }
    .be-crumb { padding: 0 14px; }
    .be-grid { gap: 16px; }
    .be-toolbar { padding: 10px 12px; }
    .be-art-header { padding: 0 14px; }
    .article-actions-row { gap: 10px; }
}

