/* =========================================================
   مدى سنتر — أنماط مركز المساعدة
   ترويسة بحث · شبكة تصنيفات بصور · صفحة مقال بفهرس جانبي
   ========================================================= */

/* ---------- 1. ترويسة مركز المساعدة ---------- */
.hhero {
	position: relative;
	padding-block: 82px 96px;
	background: var(--bg-dark);
	color: rgba(255, 255, 255, .8);
	overflow: hidden;
	isolation: isolate;
	border-block-end: 5px solid var(--brand);
}

.hhero-bg {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	opacity: .22;
	z-index: -2;
}

/* حجاب يضمن تباينًا كافيًا للنص مهما كانت الصورة المرفوعة فاتحة */
.hhero-mesh {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(var(--ink-rgb), .9) 0%, rgba(var(--ink-rgb), .76) 45%, rgba(var(--ink-rgb), .95) 100%),
		radial-gradient(900px 420px at 82% -8%, rgba(var(--brand-rgb), .38), transparent 62%),
		linear-gradient(135deg, transparent 0 46.7%, rgba(var(--brand-rgb), .5) 46.7% 47%, transparent 47%),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 58px),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 58px);
	pointer-events: none;
}

.hhero-in { position: relative; text-align: center; }

.hhero .crumbs { justify-content: center; margin-block-end: 22px; }
.hhero .crumbs ol { justify-content: center; }
.hhero .crumbs li { color: rgba(255, 255, 255, .5); }
.hhero .crumbs a { color: rgba(255, 255, 255, .72); }
.hhero .crumbs a:hover { color: #fff; }
.hhero .crumbs [aria-current] { color: var(--brand); }

.hhero-title {
	max-width: 17ch;
	margin-inline: auto;
	margin-block-end: 16px;
	color: #fff;
}

.hhero-sub {
	max-width: 58ch;
	margin-inline: auto;
	margin-block-end: 34px;
	font-size: 1.05rem;
	color: rgba(255, 255, 255, .72);
}

.hhero-hot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin-block-start: 22px;
}

.hhero-hot-label { font-size: .84rem; color: rgba(255, 255, 255, .45); }

.hhero-hot a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: var(--r-pill);
	font-size: .84rem;
	color: rgba(255, 255, 255, .8);
	transition: all var(--t-1);
}

.hhero-hot a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.hhero-hot .mc-icon { opacity: .6; }

/* ---------- 2. صندوق البحث ---------- */
.hsearch { position: relative; max-width: 660px; margin-inline: auto; }

.hsearch-form {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 2px solid transparent;
	border-radius: var(--r);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
	transition: box-shadow var(--t-2), border-color var(--t-2);
}

.hsearch-form:focus-within {
	border-color: var(--brand);
	box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .16), var(--sh-3);
}

.hsearch-ico {
	display: grid;
	place-items: center;
	padding-inline-start: 20px;
	color: var(--fg-3);
	flex: none;
}

.hsearch-input {
	flex: 1;
	min-width: 0;
	padding: 17px 14px;
	background: transparent;
	border: 0;
	font: inherit;
	font-size: 1rem;
	color: var(--fg);
}

.hsearch-input:focus { outline: 0; }
.hsearch-input::placeholder { color: var(--fg-3); }
.hsearch-input::-webkit-search-cancel-button { display: none; }

.hsearch-btn {
	margin: 6px;
	padding: 14px 28px;
	background: linear-gradient(135deg, var(--brand-400, #FEA95E), var(--brand-600, #F0770F));
	color: #fff;
	border: 0;
	border-radius: var(--r-sm);
	font-family: var(--f-head);
	font-size: .94rem;
	font-weight: 700;
	flex: none;
	transition: box-shadow var(--t-1);
}

.hsearch-btn:hover { box-shadow: 0 8px 20px rgba(var(--brand-rgb), .5); }
.hsearch-btn-ico { display: none; }

.hsearch--sm .hsearch-form { box-shadow: var(--sh-1); }
.hsearch--sm .hsearch-input { padding-block: 11px; font-size: .92rem; }
.hsearch--sm .hsearch-btn { padding: 9px 18px; font-size: .85rem; }
.hsearch--sm .hsearch-ico { padding-inline-start: 16px; }

.hsearch--inline { margin-inline: 0; }

/* القائمة المنسدلة للنتائج الفورية */
.hsearch-drop {
	position: absolute;
	inset-block-start: calc(100% + 10px);
	inset-inline: 0;
	z-index: 40;
	max-height: 420px;
	overflow-y: auto;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--sh-3);
	text-align: start;
}

.hsearch-drop[hidden] { display: none; }

.hsd-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border-radius: var(--r-sm);
	transition: background var(--t-1);
}

.hsd-item:hover, .hsd-item:focus-visible { background: var(--bg-tint); }

.hsd-ico {
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	background: var(--bg-soft);
	color: var(--brand);
	border-radius: var(--r-xs);
	flex: none;
}

.hsd-body { min-width: 0; }
.hsd-body strong { display: block; font-family: var(--f-head); font-size: .93rem; font-weight: 500; color: var(--ink); }
.hsd-body em { display: block; font-style: normal; font-size: .82rem; color: var(--fg-3); }
.hsd-cat { font-size: .75rem; color: var(--brand); }

.hsd-empty, .hsd-more {
	display: block;
	padding: 14px;
	text-align: center;
	font-size: .88rem;
	color: var(--fg-3);
}

.hsd-more { color: var(--brand); font-weight: 600; font-family: var(--f-head); }

/* ---------- 3. نتائج البحث ---------- */
.hres-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-block-end: 26px;
}

.hres-head h2 { margin: 0; font-size: 1.25rem; }

.hres-clear {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .87rem;
	color: var(--fg-3);
}

.hres-clear:hover { color: var(--brand); }

/* ---------- 4. شبكة التصنيفات ---------- */
.cat-grid { display: grid; gap: 20px; }
.cat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: transform var(--t-2), box-shadow var(--t-2), border-color var(--t-2);
}

.cat-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--sh-3);
	border-color: var(--c);
}

/* شريط لون التصنيف أعلى البطاقة */
.cat-card::before {
	content: '';
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	z-index: 2;
	height: 4px;
	background: var(--c);
}

.cat-media {
	position: relative;
	aspect-ratio: 16 / 9;
}

/* الغلاف وحده يقصّ — الأيقونة خارجه فلا تُقصّ */
.cat-media-in {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	background: color-mix(in srgb, var(--c) 12%, var(--bg-soft));
}

.cat-media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform var(--t-3);
}

.cat-card:hover .cat-media img { transform: scale(1.05); }

.cat-veil {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(var(--c-rgb), .10) 0%, rgba(var(--ink-rgb), .55) 100%);
}

.cat-ico {
	position: absolute;
	inset-block-end: -24px;
	inset-inline-start: 22px;
	display: grid;
	place-items: center;
	width: 60px; height: 60px;
	background: var(--c);
	color: #fff;
	border-radius: var(--r-xs);
	box-shadow: 0 0 0 5px #fff, 0 10px 22px rgba(var(--c-rgb), .42);
	transition: transform var(--t-2);
}

.cat-card:hover .cat-ico { transform: translateY(-4px) rotate(-7deg) scale(1.06); }

.cat-body { display: flex; flex-direction: column; flex: 1; padding: 38px 24px 22px; }
.cat-title { margin: 0 0 9px; font-size: 1.12rem; }
.cat-title a { transition: color var(--t-1); }
.cat-card:hover .cat-title a { color: var(--c); }
.cat-text { margin: 0 0 20px; font-size: .92rem; color: var(--fg-2); }

.cat-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-block-start: auto;
	padding-block-start: 16px;
	border-block-start: 1px dashed var(--line);
}

.cat-count {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: .85rem;
	color: var(--fg-3);
}

.cat-count .mc-icon { color: var(--c); }
.cat-count em { font-style: normal; }

.cat-go {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--f-head);
	font-size: .86rem;
	font-weight: 600;
	color: var(--c);
}

.cat-go .mc-icon { transition: transform var(--t-2); }
.cat-card:hover .cat-go .mc-icon { transform: translateX(-4px); }

.cat-cover { position: absolute; inset: 0; z-index: 3; }

/* ---------- 5. بطاقات المقالات ---------- */
.art-list { display: grid; gap: 12px; }
.hot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.art-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r);
	transition: transform var(--t-2), border-color var(--t-2), box-shadow var(--t-2);
}

.art-card {
	border-inline-start: 3px solid transparent;
}

.art-card:hover {
	transform: translateX(-5px);
	border-color: var(--line);
	border-inline-start-color: var(--brand);
	box-shadow: var(--sh-2);
}

.art-num {
	flex: none;
	display: grid;
	place-items: center;
	width: 38px; height: 38px;
	background: var(--bg-soft);
	border-radius: var(--r-sm);
	font-family: var(--f-head);
	font-size: .92rem;
	font-weight: 600;
	color: var(--fg-3);
	font-variant-numeric: tabular-nums;
	transition: background var(--t-2), color var(--t-2);
}

.art-card:hover .art-num { background: var(--brand); color: #fff; }

.art-ico {
	flex: none;
	display: grid;
	place-items: center;
	width: 38px; height: 38px;
	background: color-mix(in srgb, var(--c, var(--brand)) 12%, transparent);
	color: var(--c, var(--brand));
	border-radius: var(--r-sm);
}

.art-body { flex: 1; min-width: 0; }

.art-cat {
	position: relative;
	z-index: 4;
	display: inline-block;
	margin-block-end: 5px;
	font-size: .76rem;
	font-weight: 600;
	color: var(--brand);
}

.art-cat:hover { text-decoration: underline; }

.art-title { margin: 0 0 6px; font-size: 1.02rem; font-weight: 500; }
.art-card:hover .art-title { color: var(--brand); }
.art-text { margin: 0; font-size: .89rem; color: var(--fg-2); }

.art-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-block-start: 10px;
}

.art-meta li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .8rem;
	color: var(--fg-3);
}

.art-meta .mc-icon { opacity: .7; }

.art-go { flex: none; margin-block-start: 8px; color: var(--line); transition: transform var(--t-2), color var(--t-2); }
.art-card:hover .art-go { color: var(--brand); transform: translateX(-4px); }
.art-cover { position: absolute; inset: 0; z-index: 2; }

/* ---------- 6. ترويسة التصنيف ---------- */
.thead {
	position: relative;
	padding-block: 44px 46px;
	background: color-mix(in srgb, var(--c) 7%, var(--bg-soft));
	border-block-end: 1px solid var(--line);
	overflow: hidden;
}

.thead::before {
	content: '';
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	height: 5px;
	background: var(--c);
}

.thead-in {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 320px;
	align-items: center;
	gap: 40px;
}

.thead--plain .thead-in { grid-template-columns: 1fr; }

.thead-ico {
	display: grid;
	place-items: center;
	width: 68px; height: 68px;
	margin-block: 18px 20px;
	background: var(--c);
	color: #fff;
	border-radius: var(--r-xs);
	box-shadow: 0 10px 26px rgba(var(--c-rgb), .38);
	transform: rotate(-4deg);
}

.thead-ico .mc-icon { transform: rotate(4deg); }

.thead-title { margin: 0 0 10px; }
.thead-desc { margin: 0 0 16px; max-width: 58ch; font-size: 1.02rem; color: var(--fg-2); }

.thead-count {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 7px 15px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	font-size: .85rem;
	color: var(--fg-2);
}

.thead-count .mc-icon { color: var(--c); }

.thead-media {
	border-radius: var(--r-lg);
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: var(--sh-2);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), calc(100% - 32px) 100%, 0 100%);
}

.thead-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- 7. تخطيط الجسم ---------- */
.hbody { padding-block: 44px 72px; background: var(--bg-soft); }

.hbody-in {
	display: grid;
	grid-template-columns: 276px 1fr;
	align-items: start;
	gap: 34px;
}

.hbody-in.has-toc { grid-template-columns: 250px minmax(0, 1fr) 244px; }

.hmain { min-width: 0; }

.hmain-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-block-end: 20px;
}

.hmain-head h2 { margin: 0; font-size: 1.2rem; }
.hmain-search { flex: 1; min-width: 240px; max-width: 360px; }

/* ---------- 8. العمود الجانبي ---------- */
.hside { position: sticky; inset-block-start: calc(var(--head-h) + 20px); }

.hside-in {
	padding: 20px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
}

.hside-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-block-end: 18px;
	font-size: .85rem;
	color: var(--fg-3);
}

.hside-back:hover { color: var(--brand); }

.hside-h {
	margin: 0 0 12px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--fg-3);
}

.hside-list { display: grid; gap: 3px; }

.hside-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--r-sm);
	font-size: .9rem;
	color: var(--fg-2);
	transition: background var(--t-1), color var(--t-1);
}

.hside-list a:hover { background: var(--bg-soft); color: var(--ink); }

.hside-list .is-on a {
	background: color-mix(in srgb, var(--c) 10%, transparent);
	color: var(--c);
	font-weight: 500;
}

.hside-ico { flex: none; color: var(--c); opacity: .85; display: grid; }
.hside-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hside-n {
	flex: none;
	font-style: normal;
	font-size: .76rem;
	color: var(--fg-3);
	background: var(--bg-soft);
	padding: 2px 8px;
	border-radius: var(--r-pill);
	font-variant-numeric: tabular-nums;
}

.hside-list .is-on .hside-n { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }

.hside-card {
	margin-block-start: 22px;
	padding: 20px 18px;
	background: var(--ink);
	color: rgba(255, 255, 255, .72);
	border-radius: var(--r);
	text-align: center;
}

.hside-card-ico {
	display: inline-grid;
	place-items: center;
	width: 46px; height: 46px;
	margin-block-end: 12px;
	background: rgba(var(--brand-rgb), .18);
	color: var(--brand);
	border-radius: var(--r-pill);
}

.hside-card strong { display: block; margin-block-end: 6px; font-family: var(--f-head); color: #fff; font-size: .96rem; }
.hside-card p { margin: 0 0 14px; font-size: .84rem; }
.hside-card .btn { width: 100%; }

/* ---------- 9. التصنيفات الفرعية ---------- */
.subcats { display: flex; flex-wrap: wrap; gap: 9px; margin-block-end: 26px; }

.subcat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 15px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	font-size: .87rem;
	transition: all var(--t-1);
}

.subcat:hover { border-color: var(--c); color: var(--c); }
.subcat .mc-icon { color: var(--c); }
.subcat em { font-style: normal; font-size: .76rem; color: var(--fg-3); }

/* ---------- 10. شريط تقدّم القراءة ---------- */
.read-bar {
	position: fixed;
	inset-block-start: 0;
	inset-inline: 0;
	z-index: 95;
	height: 3px;
	background: transparent;
	pointer-events: none;
}

.read-bar span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--brand);
	transition: width .08s linear;
}

/* ---------- 11. ترويسة المقال ---------- */
.ahead { margin-block-end: 26px; }
.ahead-title { margin: 10px 0 12px; font-size: clamp(1.65rem, 1.25rem + 1.7vw, 2.35rem); }
.ahead-sum { margin: 0 0 18px; font-size: 1.06rem; color: var(--fg-2); max-width: 62ch; }

.ahead-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	padding-block: 14px;
	border-block: 1px solid var(--line);
}

.ahead-meta li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: .84rem;
	color: var(--fg-3);
}

.ahead-meta .mc-icon { opacity: .7; }
.ahead-share { margin-inline-start: auto; }

.ahead-copy {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	font-size: .84rem;
	color: var(--fg-2);
	transition: all var(--t-1);
}

.ahead-copy:hover { border-color: var(--brand); color: var(--brand); }
.ahead-copy.is-done { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 12. جسم المقال ---------- */
.article-body, .ahead, .afiles, .afaq, .vote, .apn, .arel, .notice, .afig, .toc-mob {
	background: #fff;
}

.hmain > * {
	padding-inline: clamp(20px, 3vw, 38px);
	border-inline: 1px solid var(--line);
	background: #fff;
}

.hmain > .ahead { padding-block-start: 30px; border-block-start: 1px solid var(--line); border-start-start-radius: var(--r-lg); border-start-end-radius: var(--r-lg); }
.hmain > *:last-child { border-block-end: 1px solid var(--line); border-end-start-radius: var(--r-lg); border-end-end-radius: var(--r-lg); padding-block-end: 34px; }

/* داخل صفحات الأرشيف لا نريد الإطار الموحّد */
.hbody-in:not(.has-toc) .hmain > * {
	padding-inline: 0;
	border-inline: 0;
	background: transparent;
}

.hbody-in:not(.has-toc) .hmain > *:last-child { border-block-end: 0; padding-block-end: 0; }

.afig { margin-block: 0 26px; }
.afig img { border-radius: var(--r); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.article-body { padding-block-end: 10px; }

.notice {
	display: flex;
	gap: 13px;
	margin-block-end: 26px;
	padding: 18px 20px;
	border-radius: var(--r);
	border: 1px solid;
	font-size: .94rem;
}

.notice p { margin: 0; }
.notice .mc-icon { flex: none; margin-block-start: 2px; }

.notice--info { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.notice--warn { background: var(--bg-tint); border-color: rgba(var(--brand-rgb), .35); color: #9A4A06; }
.notice--ok { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }

/* وسوم الفقرات والمرساة */
.mc-h { position: relative; scroll-margin-top: calc(var(--head-h) + 20px); }

.mc-anchor {
	margin-inline-start: 8px;
	opacity: 0;
	color: var(--brand);
	font-size: .7em;
	text-decoration: none;
	transition: opacity var(--t-1);
}

.mc-h:hover .mc-anchor, .mc-anchor:focus-visible { opacity: 1; }

/* ---------- 13. الفهرس الجانبي ---------- */
.toc { position: sticky; inset-block-start: calc(var(--head-h) + 20px); }

.toc-in {
	padding: 20px 18px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	max-height: calc(100vh - var(--head-h) - 48px);
	overflow-y: auto;
}

.toc-h {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--fg-3);
}

.toc-h .mc-icon { color: var(--brand); }

.toc-list { display: grid; gap: 2px; border-inline-start: 2px solid var(--line); }

.toc-list li.lvl-3 { padding-inline-start: 14px; }

.toc-list a {
	display: block;
	padding: 7px 12px;
	margin-inline-start: -2px;
	border-inline-start: 2px solid transparent;
	font-size: .86rem;
	line-height: 1.6;
	color: var(--fg-2);
	transition: color var(--t-1), border-color var(--t-1);
}

.toc-list a:hover { color: var(--ink); }

.toc-list a.is-on {
	color: var(--brand);
	border-inline-start-color: var(--brand);
	font-weight: 500;
}

/* الفهرس المطوي داخل المحتوى بديل للفهرس الجانبي على الشاشات الصغيرة فقط */
.toc-mob { display: none; margin-block-end: 22px; }

.toc-mob summary {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 13px 16px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	font-family: var(--f-head);
	font-size: .92rem;
	font-weight: 500;
	cursor: pointer;
	list-style: none;
}

.toc-mob summary::-webkit-details-marker { display: none; }
.toc-mob summary .mc-icon { color: var(--brand); }

.toc-mob ol {
	display: grid;
	gap: 4px;
	padding: 14px 18px;
	border: 1px solid var(--line);
	border-block-start: 0;
	border-end-start-radius: var(--r-sm);
	border-end-end-radius: var(--r-sm);
}

.toc-mob li.lvl-3 { padding-inline-start: 16px; }
.toc-mob a { font-size: .88rem; color: var(--fg-2); }
.toc-mob a:hover { color: var(--brand); }

/* ---------- 14. المرفقات والأسئلة ---------- */
.afiles { margin-block-start: 30px; }

.afiles h2, .afaq h2, .arel h2 {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 16px;
	font-size: 1.1rem;
}

.afiles h2 .mc-icon { color: var(--brand); }

.afiles ul { display: grid; gap: 9px; }

.afiles a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	font-size: .92rem;
	transition: all var(--t-1);
}

.afiles a:hover { border-color: var(--brand); background: var(--bg-tint); }
.afiles a .mc-icon { color: var(--brand); flex: none; }
.afiles a span { flex: 1; }

.afiles a em {
	font-style: normal;
	font-size: .72rem;
	font-weight: 600;
	padding: 3px 9px;
	background: var(--ink);
	color: #fff;
	border-radius: var(--r-xs);
}

.afaq { margin-block-start: 34px; }
.afaq .faq-item { border: 1px solid var(--line); border-radius: var(--r-sm); margin-block-end: 8px; }
.afaq .faq-btn { padding: 15px 18px; }
.afaq .faq-a { padding: 0 18px 18px 56px; }

/* ---------- 15. التقييم ---------- */
.vote {
	margin-block-start: 34px;
	padding-block: 26px !important;
	border-block-start: 1px dashed var(--line);
}

.vote-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.vote-q { margin: 0; font-family: var(--f-head); font-size: 1.02rem; font-weight: 500; color: var(--ink); }
.vote-acts { display: flex; gap: 10px; }

.vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	font-family: var(--f-head);
	font-size: .9rem;
	font-weight: 500;
	color: var(--fg-2);
	transition: all var(--t-1);
}

.vote-btn em {
	font-style: normal;
	font-size: .78rem;
	padding: 2px 8px;
	background: var(--bg-soft);
	border-radius: var(--r-pill);
	font-variant-numeric: tabular-nums;
}

.vote-up:hover, .vote-up.is-picked { border-color: #16A34A; color: #16A34A; background: #F0FDF4; }
.vote-down:hover, .vote-down.is-picked { border-color: #DC2626; color: #DC2626; background: #FEF2F2; }
.vote[data-voted] .vote-btn { pointer-events: none; opacity: .75; }
.vote[data-voted] .vote-btn.is-picked { opacity: 1; }

.vote-msg {
	margin: 14px 0 0;
	padding: 11px 16px;
	background: var(--bg-tint);
	border-radius: var(--r-sm);
	font-size: .9rem;
	color: var(--ink);
}

.vote-form { margin-block-start: 16px; display: grid; gap: 10px; justify-items: start; }
.vote-form label { font-size: .88rem; color: var(--fg-2); }

.vote-form textarea {
	width: 100%;
	padding: 12px 15px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	font: inherit;
	font-size: .92rem;
	resize: vertical;
}

.vote-form textarea:focus { outline: 0; border-color: var(--brand); background: #fff; }

/* ---------- 16. السابق / التالي ---------- */
.apn {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-block-start: 26px;
	padding-block-start: 26px !important;
	border-block-start: 1px solid var(--line);
}

.apn-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--r);
	transition: all var(--t-1);
}

.apn-item:hover { border-color: var(--brand); background: var(--bg-tint); }
.apn-item .mc-icon { flex: none; color: var(--brand); }
.apn-item span { display: flex; flex-direction: column; min-width: 0; }
.apn-item em { font-style: normal; font-size: .76rem; color: var(--fg-3); }

.apn-item strong {
	font-family: var(--f-head);
	font-size: .92rem;
	font-weight: 500;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apn-next { text-align: end; justify-content: flex-end; }
.apn-item:only-child { grid-column: 1 / -1; }

.arel { margin-block-start: 34px; }
.arel .art-card { background: var(--bg-soft); }

/* ---------- 17. بانر الدعم ---------- */
.hcta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 22px;
	padding: 30px 32px;
	background: var(--bg-tint);
	border: 1px solid rgba(var(--brand-rgb), .25);
	border-radius: var(--r-lg);
}

.hcta-ico {
	display: grid;
	place-items: center;
	width: 66px; height: 66px;
	background: var(--brand);
	color: #fff;
	border-radius: var(--r);
	flex: none;
	box-shadow: var(--sh-brand);
}

.hcta-text { flex: 1; min-width: 240px; }
.hcta-text h2 { margin: 0 0 6px; font-size: 1.22rem; }
.hcta-text p { margin: 0; font-size: .95rem; color: var(--fg-2); }
.hcta-acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 18. استجابة ---------- */
@media (max-width: 1080px) {
	.hbody-in, .hbody-in.has-toc { grid-template-columns: 1fr; }
	.toc { display: none; }
	.toc-mob { display: block; }
	.hside { position: static; }
	.hside-in { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
	.hside-back { grid-column: 1 / -1; }
	.hside-h { grid-column: 1 / -1; }
	.hside-list { grid-column: 1; }
	.hside-card { grid-column: 2; margin-block-start: 0; }
	.cat-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
	.thead-in { grid-template-columns: 1fr; }
	.thead-media { display: none; }
}

@media (max-width: 860px) {
	.cat-grid.cols-3, .cat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
	.hot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
	.hhero { padding-block: 48px 56px; }
	.cat-grid.cols-2, .cat-grid.cols-3, .cat-grid.cols-4 { grid-template-columns: 1fr; }
	.hsearch-btn span { display: none; }
	.hsearch-btn { display: grid; place-items: center; padding: 12px; width: 44px; height: 44px; }
	.hsearch-btn-ico { display: block; }
	.hside-in { grid-template-columns: 1fr; }
	.hside-card { grid-column: 1; margin-block-start: 18px; }
	.apn { grid-template-columns: 1fr; }
	.apn-next { text-align: start; justify-content: flex-start; flex-direction: row-reverse; }
	.ahead-share { margin-inline-start: 0; width: 100%; }
	.hcta { padding: 24px 20px; }
	.vote-main { flex-direction: column; align-items: stretch; }
	.vote-acts { justify-content: stretch; }
	.vote-btn { flex: 1; justify-content: center; }
}
