/* ==========================================================================
   Rosomat blog — v2 (blog page .bx-*, article page .ax-*)
   Brand: red→orange gradient, warm cream, deep cocoa. Settings in Admin → المدونة → إعدادات التصميم.
   ========================================================================== */
:root {
    --bx-red: #c8260f;
    --bx-grad: linear-gradient(135deg, #bc0000 0%, #e06228 100%);
    --bx-cream: #f7f1ea;
    --bx-cream-2: #fff7f2;
    --bx-ink: #1b1412;
    --bx-text: #3f3a37;
    --bx-muted: #7b716b;
    --bx-line: #efe3da;
    --bx-card: #ffffff;
    --bx-shadow: 0 18px 44px -26px rgba(120, 30, 10, .45);
    --bx-shadow-lg: 0 30px 70px -34px rgba(120, 30, 10, .6);
    --bx-radius: 22px;
    --bx-ease: cubic-bezier(.22, 1, .36, 1);
}

.bx, .ax { background: var(--bx-cream); color: var(--bx-text); }
.bx a, .ax a { text-decoration: none; }
.bx-wrap, .ax-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ── shared bits ─────────────────────────────────────────── */
.bx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(200, 38, 15, .08); color: var(--bx-red); white-space: nowrap; }
.bx-chip--solid { background: var(--bx-grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(188, 0, 0, .7); }
.bx-chip--glass { background: rgba(255, 255, 255, .9); color: var(--bx-red); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--bx-muted); }
.bx-meta span { display: inline-flex; align-items: center; gap: 5px; }
.bx-meta i { color: #c9a594; font-size: 14px; }
.bx-avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bx-grad); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 0 0 3px #fff; }
.bx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border: 0; border-radius: 14px; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; transition: transform .2s var(--bx-ease), box-shadow .2s ease; }
.bx-btn--main { background: var(--bx-grad); color: #fff !important; box-shadow: 0 14px 30px -14px rgba(188, 0, 0, .8); }
.bx-btn--main:hover { transform: translateY(-2px); }
.bx-btn--light { background: #fff; color: var(--bx-red) !important; }
.bx-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bx-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bx-ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--bx-grad); color: rgba(255, 255, 255, .85); font-size: 44px; }

/* ==========================================================================
   BLOG PAGE
   ========================================================================== */
.bx-hero { position: relative; overflow: hidden; padding: 136px 0 56px; background:
    radial-gradient(900px 420px at 88% -10%, rgba(224, 98, 40, .20), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(188, 0, 0, .10), transparent 60%),
    var(--bx-cream); }
.bx-hero::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px dashed rgba(200, 38, 15, .18); top: -220px; inset-inline-end: -160px; }
.bx-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 44px; align-items: center; }
.bx-hero__title { margin: 16px 0 12px; font-size: clamp(34px, 5vw, 58px); line-height: 1.12; font-weight: 800; color: var(--bx-ink); letter-spacing: -.01em; }
.bx-hero__title em { font-style: normal; background: var(--bx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bx-hero__sub { margin: 0; max-width: 520px; font-size: 16.5px; line-height: 1.9; color: var(--bx-muted); }
.bx-search { position: relative; display: flex; align-items: center; max-width: 520px; margin-top: 26px; padding: 6px; border-radius: 18px; background: #fff; box-shadow: var(--bx-shadow); border: 1px solid var(--bx-line); }
.bx-search i { font-size: 20px; color: var(--bx-red); padding: 0 12px; }
.bx-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--bx-ink); padding: 10px 0; }
.bx-search button { border: 0; border-radius: 13px; padding: 11px 20px; background: var(--bx-grad); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.bx-hero__stats { display: flex; gap: 26px; margin-top: 24px; }
.bx-hero__stats b { display: block; font-size: 24px; font-weight: 800; color: var(--bx-ink); }
.bx-hero__stats span { font-size: 12.5px; color: var(--bx-muted); }

/* Featured article card in the hero */
.bx-feature { position: relative; display: block; border-radius: 28px; overflow: hidden; background: var(--bx-ink); color: #fff; box-shadow: var(--bx-shadow-lg); aspect-ratio: 16 / 12; transform: rotate(-1.2deg); transition: transform .4s var(--bx-ease); }
.bx-feature:hover { transform: rotate(0) translateY(-4px); }
.bx-feature__img { position: absolute; inset: 0; }
.bx-feature__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--bx-ease); }
.bx-feature:hover .bx-feature__img img { transform: scale(1.05); }
.bx-feature__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(27, 20, 18, .95) 8%, rgba(27, 20, 18, .35) 55%, rgba(27, 20, 18, .05)); }
.bx-feature__body { position: absolute; inset: auto 0 0 0; padding: 26px; }
.bx-feature__tags { display: flex; gap: 8px; margin-bottom: 12px; }
.bx-feature__title { margin: 0 0 10px; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.45; font-weight: 800; color: #fff; }
.bx-feature__excerpt { margin: 0 0 14px; font-size: 14px; line-height: 1.8; color: rgba(255, 255, 255, .78); }
.bx-feature .bx-meta { color: rgba(255, 255, 255, .72); }
.bx-feature .bx-meta i { color: #ffb08a; }
.bx-feature__go { position: absolute; top: 20px; inset-inline-end: 20px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--bx-red); font-size: 22px; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); transition: transform .3s var(--bx-ease); }
.bx-feature:hover .bx-feature__go { transform: rotate(-45deg); }

/* Category bar */
.bx-cats { position: sticky; top: 84px; z-index: 20; padding: 12px 0; background: rgba(247, 241, 234, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--bx-line); }
.bx-cats__row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.bx-cats__row::-webkit-scrollbar { display: none; }
.bx-cat { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--bx-line); color: var(--bx-text); font-size: 14px; font-weight: 700; transition: all .2s ease; }
.bx-cat small { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bx-cream); font-size: 11.5px; color: var(--bx-muted); }
.bx-cat:hover { border-color: #efc2ad; color: var(--bx-red); }
.bx-cat.is-on { background: var(--bx-grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -12px rgba(188, 0, 0, .8); }
.bx-cat.is-on small { background: rgba(255, 255, 255, .25); color: #fff; }

/* Posts grid */
.bx-list { padding: 40px 0 30px; }
.bx-list__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.bx-list__title { margin: 0; font-size: 24px; font-weight: 800; color: var(--bx-ink); }
.bx-list__note { font-size: 14px; color: var(--bx-muted); }
.bx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bx-card { position: relative; display: flex; flex-direction: column; background: var(--bx-card); border-radius: var(--bx-radius); overflow: hidden; border: 1px solid var(--bx-line); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; transition: transform .35s var(--bx-ease), box-shadow .35s var(--bx-ease), border-color .35s; }
.bx-card:hover { transform: translateY(-6px); box-shadow: var(--bx-shadow); border-color: #f2d3c4; }
.bx-card__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f3e6dc; }
.bx-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--bx-ease); }
.bx-card:hover .bx-card__img img { transform: scale(1.06); }
.bx-card__img .bx-chip { position: absolute; top: 14px; inset-inline-start: 14px; }
.bx-card__time { position: absolute; bottom: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: rgba(27, 20, 18, .72); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(4px); }
.bx-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.bx-card__title { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 800; color: var(--bx-ink); transition: color .2s; }
.bx-card:hover .bx-card__title { color: var(--bx-red); }
.bx-card__excerpt { margin: 0; font-size: 14px; line-height: 1.85; color: var(--bx-muted); }
.bx-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--bx-line); }
.bx-card__author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--bx-text); min-width: 0; }
.bx-card__author .bx-avatar { width: 28px; height: 28px; font-size: 12px; box-shadow: none; }
.bx-card__read { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #fff4ee; color: var(--bx-red); font-size: 18px; transition: all .3s var(--bx-ease); }
.bx-card:hover .bx-card__read { background: var(--bx-grad); color: #fff; transform: rotate(-45deg); }
.bx-card__link { position: absolute; inset: 0; z-index: 1; }
.bx-card--wide { grid-column: span 2; flex-direction: row; }
.bx-card--wide .bx-card__img { flex: 0 0 52%; aspect-ratio: auto; min-height: 300px; }
.bx-card--wide .bx-card__title { font-size: 22px; }
.bx-empty { padding: 60px 20px; text-align: center; border-radius: var(--bx-radius); background: #fff; border: 1px dashed #e8d5c7; }
.bx-empty i { font-size: 44px; color: #e0b8a4; }
.bx-empty p { margin: 8px 0 16px; color: var(--bx-muted); }

/* Pagination */
.bx-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 34px; }
.bx-pages a, .bx-pages span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 14px; background: #fff; border: 1px solid var(--bx-line); color: var(--bx-text); font-weight: 800; font-size: 14px; }
.bx-pages a:hover { border-color: #efc2ad; color: var(--bx-red); }
.bx-pages .is-on { background: var(--bx-grad); border-color: transparent; color: #fff; }
.bx-pages .is-off { opacity: .45; }

/* Newsletter band */
.bx-news { padding: 20px 0 70px; }
.bx-news__box { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 38px 40px; border-radius: 30px; background: var(--bx-ink); color: #fff; box-shadow: var(--bx-shadow-lg); }
.bx-news__box::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 98, 40, .55), transparent 65%); top: -200px; inset-inline-start: -120px; }
.bx-news__box::after { content: "✉"; position: absolute; font-size: 170px; opacity: .06; inset-inline-end: 36%; bottom: -60px; transform: rotate(-14deg); }
.bx-news__box > * { position: relative; z-index: 1; }
.bx-news h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; }
.bx-news p { margin: 0; color: rgba(255, 255, 255, .72); line-height: 1.9; }
.bx-news form { display: flex; gap: 8px; padding: 6px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.bx-news input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 15px; padding: 10px 12px; }
.bx-news input::placeholder { color: rgba(255, 255, 255, .5); }
.bx-news__msg { margin-top: 10px; font-size: 13.5px; color: #ffd2bd; min-height: 1em; }

/* ==========================================================================
   LANGUAGE — the site's AR/EN switch sets html[lang][dir]. Articles with an
   English version render both; each language shows only its own blocks.
   ========================================================================== */
html:not([lang="en"]) .ax-en { display: none !important; }
html[lang="en"] .ax-ar { display: none !important; }
html[dir="ltr"] .ax-flip { display: inline-block; transform: scaleX(-1); }

/* ==========================================================================
   ARTICLE PAGE — header → (contents | article | share rail) → related
   ========================================================================== */
.ax-progress { position: fixed; top: 0; inset-inline: 0; height: 4px; z-index: 300; background: transparent; pointer-events: none; }
.ax-progress span { display: block; height: 100%; width: 0; background: var(--bx-grad); box-shadow: 0 0 12px rgba(224, 98, 40, .6); transition: width .08s linear; }

/* 1. Header */
.ax-head { position: relative; padding: 128px 0 0; background:
    radial-gradient(760px 360px at 92% 0%, rgba(224, 98, 40, .16), transparent 62%),
    radial-gradient(560px 300px at 0% 30%, rgba(188, 0, 0, .06), transparent 60%),
    linear-gradient(to bottom, var(--bx-cream-2) 0, var(--bx-cream-2) calc(100% - 170px), var(--bx-cream) calc(100% - 170px)); }
.ax-head--nocover { padding-bottom: 8px; background:
    radial-gradient(760px 360px at 92% 0%, rgba(224, 98, 40, .16), transparent 62%), var(--bx-cream-2); border-bottom: 1px solid var(--bx-line); }
.ax-head__inner { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.ax-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 20px; font-size: 13px; color: var(--bx-muted); }
.ax-crumbs a { color: var(--bx-muted); }
.ax-crumbs a:hover { color: var(--bx-red); }
.ax-crumbs i { font-size: 14px; opacity: .55; }
.ax-cat { display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 999px; background: var(--bx-grad); color: #fff !important; font-size: 13px; font-weight: 800; box-shadow: 0 10px 20px -12px rgba(188, 0, 0, .8); }
.ax-title { margin: 18px 0; font-size: clamp(30px, 4.3vw, 52px); line-height: 1.28; font-weight: 800; color: var(--bx-ink); text-wrap: balance; }
.ax-lead { margin: 0; max-width: 62ch; padding-inline-start: 18px; border-inline-start: 4px solid #e8876a; font-family: 'Tajawal', 'SuisseIntl', system-ui, sans-serif; font-size: clamp(17px, 1.55vw, 20px); line-height: 1.9; color: #5d534e; }
.ax-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--bx-line); }
.ax-author { display: flex; align-items: center; gap: 12px; }
.ax-author .bx-avatar { width: 46px; height: 46px; font-size: 18px; }
.ax-author b { display: block; font-size: 15px; color: var(--bx-ink); }
.ax-author small { display: block; font-size: 12.5px; color: var(--bx-muted); }
.ax-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ax-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--bx-line); font-size: 13px; font-weight: 700; color: var(--bx-text); }
.ax-facts i { color: var(--bx-red); font-size: 15px; }
.ax-cover { max-width: 1120px; margin: 34px auto 0; padding: 0 20px; }
.ax-cover img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: cover; border-radius: 28px; background: #efe3da; box-shadow: var(--bx-shadow-lg); }

/* 2. Reading area */
.ax-body { display: grid; grid-template-columns: 240px minmax(0, 720px) 52px; justify-content: center; align-items: start; gap: 52px; max-width: 1240px; margin: 0 auto; padding: 52px 20px 30px; }
.ax-body--noaside { grid-template-columns: minmax(0, 720px) 52px; }
.ax-body--norail { grid-template-columns: 240px minmax(0, 720px); }
.ax-body--noaside.ax-body--norail { grid-template-columns: minmax(0, 720px); }
.ax-article { min-width: 0; }

.ax-aside { position: sticky; top: 104px; display: grid; gap: 18px; max-height: calc(100vh - 124px); overflow: auto; scrollbar-width: thin; padding-bottom: 4px; }
.ax-toc-box__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--bx-ink); }
.ax-toc-box__title i { color: var(--bx-red); font-size: 17px; }
.ax-toc__bar { height: 3px; margin: 0 0 10px; border-radius: 999px; background: #f3e2d8; overflow: hidden; }
.ax-toc__bar span { display: block; height: 100%; width: 0; background: var(--bx-grad); }
.ax-toc { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid #f0ddd2; }
.ax-toc a { display: block; margin-inline-start: -2px; padding: 6px 12px; border-inline-start: 2px solid transparent; font-size: 13.5px; line-height: 1.6; color: var(--bx-muted); transition: color .2s, border-color .2s, background .2s; }
.ax-toc .is-sub a { padding-inline-start: 24px; font-size: 12.8px; }
.ax-toc a:hover { color: var(--bx-red); }
.ax-toc a.is-on { color: var(--bx-red); font-weight: 800; border-inline-start-color: var(--bx-red); background: linear-gradient(90deg, rgba(255, 241, 234, .9), transparent); }
html[dir="rtl"] .ax-toc a.is-on { background: linear-gradient(270deg, rgba(255, 241, 234, .9), transparent); }

.ax-expert { position: relative; overflow: hidden; padding: 18px; border-radius: 20px; background: var(--bx-ink); color: #fff; }
.ax-expert::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 98, 40, .55), transparent 65%); top: -80px; inset-inline-end: -60px; }
.ax-expert > * { position: relative; }
.ax-expert__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.ax-expert__title i { color: #ffb08a; font-size: 17px; }
.ax-expert p { margin: 0 0 12px; font-size: 13px; line-height: 1.85; color: rgba(255, 255, 255, .75); }
.ax-expert .bx-btn { width: 100%; padding: 10px 14px; font-size: 13.5px; }

.ax-rail { position: sticky; top: 130px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ax-rail__label { font-size: 11.5px; font-weight: 800; color: var(--bx-muted); }
.ax-rail a, .ax-rail button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--bx-line); background: #fff; color: var(--bx-text); font-size: 18px; cursor: pointer; transition: all .2s ease; }
.ax-rail a:hover, .ax-rail button:hover { background: var(--bx-grad); border-color: transparent; color: #fff; transform: scale(1.06); }

/* Key points */
.ax-points { margin: 0 0 34px; padding: 22px 24px; border-radius: 22px; background: #fff; border: 1px solid #f1d5c6; box-shadow: var(--bx-shadow); }
.ax-points__title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 800; color: var(--bx-red); }
.ax-points ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ax-points li { position: relative; padding-inline-start: 34px; font-family: 'Tajawal', 'SuisseIntl', system-ui, sans-serif; font-size: 16px; line-height: 1.8; color: var(--bx-ink); }
.ax-points li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 2px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--bx-grad); color: #fff; font-size: 13px; font-weight: 800; }

/* Article typography */
.ax-content { font-family: 'Tajawal', 'SuisseIntl', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 19px; line-height: 2.05; color: #2b2522; overflow-wrap: break-word; }
html[lang="en"] .ax-content { font-size: 18.5px; line-height: 1.8; }
html[lang="en"] .ax-content h2, html[lang="en"] .ax-content h3, html[lang="en"] .ax-content h4 { font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; letter-spacing: -.01em; }
.ax-content > *:first-child { margin-top: 0; }
.ax-content p { margin: 0 0 1.35em; }
.ax-content h2, .ax-content h3, .ax-content h4 { font-family: 'SuisseIntl', 'Tajawal', sans-serif; color: var(--bx-ink); font-weight: 800; scroll-margin-top: 110px; }
.ax-content h2 { position: relative; margin: 2.1em 0 .75em; padding-inline-start: 18px; font-size: clamp(23px, 2.4vw, 29px); line-height: 1.45; }
.ax-content h2::before { content: ""; position: absolute; inset-inline-start: 0; top: .25em; bottom: .25em; width: 5px; border-radius: 4px; background: var(--bx-grad); }
.ax-content h3 { margin: 1.7em 0 .6em; font-size: 21.5px; line-height: 1.55; }
.ax-content h4 { margin: 1.4em 0 .5em; font-size: 18.5px; }
.ax-content a { color: var(--bx-red); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(200, 38, 15, .35); text-decoration-thickness: 2px; text-underline-offset: 5px; transition: text-decoration-color .2s; }
.ax-content a:hover { text-decoration-color: var(--bx-red); }
.ax-content a[style*="background"] { display: inline-flex; margin: 4px 0; text-decoration: none; border-radius: 14px !important; line-height: 1.5; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .55); transition: transform .2s var(--bx-ease); }
.ax-content a[style*="background"]:hover { transform: translateY(-2px); }
.ax-content strong, .ax-content b { color: var(--bx-ink); font-weight: 700; }
.ax-content ul, .ax-content ol { margin: 0 0 1.4em; padding: 0; list-style: none; }
.ax-content li { position: relative; padding-inline-start: 30px; margin-bottom: .5em; }
.ax-content ul > li::before { content: ""; position: absolute; inset-inline-start: 6px; top: .8em; width: 9px; height: 9px; border-radius: 3px; background: var(--bx-grad); transform: rotate(45deg); }
.ax-content ol { counter-reset: ax; }
.ax-content ol > li { counter-increment: ax; padding-inline-start: 36px; }
.ax-content ol > li::before { content: counter(ax); position: absolute; inset-inline-start: 0; top: .35em; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #fff0e8; color: var(--bx-red); font-size: 13px; font-weight: 800; line-height: 1; }
.ax-content blockquote { position: relative; margin: 1.8em 0; padding: 22px 26px; padding-inline-end: 64px; border-radius: 20px; border-inline-start: 5px solid var(--bx-red); background: #fff; font-size: 1.08em; line-height: 1.9; font-weight: 700; color: var(--bx-ink); box-shadow: var(--bx-shadow); }
.ax-content blockquote::after { content: "\201D"; position: absolute; top: 12px; inset-inline-end: 18px; font-family: Georgia, serif; font-size: 64px; line-height: 1; color: #f0c2ad; }
.ax-content blockquote p:last-child { margin: 0; }
.ax-content img { display: block; max-width: 100%; height: auto !important; margin: 1.8em auto; border-radius: 18px; object-fit: contain; box-shadow: 0 18px 40px -28px rgba(60, 20, 10, .55); }
.ax-content figure { margin: 1.9em 0; }
.ax-content figure img { margin: 0 auto; }
.ax-content figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--bx-muted); }
.ax-content table { display: block; width: 100%; overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--bx-line); border-radius: 16px; border-collapse: separate; border-spacing: 0; background: #fff; font-size: 15.5px; line-height: 1.7; }
.ax-content th { background: #fff4ee; color: var(--bx-ink); font-weight: 800; }
.ax-content th, .ax-content td { padding: 12px 16px; border-bottom: 1px solid var(--bx-line); text-align: start; vertical-align: top; }
.ax-content hr { margin: 2.4em 0; border: 0; height: 1px; background: linear-gradient(90deg, transparent, #e7cbbb, transparent); }
.ax-content code { padding: 2px 7px; border-radius: 7px; background: #fff0e8; color: var(--bx-red); font-size: .88em; }
.ax-content pre { overflow-x: auto; padding: 16px; border-radius: 14px; background: var(--bx-ink); color: #fbe9df; font-size: 14px; line-height: 1.7; direction: ltr; text-align: left; }
.ax-content iframe, .ax-content video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 1.8em 0; border: 0; border-radius: 18px; }

/* End of article: tags + share */
.ax-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 36px; padding-top: 22px; border-top: 1px dashed #e5cfc1; }
.ax-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-tags a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--bx-line); color: var(--bx-text); font-size: 13px; font-weight: 700; }
.ax-tags a:hover { border-color: #efc2ad; color: var(--bx-red); }
.ax-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ax-share__label { margin-inline-end: 2px; font-size: 13px; font-weight: 800; color: var(--bx-muted); }
.ax-share a, .ax-share button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--bx-line); background: #fff; color: var(--bx-text); font-size: 18px; cursor: pointer; transition: all .2s ease; }
.ax-share a:hover, .ax-share button:hover { background: var(--bx-grad); border-color: transparent; color: #fff; transform: translateY(-2px); }

/* Author */
.ax-authorbox { display: flex; gap: 18px; align-items: flex-start; margin-top: 30px; padding: 24px; border-radius: 24px; background: #fff; border: 1px solid var(--bx-line); }
.ax-authorbox .bx-avatar { width: 60px; height: 60px; font-size: 22px; }
.ax-authorbox small { font-size: 12px; font-weight: 800; color: var(--bx-red); }
.ax-authorbox b { display: block; margin: 2px 0 6px; font-size: 18px; color: var(--bx-ink); }
.ax-authorbox p { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--bx-muted); }

/* Call to action */
.ax-cta { position: relative; overflow: hidden; margin-top: 30px; padding: 32px; border-radius: 28px; background: var(--bx-grad); color: #fff; box-shadow: var(--bx-shadow-lg); }
.ax-cta::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .12); top: -150px; inset-inline-end: -80px; }
.ax-cta::after { content: "\1F680"; position: absolute; font-size: 110px; opacity: .14; inset-inline-end: 24px; bottom: -28px; transform: rotate(-14deg); }
.ax-cta > * { position: relative; z-index: 1; }
.ax-cta h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: #fff; }
.ax-cta p { margin: 0 0 18px; max-width: 540px; line-height: 1.9; color: rgba(255, 255, 255, .9); }

/* Previous / next */
.ax-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.ax-nav a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--bx-line); transition: all .25s ease; }
.ax-nav a:hover { border-color: #efc2ad; transform: translateY(-2px); box-shadow: var(--bx-shadow); }
.ax-nav small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--bx-red); }
.ax-nav b { font-size: 14.5px; line-height: 1.6; color: var(--bx-ink); }
.ax-nav__next { text-align: end; align-items: flex-end; }

/* Related */
.ax-related { padding: 36px 0 70px; }
.ax-related__head { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.ax-related__head h2 { margin: 0; font-size: 26px; font-weight: 800; color: var(--bx-ink); }
.ax-related__head a { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--bx-red); }

/* Contents on smaller screens (collapsible, before the article) */
.ax-toc-m { display: none; margin-bottom: 24px; }
.ax-toc-m summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--bx-line); font-weight: 800; color: var(--bx-ink); }
.ax-toc-m summary::-webkit-details-marker { display: none; }
.ax-toc-m summary > span { display: inline-flex; align-items: center; gap: 8px; }
.ax-toc-m summary i { color: var(--bx-red); }
.ax-toc-m[open] summary { border-radius: 16px 16px 0 0; }
.ax-toc-m[open] summary .ri-arrow-down-s-line { transform: rotate(180deg); }
.ax-toc-m .ax-toc { padding: 10px 12px; background: #fff; border: 1px solid var(--bx-line); border-top: 0; border-radius: 0 0 16px 16px; }

/* ── responsive ── */
@media (max-width: 1180px) {
    .ax-body, .ax-body--noaside, .ax-body--norail { grid-template-columns: minmax(0, 720px); gap: 0; padding-top: 40px; }
    .ax-aside, .ax-rail { display: none; }
    .ax-toc-m { display: block; }
}
@media (max-width: 1024px) {
    .bx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bx-card--wide { grid-column: span 2; }
}
@media (max-width: 860px) {
    .bx-hero { padding: 116px 0 36px; }
    .bx-hero__grid { grid-template-columns: 1fr; gap: 30px; }
    .bx-feature { transform: none; aspect-ratio: 4 / 3.4; }
    .bx-news__box { grid-template-columns: 1fr; padding: 28px 22px; }
    .bx-cats { top: 70px; }
}
@media (max-width: 640px) {
    .bx-wrap, .ax-wrap { padding: 0 16px; }
    .bx-grid { grid-template-columns: 1fr; }
    .bx-card--wide { grid-column: auto; flex-direction: column; }
    .bx-card--wide .bx-card__img { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
    .bx-hero__stats { gap: 18px; }
    .bx-search button { padding: 11px 14px; }
    .ax-head { padding-top: 100px; background:
        radial-gradient(420px 260px at 100% 0%, rgba(224, 98, 40, .16), transparent 62%),
        linear-gradient(to bottom, var(--bx-cream-2) 0, var(--bx-cream-2) calc(100% - 90px), var(--bx-cream) calc(100% - 90px)); }
    .ax-head__inner { padding: 0 16px; }
    .ax-title { margin: 14px 0; font-size: clamp(26px, 7.4vw, 32px); line-height: 1.38; }
    .ax-lead { font-size: 16.5px; padding-inline-start: 14px; }
    .ax-byline { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 22px; }
    .ax-facts li { padding: 6px 11px; font-size: 12.5px; }
    .ax-cover { margin-top: 24px; padding: 0 12px; }
    .ax-cover img { border-radius: 18px; max-height: 420px; }
    .ax-body, .ax-body--noaside, .ax-body--norail { padding: 30px 16px 16px; }
    .ax-content { font-size: 17.5px; line-height: 2; }
    html[lang="en"] .ax-content { font-size: 17px; line-height: 1.75; }
    .ax-content h2 { font-size: 22px; }
    .ax-content h3 { font-size: 19.5px; }
    .ax-content blockquote { padding: 18px; padding-inline-end: 50px; }
    .ax-content img { border-radius: 14px; }
    .ax-points { padding: 18px; }
    .ax-authorbox { flex-direction: column; padding: 20px; }
    .ax-nav { grid-template-columns: 1fr; }
    .ax-nav__next { text-align: start; align-items: flex-start; }
    .ax-cta { padding: 26px 20px; }
    .ax-end { flex-direction: column; align-items: flex-start; }
    .ax-related__head h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .bx-card, .bx-card__img img, .bx-feature, .bx-feature__img img, .ax-progress span { transition: none; }
}
