/* ============================================================
   SINOX API — ARTICLES.CSS  (۱۱ اکتبر — بازطراحی مقالات)
   صفحه‌های عمومی مقالات: فهرست (/articles، دسته، برچسب) و تک‌مقاله.
   پیشوند کلاس‌ها arx-؛ محتوای مقاله: همهٔ تگ‌های مجاز lib/article-html.js (جدول اسکرولی، کد با دکمهٔ کپی و ltr،
   کال‌اوت‌ها .sx-callout.{info,tip,warning,danger}، figure، details، ویدیو/iframe ۱۶:۹).
   وابسته به tokens.css + base.css + components.css؛ تم تیره/روشن فقط با توکن‌ها؛ ۳۹۰px بدون اسکرول افقی.
   ============================================================ */

.arx-wrap { padding-block: var(--space-6) var(--space-16); max-width: 1240px; }
.arx-wrap > * { min-width: 0; }

/* ---------- مسیر صفحه (breadcrumb) ---------- */
.arx-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding: 0; margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.arx-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.arx-crumbs li + li::before { content: '‹'; margin-inline: 8px; color: var(--text-dim); }
.arx-crumbs a { color: var(--text-muted); }
.arx-crumbs a:hover { color: var(--text-1); }
.arx-crumbs [aria-current] span { color: var(--text-2); max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* ---------- چیپ‌ها ---------- */
.arx-chip, .arx-chip-sm {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-full);
  border: 1px solid var(--primary-border-tint); background: var(--primary-tint); color: var(--primary-light);
  font-weight: var(--fw-bold); white-space: nowrap; transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base);
}
.arx-chip { padding: 6px 14px; font-size: var(--fs-sm); }
.arx-chip-sm { padding: 3px 10px; font-size: 11.5px; }
.arx-chip:hover, .arx-chip-sm:hover { background: var(--primary-tint-strong); color: var(--primary-lighter); }
.arx-chip.is-muted, .arx-chip-sm.is-muted { border-color: var(--border-1); background: var(--surface-tint); color: var(--text-muted); }
.arx-chip[aria-current] { background: var(--grad-brand); border-color: transparent; color: #fff; }
.arx-chip .n { font-size: 11px; opacity: .75; font-weight: var(--fw-medium); }

/* ============================================================
   صفحهٔ تک‌مقاله
   ============================================================ */
.arx-preview-banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: var(--space-5);
  border: 1px dashed var(--yellow-border-tint); background: var(--yellow-tint); border-radius: var(--radius-xl); color: var(--text-2);
}
.arx-preview-banner svg { color: var(--yellow); flex: none; margin-top: 3px; }
.arx-preview-banner strong { display: block; color: var(--yellow-light); font-size: var(--fs-md); }
.arx-preview-banner span { font-size: var(--fs-sm); line-height: 1.9; }

.arx-article { margin-top: var(--space-5); }
.arx-head { max-width: 820px; }
.arx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.arx-title { margin-top: var(--space-4); font-size: clamp(26px, 2.6vw + 16px, 44px); font-weight: var(--fw-black); line-height: 1.45; letter-spacing: 0; color: var(--text-1); }
.arx-lead { margin-top: var(--space-4); font-size: clamp(16px, .4vw + 14.5px, 19px); line-height: 2; color: var(--text-2); max-width: 70ch; }
.arx-meta { margin-top: var(--space-5); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: var(--fs-sm); color: var(--text-muted); }
.arx-meta-i { display: inline-flex; align-items: center; gap: 6px; }
.arx-meta-i svg { color: var(--text-dim); }
.arx-author { display: inline-flex; align-items: center; gap: 8px; color: var(--text-1); font-weight: var(--fw-bold); }
.arx-avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--grad-brand); color: #fff; font-size: 13px; font-weight: var(--fw-black); }

.arx-cover { margin: var(--space-7) 0 0; }
.arx-cover img { width: 100%; height: auto; max-height: 560px; object-fit: cover; border-radius: var(--radius-2xl); border: 1px solid var(--border-1); background: var(--elev-2); display: block; aspect-ratio: auto; }
.arx-cover figcaption { margin-top: 10px; font-size: var(--fs-sm); color: var(--text-muted); text-align: center; }
.arx-video { margin-top: var(--space-6); }

.arx-layout { margin-top: var(--space-8); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-10); align-items: start; }
.arx-article.has-toc .arx-layout { grid-template-columns: 270px minmax(0, 1fr); }
.arx-main { min-width: 0; max-width: 780px; }
.arx-aside { position: sticky; top: calc(var(--nav-h) + 16px); max-height: calc(100vh - var(--nav-h) - 32px); overflow: auto; order: 0; }

/* ---------- فهرست مطالب ---------- */
.arx-toc { border: 1px solid var(--border-1); border-radius: var(--radius-xl); background: var(--card); overflow: hidden; }
.arx-toc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  font-weight: var(--fw-extrabold); font-size: var(--fs-base); color: var(--text-1); user-select: none;
}
.arx-toc > summary::-webkit-details-marker { display: none; }
.arx-toc > summary > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.arx-toc > summary svg { color: var(--primary-light); }
.arx-toc-count { margin-inline-start: auto; font-size: 11.5px; color: var(--text-muted); font-weight: var(--fw-medium); }
.arx-toc-chev { transition: transform var(--dur-base); color: var(--text-muted) !important; }
.arx-toc[open] .arx-toc-chev { transform: rotate(180deg); }
.arx-toc nav { border-top: 1px solid var(--border-1); padding: 8px; }
.arx-toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; counter-reset: toc; }
.arx-toc-list a { position: relative; display: block; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.7; color: var(--text-muted); }
.arx-toc-list li.lv2 { counter-increment: toc; }
.arx-toc-list li.lv2 > a::before { content: counter(toc, persian) '. '; color: var(--text-dim); font-weight: var(--fw-bold); }
.arx-toc-list li.lv3 > a { padding-inline-start: 26px; font-size: 12.5px; }
.arx-toc-list a:hover { color: var(--text-1); background: var(--surface-tint); }
.arx-toc-list a.is-active { color: var(--text-1); background: var(--primary-tint); font-weight: var(--fw-bold); }
.arx-toc-list a.is-active::after { content: ''; position: absolute; inset-block: 7px; inset-inline-start: 0; width: 2px; border-radius: 2px; background: var(--primary); }

/* ---------- محتوای مقاله (تایپوگرافی) ---------- */
.arx-content { font-size: 17px; line-height: 2.05; color: var(--text-2); overflow-wrap: anywhere; }
.arx-content > * + * { margin-top: 1.1em; }
.arx-content > :first-child { margin-top: 0; }
.arx-content p { line-height: 2.05; color: var(--text-2); }
.arx-content h2, .arx-content h3, .arx-content h4, .arx-content h5, .arx-content h6 { color: var(--text-1); scroll-margin-top: calc(var(--nav-h) + 20px); letter-spacing: 0; line-height: 1.6; }
.arx-content h2 { margin-top: 2em; font-size: clamp(20px, .9vw + 15px, 25px); padding-bottom: 10px; border-bottom: 1px solid var(--border-1); }
.arx-content h3 { margin-top: 1.6em; font-size: clamp(18px, .5vw + 15px, 20.5px); }
.arx-content h4 { margin-top: 1.4em; font-size: 17.5px; }
.arx-content h5, .arx-content h6 { margin-top: 1.2em; font-size: 16px; color: var(--text-2); }
.arx-content a { color: var(--primary-light); text-decoration: underline; text-decoration-color: var(--primary-border-tint); text-underline-offset: 4px; }
.arx-content a:hover { text-decoration-color: currentColor; }
.arx-content ul, .arx-content ol { padding-inline-start: 1.5em; }
.arx-content ul { list-style: disc; }
.arx-content ol { list-style: decimal; }
.arx-content ol { list-style-type: persian; }
.arx-content li + li { margin-top: .45em; }
.arx-content li::marker { color: var(--primary-light); }
.arx-content strong, .arx-content b { color: var(--text-1); }
.arx-content mark { background: var(--yellow-tint); color: var(--text-1); padding: 1px 4px; border-radius: 4px; box-shadow: inset 0 -2px 0 var(--yellow-border-tint); }
.arx-content small { font-size: .85em; }
.arx-content sub, .arx-content sup { font-size: .72em; }
.arx-content del, .arx-content s { color: var(--text-muted); }
.arx-content u { text-underline-offset: 4px; }
.arx-content hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border-2), transparent); margin-block: 2.2em; }
.arx-content kbd {
  display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--border-2); border-bottom-width: 3px;
  background: var(--elev-1); font-size: .82em; color: var(--text-1); line-height: 1.6;
}
.arx-content code { font-size: .86em; }
.arx-content img { max-width: 100%; height: auto; border-radius: var(--radius-xl); border: 1px solid var(--border-1); }
.arx-content figure { margin-inline: 0; }
.arx-content figure img { display: block; margin-inline: auto; }
.arx-content figcaption { margin-top: 8px; text-align: center; font-size: var(--fs-sm); color: var(--text-muted); }
.arx-content blockquote {
  margin-inline: 0; padding: 14px 18px; border-inline-start: 3px solid var(--primary); background: var(--primary-tint);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0; color: var(--text-1); font-style: normal;
}
[dir="rtl"] .arx-content blockquote { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.arx-content blockquote > * + * { margin-top: .6em; }
.arx-content .align-center, .arx-content [style*="text-align: center"] { text-align: center; }

/* بلوک کد + دکمهٔ کپی */
.arx-code { position: relative; }
.arx-content pre {
  direction: ltr; text-align: left; unicode-bidi: isolate; margin: 0;
  padding: 18px 18px 18px; padding-top: 40px; border: 1px solid var(--border-1); border-radius: var(--radius-xl);
  background: var(--surface-deep); overflow-x: auto; font-size: 13.5px; line-height: 1.75; color: var(--text-1); tab-size: 2;
}
.arx-content pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.arx-code-copy {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--elev-2); color: var(--text-muted);
  font-size: 11.5px; font-family: var(--font-sans); cursor: pointer; transition: color var(--dur-base), border-color var(--dur-base);
}
.arx-code-copy:hover { color: var(--text-1); border-color: var(--border-3); }
.arx-code-copy.is-done { color: var(--green-light); border-color: var(--green-border-tint); }

/* جدول (اسکرول افقی در موبایل) */
.arx-content .sx-table-wrap { overflow-x: auto; border: 1px solid var(--border-1); border-radius: var(--radius-xl); -webkit-overflow-scrolling: touch; }
.arx-content table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.8; min-width: 480px; }
.arx-content caption { caption-side: top; padding: 10px 14px; text-align: start; font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-bold); }
.arx-content th, .arx-content td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); text-align: start; vertical-align: top; }
.arx-content thead th, .arx-content tr > th:only-child { background: var(--elev-1); color: var(--text-1); font-weight: var(--fw-extrabold); }
.arx-content tbody tr:nth-child(even) td { background: var(--surface-tint); }
.arx-content tr:last-child td { border-bottom: 0; }

/* کال‌اوت‌ها */
.arx-content .sx-callout, .arx-content [class*="callout-"] {
  position: relative; padding: 14px 18px 14px 18px; padding-inline-start: 48px; border-radius: var(--radius-xl);
  border: 1px solid var(--primary-border-tint); background: var(--primary-tint); color: var(--text-1);
}
.arx-content .sx-callout::before, .arx-content [class*="callout-"]::before {
  content: 'i'; position: absolute; inset-inline-start: 14px; top: 15px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font: 900 13px/1 var(--font-mono); color: #fff; background: var(--primary);
}
.arx-content .sx-callout > * + * { margin-top: .5em; }
.arx-content .sx-callout.tip, .arx-content .sx-callout-tip, .arx-content .sx-callout--tip, .arx-content .callout-tip,
.arx-content .sx-callout.success, .arx-content .sx-callout-success { border-color: var(--green-border-tint); background: var(--green-tint); }
.arx-content .sx-callout.tip::before, .arx-content .sx-callout-tip::before, .arx-content .sx-callout--tip::before, .arx-content .callout-tip::before,
.arx-content .sx-callout.success::before, .arx-content .sx-callout-success::before { content: '✓'; background: var(--green); }
.arx-content .sx-callout.warning, .arx-content .sx-callout-warning, .arx-content .sx-callout--warning, .arx-content .callout-warning { border-color: var(--yellow-border-tint); background: var(--yellow-tint); }
.arx-content .sx-callout.warning::before, .arx-content .sx-callout-warning::before, .arx-content .sx-callout--warning::before, .arx-content .callout-warning::before { content: '!'; background: var(--yellow); color: var(--text-on-yellow); }
.arx-content .sx-callout.danger, .arx-content .sx-callout-danger, .arx-content .sx-callout--danger, .arx-content .callout-danger { border-color: var(--red-border-tint); background: var(--red-tint); }
.arx-content .sx-callout.danger::before, .arx-content .sx-callout-danger::before, .arx-content .sx-callout--danger::before, .arx-content .callout-danger::before { content: '×'; background: var(--red); }
.arx-content .sx-callout.note, .arx-content .sx-callout-note { border-color: var(--border-2); background: var(--surface-tint); }
.arx-content .sx-callout.note::before, .arx-content .sx-callout-note::before { content: '✎'; background: var(--text-muted); }

/* details/summary داخل متن */
.arx-content details { border: 1px solid var(--border-1); border-radius: var(--radius-lg); background: var(--card); padding: 0 16px; }
.arx-content details > summary { cursor: pointer; padding: 12px 0; font-weight: var(--fw-bold); color: var(--text-1); }
.arx-content details[open] > summary { border-bottom: 1px solid var(--border-1); margin-bottom: 10px; }
.arx-content details > :last-child { margin-bottom: 12px; }

/* ویدیو/iframe ۱۶:۹ */
.sx-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-xl); overflow: hidden; background: var(--bg2); border: 1px solid var(--border-1); }
.sx-embed iframe, .sx-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* ---------- برچسب‌ها، FAQ، اشتراک، قبلی/بعدی ---------- */
.arx-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.arx-main > .arx-tags { margin-top: var(--space-10); padding-top: var(--space-6); border-top: 1px solid var(--border-1); }
.arx-tags-label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-bold); }
.arx-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-full); border: 1px solid var(--border-1); background: var(--elev-1); color: var(--text-2); font-size: var(--fs-sm); }
.arx-tag:hover, .arx-tag.is-active { border-color: var(--primary-border-tint); color: var(--primary-light); background: var(--primary-tint); }
.arx-tag .n { font-size: 11px; color: var(--text-muted); }

.arx-faq { margin-top: var(--space-10); }
.arx-faq h2 { font-size: clamp(20px, .9vw + 15px, 24px); margin-bottom: var(--space-4); letter-spacing: 0; }
.arx-faq-item { border: 1px solid var(--border-1); border-radius: var(--radius-xl); background: var(--card); transition: border-color var(--dur-base); }
.arx-faq-item + .arx-faq-item { margin-top: 10px; }
.arx-faq-item[open] { border-color: var(--primary-border-tint); }
.arx-faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; font-weight: var(--fw-bold); color: var(--text-1); line-height: 1.8; }
.arx-faq-item > summary::-webkit-details-marker { display: none; }
.arx-faq-chev { flex: none; color: var(--text-muted); transition: transform var(--dur-base); }
.arx-faq-item[open] .arx-faq-chev { transform: rotate(180deg); color: var(--primary-light); }
.arx-faq-a { padding: 0 18px 16px; color: var(--text-2); line-height: 2; }
.arx-faq-a p + p { margin-top: .6em; }

.arx-share { margin-top: var(--space-8); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.arx-share-label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-bold); margin-inline-end: 4px; }
.arx-share-btn {
  width: 40px; height: 40px; border-radius: var(--radius-md); display: inline-grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border-1); background: var(--elev-1); color: var(--text-muted); transition: all var(--dur-base);
}
.arx-share-btn:hover { color: var(--text-1); border-color: var(--border-3); background: var(--elev-2); }
.arx-share-btn.is-tg:hover { color: #2aabee; } .arx-share-btn.is-wa:hover { color: #25d366; } .arx-share-btn.is-li:hover { color: #0a66c2; }
.arx-share-btn.is-done { color: var(--green-light); border-color: var(--green-border-tint); }

.arx-prevnext { margin-top: var(--space-8); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.arx-pn { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border-1); border-radius: var(--radius-xl); background: var(--card); min-width: 0; transition: border-color var(--dur-base), background var(--dur-base); }
.arx-pn:hover { border-color: var(--primary-border-tint); background: var(--elev-3); }
.arx-pn.is-prev { text-align: left; }
.arx-pn.is-prev .arx-pn-l { justify-content: flex-end; }
.arx-pn-l { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.arx-pn-t { color: var(--text-1); font-weight: var(--fw-bold); font-size: var(--fs-base); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.arx-related { margin-top: var(--space-14); padding-top: var(--space-8); border-top: 1px solid var(--border-1); }
.arx-related h2, .arx-sec-title { font-size: clamp(19px, .8vw + 14px, 23px); letter-spacing: 0; margin-bottom: var(--space-5); display: flex; align-items: center; gap: 8px; }
.arx-sec-title svg { color: var(--primary-light); }

.arx-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: calc(var(--z-nav) + 1); background: var(--grad-accent); transform-origin: right center; transform: scaleX(0); pointer-events: none; }

.arx-notfound { text-align: center; padding: var(--space-20) var(--space-4); max-width: 520px; margin-inline: auto; }
.arx-nf-code { font-family: var(--font-mono); font-size: 72px; font-weight: 700; background: var(--grad-text-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.arx-notfound h1 { font-size: var(--fh-h3); margin-top: var(--space-4); }
.arx-notfound p { color: var(--text-muted); margin-block: var(--space-3) var(--space-6); }

/* ============================================================
   فهرست / دسته / برچسب
   ============================================================ */
.arx-hero { padding-block: var(--space-8) var(--space-6); }
.arx-hero .arx-crumbs { margin-bottom: var(--space-5); }
.arx-hero-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--tracking-mono-wide); color: var(--primary); text-align: end; }
.arx-hero-title { margin-top: 10px; font-size: var(--fh-h2); letter-spacing: 0; }
.arx-hero-sub { margin-top: 10px; font-size: var(--fs-md); color: var(--text-muted); max-width: 64ch; }
.arx-search {
  margin-top: var(--space-6); display: flex; align-items: center; gap: 8px; max-width: 620px; height: 52px; padding: 0 6px 0 6px; padding-inline-start: 16px;
  border: 1px solid var(--border-2); border-radius: var(--radius-full); background: var(--elev-1); transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.arx-search:focus-within { border-color: var(--primary); box-shadow: var(--ring-primary); }
.arx-search svg { color: var(--text-muted); flex: none; }
.arx-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text-1); font: inherit; font-size: var(--fs-md); outline: none; }
.arx-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.arx-search-btn { flex: none; height: 40px; padding: 0 18px; border: 0; border-radius: var(--radius-full); background: var(--grad-brand); color: #fff; font: inherit; font-weight: var(--fw-bold); cursor: pointer; }
.arx-hero-stats { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); color: var(--text-muted); }
.arx-rss { display: inline-flex; align-items: center; gap: 5px; color: var(--yellow-light); }

.arx-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: var(--space-6); scrollbar-width: none; }
.arx-cats::-webkit-scrollbar { display: none; }

.arx-featured { margin-bottom: var(--space-8); }
.arx-feat-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-4); }
.arx-feat { position: relative; min-height: 240px; border-radius: var(--radius-2xl); overflow: hidden; display: flex; align-items: flex-end; border: 1px solid var(--border-1); isolation: isolate; }
.arx-feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform var(--dur-slower) var(--ease-out); }
.arx-feat:hover img { transform: scale(1.04); }
.arx-feat-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 7, 15, 0) 25%, rgba(7, 7, 15, .9)); }
.arx-feat-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; color: #fff; }
.arx-feat-body .arx-chip-sm { align-self: flex-start; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: #fff; backdrop-filter: blur(4px); }
.arx-feat-title { font-weight: var(--fw-black); font-size: clamp(16px, .7vw + 13px, 20px); line-height: 1.6; color: #fff; }
.arx-feat-meta { font-size: 12px; color: rgba(255, 255, 255, .78); }

.arx-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: var(--space-5); }
.arx-sort { display: inline-flex; padding: 4px; border-radius: var(--radius-full); border: 1px solid var(--border-1); background: var(--elev-1); }
.arx-sort a { padding: 6px 14px; border-radius: var(--radius-full); font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-bold); }
.arx-sort a[aria-current] { background: var(--elev-3); color: var(--text-1); box-shadow: var(--shadow-ink); }
.arx-count { font-size: var(--fs-sm); color: var(--text-muted); }

.arx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.arx-grid.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.arx-card { display: flex; flex-direction: column; border: 1px solid var(--border-1); border-radius: var(--radius-2xl); background: var(--card); overflow: hidden; min-width: 0;
  transition: border-color var(--dur-base), transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base); }
.arx-card:hover { border-color: var(--primary-border-tint); transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.arx-card-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--elev-3); }
.arx-card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slower) var(--ease-out); }
.arx-card:hover .arx-card-cover img { transform: scale(1.05); }
.arx-cover-letter { font-family: var(--font-sans); font-weight: var(--fw-black); font-size: 54px; color: rgba(255, 255, 255, .85); line-height: 1; }
.arx-card-video { position: absolute; bottom: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-full); background: rgba(7, 7, 15, .75); color: #fff; font-size: 11.5px; font-weight: var(--fw-bold); }
.arx-card-body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; flex: 1; gap: 10px; }
.arx-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.arx-pin { color: var(--yellow); display: inline-flex; }
.arx-card-title { font-size: var(--fs-xl); font-weight: var(--fw-extrabold); line-height: 1.7; letter-spacing: 0; }
.arx-card-title a { color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arx-card-title a:hover { color: var(--primary-light); }
.arx-card-sum { font-size: var(--fs-base); line-height: 2; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arx-card-meta { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: var(--fs-xs); color: var(--text-muted); padding-top: 4px; }
.arx-card-meta .sep { width: 1px; height: 11px; background: var(--border-2); }
.arx-card.is-compact .arx-card-title { font-size: var(--fs-md); }
.arx-card.is-compact .arx-cover-letter { font-size: 40px; }
.arx-g0 { background: linear-gradient(135deg, var(--primary), var(--primary2) 60%, var(--cyan)); }
.arx-g1 { background: linear-gradient(135deg, #312e81, #6366f1); }
.arx-g2 { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.arx-g3 { background: linear-gradient(135deg, #4c1d95, #8b5cf6); }
.arx-g4 { background: linear-gradient(135deg, #164e63, #0891b2); }
.arx-g5 { background: linear-gradient(135deg, #3730a3, #6366f1); }
.arx-g6 { background: linear-gradient(135deg, #065f46, #10b981); }

.arx-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: var(--space-16) var(--space-4); border: 1px dashed var(--border-2); border-radius: var(--radius-2xl); color: var(--text-muted); text-align: center; }
.arx-empty svg { color: var(--border-3); }
.arx-empty .t { font-weight: var(--fw-bold); color: var(--text-2); }

.arx-pager { margin-top: var(--space-8); display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.arx-pg { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: var(--radius-md); border: 1px solid var(--border-1); background: var(--elev-1); color: var(--text-2); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
a.arx-pg:hover { border-color: var(--primary-border-tint); color: var(--primary-light); }
.arx-pg.is-current { background: var(--grad-brand); color: #fff; border-color: transparent; }
.arx-pg.is-gap { border-color: transparent; background: none; }

.arx-tagcloud { margin-top: var(--space-12); padding-top: var(--space-8); border-top: 1px solid var(--border-1); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1100px) {
  .arx-article.has-toc .arx-layout { grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-8); }
  .arx-grid.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .arx-article.has-toc .arx-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .arx-aside { position: static; max-height: none; overflow: visible; }
  .arx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arx-feat-strip { grid-template-columns: 1fr 1fr; }
  .arx-feat:first-child { grid-column: 1 / -1; }
  .arx-main { max-width: none; }
}
@media (max-width: 640px) {
  .arx-wrap { padding-block: var(--space-4) var(--space-12); }
  .arx-grid, .arx-grid.is-4 { grid-template-columns: minmax(0, 1fr); }
  .arx-feat-strip { grid-template-columns: minmax(0, 1fr); }
  .arx-feat { min-height: 200px; }
  .arx-content { font-size: 16px; line-height: 2; }
  .arx-content table { font-size: 13.5px; }
  .arx-prevnext { grid-template-columns: minmax(0, 1fr); }
  .arx-pn.is-prev { text-align: start; }
  .arx-pn.is-prev .arx-pn-l { justify-content: flex-start; }
  .arx-meta { gap: 8px 14px; }
  .arx-search { height: 48px; }
  .arx-search-btn { padding: 0 14px; }
  .arx-crumbs [aria-current] span { max-width: 22ch; }
}
@media (prefers-reduced-motion: reduce) {
  .arx-card, .arx-card-cover img, .arx-feat img, .arx-toc-chev, .arx-faq-chev { transition: none !important; }
  .arx-card:hover { transform: none; }
  .arx-progress { display: none; }
}
@media print {
  .arx-aside, .arx-share, .arx-prevnext, .arx-related, .arx-progress, header[data-chrome], footer[data-chrome] { display: none !important; }
  .arx-content { color: #000; }
}

/* (۱۱ اکتبر — ادغام با SxEditor) کال‌اوتِ ویرایشگر آیکن خودش را دارد (span.sx-callout-icon) → آیکنِ ::before تکرار نشود؛ بقیهٔ بلوک‌های ویرایشگر (ستون، چک‌لیست، شکل، CTA، زبان کد) از .sx-prose در sx-editor.css می‌آیند */
.arx-content .sx-callout > .sx-callout-icon { display: none; }
/* بدنهٔ کال‌اوتِ ویرایشگر (div.sx-callout-body) با انتخابگر [class*="callout-"] اشتباهاً خودش کال‌اوت می‌شد → خنثی */
.arx-content .sx-callout .sx-callout-body { position: static; padding: 0; border: 0; background: none; border-radius: 0; }
.arx-content .sx-callout .sx-callout-body::before { content: none; display: none; }
/* چک‌لیست ویرایشگر: بدون بولت؛ علامت از .sx-prose می‌آید */
.arx-content ul.sx-checklist { list-style: none; padding-inline-start: 0; }
.arx-content table.sx-table { width: 100%; }
