/* =========================================================
   قالب أرشيف مجلة التوحيد — template.css  (v1.1)
   ========================================================= */

/* ---------- الألوان ---------- */
:root {
	--paper: #f6f7f5;
	--surface: #ffffff;
	--sunk: #eef1ed;
	--ink: #15201b;
	--muted: #66716b;
	--line: #e3e7e2;
	--primary: #0f4c3a;
	--primary-2: #0a3529;
	--on-primary: #f3f1e9;
	--brass: #b0873a;
	--brass-soft: #f3ead6;
	--link: #13664e;
	--focus: #c7962a;
	--shadow-sm: 0 1px 2px rgba(16, 32, 26, .05), 0 2px 8px rgba(16, 32, 26, .04);
	--shadow-lg: 0 2px 4px rgba(16, 32, 26, .04), 0 18px 40px -12px rgba(16, 32, 26, .22);
	--glass: rgba(255, 255, 255, .78);

	--font-head: "Amiri", "Traditional Arabic", "Noto Naskh Arabic", serif;
	--font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;

	--radius: 12px;
	--radius-sm: 8px;
	--wrap: 1180px;
	--gap: clamp(1.1rem, 3vw, 2.25rem);

	color-scheme: light;
	box-sizing: border-box;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
[data-theme-color="navy"] { --primary: #1b3a5e; --primary-2: #122a45; --link: #23558f; }
[data-theme-color="burgundy"] { --primary: #6a2233; --primary-2: #4d1724; --link: #8f2d44; }

/* الوضع الليلي: يُفعَّل فقط عندما يختاره الزائر بالزر (الافتراضي نهاري) */
:root[data-theme="dark"] {
	--paper: #0e1412; --surface: #151d1a; --sunk: #1b2420; --ink: #e8e6df; --muted: #9ba59f; --line: #26302c;
	--primary: #1a5545; --primary-2: #0c241d; --on-primary: #efe9d8; --brass: #d0ad62; --brass-soft: #2c281b; --link: #86cbb0;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, .6); --glass: rgba(14, 20, 18, .78);
	color-scheme: dark;
}
:root[data-theme="dark"][data-theme-color="navy"] { --primary: #1f3b60; --primary-2: #0d1a2c; --link: #93b9ea; }
:root[data-theme="dark"][data-theme-color="burgundy"] { --primary: #5a1d2b; --primary-2: #2b0f16; --link: #e7a1b1; }

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: inherit; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 4.5rem); }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.85;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .3em; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--brass-soft); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.4; color: var(--ink); margin: 1.6em 0 .5em; }
h1, h2 { font-family: var(--font-head); }
h3, h4 { font-family: var(--font-body); font-weight: 600; }
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.3; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
blockquote {
	position: relative; margin: 2rem 0; padding: 1.25rem 1.5rem;
	background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
	font-family: var(--font-head); font-size: 1.3rem; line-height: 1.9;
}
blockquote::before {
	content: ""; position: absolute; inset-block: 1.1rem; inset-inline-start: 0;
	width: 3px; border-radius: 3px; background: var(--brass);
}

.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }

.skip-link {
	position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100;
	background: var(--surface); color: var(--ink); padding: .5rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 1rem); }

.visually-hidden, .sr-only {
	position: absolute !important; width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: -1px !important; overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ---------- الشريط العلوي ---------- */
.topbar { color: var(--muted); font-size: .82rem; border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: .75rem 1rem; min-height: 2.75rem; flex-wrap: wrap; }
.topbar__modules { flex: 1; }
.topbar__text { color: var(--ink); font-weight: 500; }
.topbar .social { margin-inline-start: auto; }

.social { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.social__link {
	display: grid; place-items: center;
	width: 2.25rem; height: 2.25rem; border-radius: 50%;
	color: inherit; text-decoration: none;
	transition: background-color .2s, color .2s, transform .2s;
}
.social__link svg { width: 1.1rem; height: 1.1rem; }
.social__link:hover, .social__link:focus-visible { background: var(--sunk); color: var(--link); }
.topbar .social__link { width: 2rem; height: 2rem; }
.topbar .social__link svg { width: 1rem; height: 1rem; }

/* زر الوضع الليلي / النهاري */
.theme-toggle {
	display: grid; place-items: center; flex: none;
	width: 2.1rem; height: 2.1rem; padding: 0; cursor: pointer;
	background: var(--surface); color: var(--brass);
	border: 1px solid var(--line); border-radius: 50%;
	box-shadow: var(--shadow-sm);
	transition: border-color .2s, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.theme-toggle:hover { border-color: var(--brass); }
.theme-toggle:active { transform: rotate(-25deg) scale(.92); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; grid-area: 1 / 1; }
.theme-toggle .icon-sun, :root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- الترويسة: لافتة مجلة في المنتصف ---------- */
.masthead { position: relative; text-align: center; }
.site-header__inner { display: flex; flex-direction: column; align-items: center; padding-block: clamp(1.75rem, 5vw, 3.25rem) clamp(1.5rem, 4vw, 2.5rem); }
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.brand__mark {
	display: grid; place-items: center;
	width: 2.75rem; aspect-ratio: 1; border-radius: 50%;
	background: var(--primary); color: var(--brass);
	box-shadow: inset 0 0 0 3px var(--primary), inset 0 0 0 4px color-mix(in srgb, var(--brass) 55%, transparent);
}
.brand__mark svg { width: 64%; height: 64%; }
.brand__text { display: flex; flex-direction: column; align-items: center; }
.brand__title {
	font-family: var(--font-head); font-weight: 700;
	font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5rem); line-height: 1.05;
	color: var(--ink);
}
.brand__desc {
	display: inline-flex; align-items: center; gap: .8rem;
	margin-top: .7rem; font-size: .9rem; color: var(--muted);
}
.brand__desc::before, .brand__desc::after { content: ""; width: 2.25rem; height: 1px; background: var(--brass); opacity: .7; }
.brand picture { display: block; }
.brand__logo {
	display: block; width: auto; max-width: min(88vw, 420px);
	height: clamp(120px, 9rem + 6vw, 220px); object-fit: contain;
}
.masthead--image .brand__logo { filter: drop-shadow(0 8px 26px rgba(0, 0, 0, .45)); }
.brand__logo + .brand__desc, .brand picture + .brand__desc { margin-top: .9rem; }

.header-band { height: 1px; background: linear-gradient(90deg, transparent, var(--line) 15%, var(--brass) 50%, var(--line) 85%, transparent); }

/* ترويسة بصورة خلفية */
.masthead--image {
	--ov-top: .5; --ov-mid: .62; --ov-bottom: .82;
	background-color: #0b1f19;
	background-image:
		radial-gradient(ellipse 70% 60% at 50% 48%, rgba(6, 18, 14, calc(var(--ov-mid) * .55)), transparent 75%),
		linear-gradient(180deg, rgba(6, 18, 14, var(--ov-top)) 0%, rgba(6, 18, 14, var(--ov-mid)) 55%, rgba(6, 18, 14, var(--ov-bottom)) 100%),
		var(--masthead-img);
	background-size: cover; background-position: center 45%; background-repeat: no-repeat;
	color: #fff;
}
.masthead--image.overlay-light { --ov-top: .3; --ov-mid: .42; --ov-bottom: .65; }
.masthead--image.overlay-strong { --ov-top: .68; --ov-mid: .76; --ov-bottom: .9; }
.masthead--image.focus-top { background-position: center 15%; }
.masthead--image.focus-bottom { background-position: center 85%; }
.masthead--image .site-header__inner { min-height: clamp(380px, 44vw, 560px); justify-content: center; padding-block: 3rem; }
.masthead--image .brand, .masthead--image .brand__title { color: #fff; }
.masthead--image .brand__title { text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.masthead--image .brand__desc { color: rgba(255, 255, 255, .88); }
.masthead--image .brand__desc::before, .masthead--image .brand__desc::after { background: #d9b874; opacity: .9; }
.masthead--image .brand__mark { box-shadow: inset 0 0 0 3px var(--primary), inset 0 0 0 4px #d9b874, 0 6px 20px rgba(0, 0, 0, .35); }
.masthead--image .site-search .input-group, .masthead--image .site-search .mod-finder__search { border-color: transparent; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.masthead--image + .site-nav { border-top: 0; }
@media (max-width: 600px) { .masthead--image .site-header__inner { min-height: 340px; } }

/* روابط سريعة تحت البحث */
.masthead-links { margin-top: 1.1rem; }
.masthead-links__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.masthead-links a {
	display: inline-block; padding: .35rem .95rem; border-radius: 999px;
	font-size: .88rem; font-weight: 500; text-decoration: none;
	color: var(--ink); background: var(--surface); border: 1px solid var(--line);
	transition: background-color .2s, border-color .2s, color .2s;
}
.masthead-links a:hover { border-color: var(--brass); color: var(--link); }
.masthead--image .masthead-links a {
	color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.masthead--image .masthead-links a:hover { background: #d9b874; border-color: #d9b874; color: #1b1608; }

/* البحث تحت العنوان */
.site-search { width: min(100%, 560px); margin-top: clamp(1.25rem, 3vw, 2rem); }
.site-search form { margin: 0; }
.site-search .input-group, .site-search .mod-finder__search {
	display: flex; align-items: center;
	background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .35rem;
	box-shadow: var(--shadow-sm);
	transition: border-color .2s, box-shadow .2s;
}
.site-search .input-group:focus-within, .site-search .mod-finder__search:focus-within {
	border-color: var(--brass); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 15%, transparent), var(--shadow-sm);
}
.site-search input[type="text"], .site-search input[type="search"] {
	flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
	padding: .55rem 1.1rem; font: inherit; font-size: 1rem;
}
.site-search input::placeholder { color: var(--muted); }
.site-search button, .site-search .btn {
	border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary);
	padding: .6rem 1.5rem; font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.site-search button:hover { background: var(--primary-2); }

/* ---------- شريط القائمة ---------- */
.site-nav { border-top: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); z-index: 40; }
.sticky-nav .site-nav { position: sticky; top: env(safe-area-inset-top, 0px); }
.site-nav.is-stuck { box-shadow: var(--shadow-sm); }
body.sticky-nav::before {
	content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 41;
	background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.site-nav__inner { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav__menu > ul, .site-nav__menu .mod-menu { display: flex; flex-wrap: wrap; gap: .15rem; }
.site-nav__menu li { position: relative; }
.site-nav__menu a, .site-nav__menu .nav-header, .site-nav__menu .separator {
	position: relative; display: block; padding: .95rem .7rem;
	color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap;
	transition: color .2s;
}
.site-nav__menu a::after {
	content: ""; position: absolute; inset-inline: .7rem; bottom: -1px; height: 2px; border-radius: 2px;
	background: var(--brass); transform: scaleX(0); transition: transform .25s ease;
}
.site-nav__menu a:hover { color: var(--ink); }
.site-nav__menu .current > a, .site-nav__menu .active > a, .site-nav__menu a[aria-current] { color: var(--ink); font-weight: 600; }
.site-nav__menu .current > a::after, .site-nav__menu .active > a::after, .site-nav__menu a[aria-current]::after, .site-nav__menu a:hover::after { transform: scaleX(1); }
.site-nav__menu li ul {
	display: none; position: absolute; inset-inline-start: 0; top: calc(100% + 1px);
	min-width: 230px; padding: .4rem; background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.site-nav__menu li:hover > ul, .site-nav__menu li:focus-within > ul { display: block; }
.site-nav__menu li ul a { padding: .5rem .75rem; border-radius: var(--radius-sm); }
.site-nav__menu li ul a::after { display: none; }
.site-nav__menu li ul a:hover { background: var(--sunk); }

.nav-toggle {
	display: none; align-items: center; gap: .6rem;
	background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600;
	padding: .9rem 0; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; position: relative;
	transition: transform .2s, opacity .2s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.site-nav.is-open .nav-toggle__bars { background: transparent; }
.site-nav.is-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.site-nav.is-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
	.site-nav__inner { flex-wrap: wrap; justify-content: flex-start; gap: .5rem 1rem; }
	.nav-toggle { display: inline-flex; }
	.site-nav__menu { display: none; order: 3; flex-basis: 100%; padding-bottom: .75rem; }
	.site-nav.is-open .site-nav__menu { display: block; }
	.site-nav__menu > ul, .site-nav__menu .mod-menu { flex-direction: column; }
	.site-nav__menu a { padding: .7rem .25rem; border-bottom: 1px solid var(--line); }
	.site-nav__menu a::after { display: none; }
	.site-nav__menu li ul { display: block; position: static; box-shadow: none; border: 0; padding: 0 1rem 0 0; background: none; }
}

/* ---------- روابط سريعة ---------- */
.quicklinks { padding-block: 1.75rem 0; }
.quicklinks ul { list-style: none; margin: 0; padding: 0; }
.quicklinks .custom, .quicklinks ul, .quicklinks .mod-custom {
	display: flex; flex-wrap: wrap; gap: .5rem;
}
.quicklinks a {
	display: inline-flex; align-items: center; gap: .45rem;
	padding: .5rem 1rem; border-radius: 999px;
	background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
	color: var(--ink); text-decoration: none; font-weight: 500; font-size: .92rem;
	transition: border-color .2s, color .2s;
}
.quicklinks a:hover { border-color: var(--brass); color: var(--link); }

/* ---------- التخطيط ---------- */
.band { padding-block: 2.5rem .5rem; }
.band--top-b { padding-block: 1rem .5rem; }
.band--bottom-b { padding-block: 2.5rem; }
.band--bottom { background: var(--surface); border-top: 1px solid var(--line); margin-top: 2rem; padding-block: 2.5rem; }

.layout { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: 2.5rem 4rem; }
.has-sidebar .layout { grid-template-columns: minmax(0, 1fr) 300px; }
.layout__main:focus { outline: none; }
.layout__main > :first-child { margin-top: 0; }
@media (max-width: 960px) { .has-sidebar .layout { grid-template-columns: 1fr; } }

/* ---------- غلاف الموديولات ---------- */
.box { margin-bottom: 2.75rem; }
.box__title {
	display: flex; align-items: baseline; gap: 1rem;
	margin: 0 0 1.25rem; font-family: var(--font-head); font-size: clamp(1.5rem, 1.25rem + .8vw, 1.85rem);
}
.box__title::after { content: ""; flex: 1; height: 1px; background: var(--line); transform: translateY(-.3em); }
.layout__aside .box {
	background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
	padding: 1.25rem 1.35rem; margin-bottom: 1.5rem;
}
.layout__aside .box__title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin-bottom: .9rem; }
.layout__aside .box__title::after { display: none; }
.box ul { padding-inline-start: 1.1rem; margin: 0; }

/* الأكثر زيارة */
.mostread, .mod-articles-popular { list-style: none; padding: 0 !important; counter-reset: rank; }
.mostread li, .mod-articles-popular li {
	counter-increment: rank;
	display: grid; grid-template-columns: 1.75rem 1fr; gap: .35rem; align-items: baseline;
	padding: .6rem 0; line-height: 1.6; font-size: .93rem;
}
.mostread li + li, .mod-articles-popular li + li { border-top: 1px solid var(--line); }
.mostread li::before, .mod-articles-popular li::before {
	content: counter(rank); font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--brass);
}
.mostread a, .mod-articles-popular a { color: var(--ink); text-decoration: none; }
.mostread a:hover, .mod-articles-popular a:hover { color: var(--link); }

/* ---------- رفّ الأعداد: الأحدث أكبر (class: covers) ---------- */
.covers ul, ul.covers {
	list-style: none; padding: 0 !important; margin: 0;
	display: flex; align-items: flex-end; gap: clamp(.9rem, 2vw, 1.6rem);
}
.covers li { flex: 1 1 0; min-width: 0; }
.covers li:first-child { flex-grow: 1.75; }
.covers li a {
	display: flex; flex-direction: column; gap: .7rem;
	color: var(--muted); text-decoration: none; font-size: .86rem; line-height: 1.5;
}
.covers img {
	display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
	border-radius: var(--radius-sm); background: var(--sunk);
	box-shadow: var(--shadow-lg);
	transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.covers li a:hover img { transform: translateY(-6px); }
.covers li a:hover { color: var(--ink); }
.covers li:first-child a { color: var(--ink); font-family: var(--font-head); font-size: 1.3rem; line-height: 1.4; font-weight: 700; }
.covers li:first-child img { border-radius: var(--radius); }

@media (max-width: 720px) {
	.covers ul, ul.covers {
		overflow-x: auto; scroll-snap-type: x mandatory; align-items: flex-start;
		padding-block: .5rem 1.25rem !important; margin-inline: calc(var(--gap) * -1); padding-inline: var(--gap) !important;
		scrollbar-width: none; scroll-padding-inline: var(--gap);
	}
	.covers ul::-webkit-scrollbar { display: none; }
	.covers li { flex: 0 0 34%; scroll-snap-align: start; }
	.covers li:first-child { flex: 0 0 58%; }
	.covers li:first-child a { font-size: 1.1rem; }
}

/* ---------- العدد الجديد: الغلاف + الفهرس (تخطيط issue) ---------- */
.band--top .box--mod_articles_category > .box__title { display: none; }
.band--top .box + .box { margin-top: 3rem; }
.issue {
	display: grid; grid-template-columns: minmax(200px, 360px) minmax(0, 1fr);
	gap: clamp(1.75rem, 5vw, 4.5rem); align-items: center;
	padding: clamp(1.5rem, 4vw, 3rem);
	background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm);
}
.issue__cover { position: relative; display: block; isolation: isolate; }
.issue__cover::before, .issue__cover::after {
	content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--radius-sm);
	background: var(--sunk); box-shadow: var(--shadow-sm);
}
.issue__cover::before { transform: rotate(-5deg) translate(-6%, 2%); }
.issue__cover::after { transform: rotate(3deg) translate(4%, 1%); background: var(--brass-soft); }
.issue__cover img, .issue__cover-blank {
	display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
	border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
	transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.issue__cover-blank { display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-family: var(--font-head); font-size: 1.6rem; padding: 1rem; text-align: center; }
.issue__cover:hover img { transform: translateY(-6px) rotate(-1deg); }

.issue__kicker { margin: 0 0 .35rem; color: var(--brass); font-weight: 600; font-size: .95rem; }
.issue__title { margin: 0; font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); line-height: 1.15; }
.issue__title a { color: var(--ink); text-decoration: none; }
.issue__year { margin: .5rem 0 0; color: var(--muted); }
.issue__toc-title { margin: 2rem 0 .5rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.issue__toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; columns: 2 16rem; column-gap: 2.5rem; }
.issue__toc li {
	counter-increment: toc; break-inside: avoid;
	display: grid; grid-template-columns: 2rem 1fr; column-gap: .25rem;
	padding: .6rem 0; border-top: 1px solid var(--line);
}
.issue__toc li::before {
	content: counter(toc); grid-row: span 2;
	font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.5; color: var(--brass);
}
.issue__toc a { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.6; }
.issue__toc a:hover { color: var(--link); }
.issue__author { font-size: .8rem; color: var(--muted); }
.issue__actions { margin: 1.75rem 0 0; }

@media (max-width: 760px) {
	.issue { grid-template-columns: 1fr; text-align: center; }
	.issue__cover { width: min(62%, 260px); margin-inline: auto; }
	.issue__toc { text-align: start; columns: 1; }
}

/* ---------- المقالات في شبكة كمجلة ---------- */
.blog-items, .com-content-category-blog__items, .feature-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1.25rem;
}
.blog-items .blog-item, .com-content-category-blog__items .blog-item, .feature-grid .blog-item { margin: 0; display: flex; flex-direction: column; }
.blog-item .item-image { margin: -1.5rem -1.6rem 1.25rem; }
.blog-item .item-image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.blog-item .kicker { margin: 0 0 .35rem; font-size: .8rem; font-weight: 600; color: var(--brass); }
.blog-item .readmore { margin-top: auto; padding-top: .75rem; }

/* ---------- شريط تقدّم القراءة في صفحة المقال ---------- */
.read-progress {
	position: fixed; top: env(safe-area-inset-top, 0px); inset-inline: 0; z-index: 60; height: 3px;
	background: var(--brass); transform: scaleX(0); transform-origin: right;
}
[dir="ltr"] .read-progress { transform-origin: left; }
.view-article .com-content-article > .page-header h1, .view-article .item-page h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); line-height: 1.25; }

/* ---------- أرشيف السنوات (تخطيط years) ---------- */
.years-menu__links { list-style: none; padding: 0 !important; margin: 0 0 .5rem; }
.years-menu__links a { display: block; padding: .3rem 0; text-decoration: none; font-weight: 500; font-size: .93rem; }

.decade + .decade { border-top: 1px solid var(--line); }
.decade summary {
	display: flex; align-items: center; justify-content: space-between; gap: .5rem;
	padding: .7rem 0; cursor: pointer; list-style: none; border-radius: var(--radius-sm);
}
.decade summary::-webkit-details-marker { display: none; }
.decade__range { font-weight: 600; font-size: .97rem; font-variant-numeric: tabular-nums; }
.decade__range::before {
	content: ""; display: inline-block; width: .4em; height: .4em; margin-inline-end: .7em;
	border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
	vertical-align: .18em; transition: transform .2s;
	transform: rotate(-45deg);
}
[dir="rtl"] .decade__range::before { transform: rotate(135deg); }
.decade[open] .decade__range::before, [dir="rtl"] .decade[open] .decade__range::before { transform: rotate(45deg); border-color: var(--brass); }
.decade__count { font-size: .76rem; color: var(--muted); background: var(--sunk); padding: .05rem .55rem; border-radius: 999px; }

.decade__years {
	list-style: none; padding: .1rem 0 1rem !important; margin: 0;
	display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
}
.decade__years a {
	display: flex; flex-direction: column; align-items: center;
	padding: .4rem .2rem; line-height: 1.25; border-radius: var(--radius-sm);
	background: var(--sunk); color: var(--ink); text-decoration: none;
	transition: background-color .2s, color .2s;
}
.decade__years a:hover { background: var(--brass-soft); }
.decade__years a[aria-current] { background: var(--primary); color: var(--on-primary); }
.year__h { font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.year__g { font-size: .7rem; opacity: .65; }

/* ---------- مسار التنقل ---------- */
.mod-breadcrumbs, .breadcrumb {
	display: flex; flex-wrap: wrap; align-items: center;
	list-style: none; margin: 0 0 1.5rem !important; padding: 0 !important;
	font-size: .85rem; color: var(--muted);
}
.mod-breadcrumbs__here { display: none; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; padding-inline: .6rem; color: var(--line); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--link); }

/* ---------- المقالات ---------- */
.page-header h1, .page-header h2, .item-page > h1, .item-title { margin-top: 0; }
.page-header h2 a, .item-title a { color: var(--ink); text-decoration: none; }
.page-header h2 a:hover { color: var(--link); }

.com-content-article, .item-page { max-width: 44rem; }
.com-content-article__body, .item-page [itemprop="articleBody"] { font-size: 1.12rem; line-height: 2.05; }
.com-content-article__body img, .item-page [itemprop="articleBody"] img {
	display: block; margin: 2rem auto; border-radius: var(--radius-sm);
	background: #fff; box-shadow: var(--shadow-lg);
}

.article-info {
	display: flex; flex-wrap: wrap; gap: .3rem .5rem;
	margin: 0 0 1.75rem; padding: 0; font-size: .82rem; color: var(--muted);
}
.article-info dt, .article-info-term { display: none; }
.article-info dd { margin: 0; background: var(--sunk); padding: .15rem .65rem; border-radius: 999px; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.tags a, .badge {
	display: inline-block; padding: .2rem .75rem; border-radius: 999px;
	background: var(--brass-soft); color: var(--ink); font-size: .82rem; text-decoration: none;
}

.blog-item, .com-content-category-blog__item {
	padding: 1.5rem 1.6rem; margin-bottom: 1rem;
	background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.blog-item h2, .com-content-category-blog__item h2 { font-size: 1.55rem; margin: 0 0 .5rem; }
.blog-item h2 a, .com-content-category-blog__item h2 a { color: var(--ink); text-decoration: none; }
.blog-item h2 a:hover { color: var(--link); }
.blog-item .article-info { margin-bottom: 1rem; }
.blog-item p:last-child { margin-bottom: 0; }
.readmore a, .readmore .btn { font-weight: 600; font-size: .92rem; text-decoration: none; }

.com-content-category__table, table.category, .table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td, table.category th, table.category td { padding: .8rem .6rem; border-bottom: 1px solid var(--line); text-align: start; }
.table thead th, table.category thead th { font-weight: 600; color: var(--muted); font-size: .82rem; }
.table-striped tbody tr:nth-child(odd), table.category tbody tr:nth-child(odd) { background: var(--surface); }
.list-unstyled { list-style: none; padding-inline-start: 0; }

.pagination, .com-content-category-blog__navigation ul {
	display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 2.25rem 0 .5rem;
}
.page-link, .pagination a, .pagination span {
	display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .85rem;
	border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm);
	color: var(--ink); text-decoration: none; font-size: .92rem; font-variant-numeric: tabular-nums;
}
.pagination a:hover { color: var(--link); }
.page-item.active .page-link { background: var(--primary); color: var(--on-primary); }
.page-item.disabled .page-link { opacity: .45; box-shadow: none; }
.counter { color: var(--muted); font-size: .85rem; }
.pagenavigation .pagination { justify-content: space-between; }

/* ---------- النماذج والأزرار ---------- */
.form-control, .form-select, .inputbox, input[type="text"], input[type="search"], input[type="email"], input[type="password"], textarea, select {
	font: inherit; color: var(--ink); background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .85rem; max-width: 100%;
}
.form-control:focus, input:focus, textarea:focus, select:focus { border-color: var(--brass); outline: 3px solid color-mix(in srgb, var(--brass) 18%, transparent); outline-offset: 0; }
.input-group { display: flex; }
.input-group > .form-control { flex: 1; min-width: 0; }
.btn {
	display: inline-flex; align-items: center; gap: .4rem;
	font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none;
	padding: .6rem 1.3rem; border-radius: 999px; border: 1px solid var(--line);
	background: var(--surface); color: var(--ink);
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-2); color: var(--on-primary); }
.btn-secondary:hover, .btn:hover { border-color: var(--brass); }
.alert { padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }

.com-finder__results-list, #search-result-list { list-style: none; padding: 0; }
.result__item { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.result__title { font-family: var(--font-head); font-size: 1.3rem; margin: 0 0 .25rem; }
.result__taxonomy { font-size: .82rem; color: var(--muted); }
.highlight, mark { background: var(--brass-soft); color: inherit; padding: 0 .15em; border-radius: 3px; }

.float-end { float: inline-end; }
.float-start { float: inline-start; }
.text-muted { color: var(--muted); }
.d-none { display: none !important; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- التذييل ---------- */
.site-footer {
	background-color: var(--primary-2);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c9a24f' stroke-width='.8' opacity='.12'%3E%3Cpath d='M22 22h20v20H22z'/%3E%3Cpath d='M32 17.9 46.1 32 32 46.1 17.9 32z'/%3E%3C/g%3E%3C/svg%3E");
	color: var(--on-primary);
}
.site-footer .header-band { display: none; }
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding-block: 3rem; text-align: center; font-size: .88rem; }
.site-footer a { color: inherit; }
.site-footer .social { gap: .5rem; }
.site-footer .social__link { width: 2.75rem; height: 2.75rem; border: 1px solid rgba(255, 255, 255, .14); }
.site-footer .social__link svg { width: 1.2rem; height: 1.2rem; }
.site-footer .social__link:hover { background: var(--brass); border-color: var(--brass); color: #1b1608; transform: translateY(-2px); }
.site-footer__copy { margin: 0; opacity: .6; }
.site-footer__copy p { margin: 0; }
.site-footer__modules {
	width: 100%; display: grid; gap: 2rem; text-align: start;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	padding-bottom: 1.75rem; margin-bottom: .5rem; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-footer__modules .box { margin: 0; }
.site-footer__modules .box__title { color: var(--on-primary); font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.site-footer__modules .box__title::after { display: none; }
.site-footer__modules ul { list-style: none; padding: 0; }
.site-footer__modules a { text-decoration: none; opacity: .8; }
.site-footer__modules a:hover { opacity: 1; text-decoration: underline; }

.to-top {
	position: fixed; inset-inline-end: 1.25rem; bottom: calc(env(safe-area-inset-bottom, 0px) + 1.25rem); z-index: 50;
	display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
	border-radius: 50%; background: var(--surface); color: var(--ink);
	border: 1px solid var(--line); box-shadow: var(--shadow-lg);
	text-decoration: none; font-size: 1.1rem;
}
.to-top[hidden] { display: none; }
.to-top:hover { color: var(--link); border-color: var(--brass); }

/* تذييل بأعمدة */
.site-footer--columns { text-align: start; }
.site-footer__grid {
	display: grid; gap: 2.5rem 3rem;
	grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(180px, 1fr));
	padding-block: 3.5rem 2.5rem;
}
.site-footer__col, .site-footer__grid > .box { margin: 0; min-width: 0; }
.site-footer__logo { display: inline-block; margin-bottom: 1rem; }
.site-footer__logo .brand__logo { height: 110px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .3)); }
.site-footer__title, .site-footer__grid .box__title {
	margin: 0 0 1rem; font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: #d9b874;
}
.site-footer__grid .box__title::after { display: none; }
.site-footer__text { font-size: .92rem; line-height: 1.9; opacity: .82; max-width: 34rem; }
.site-footer__text p { margin: 0 0 .6rem; }
.site-footer__links, .site-footer__grid .box ul { list-style: none; margin: 0; padding: 0; }
.site-footer__links li + li, .site-footer__grid .box li + li { margin-top: .45rem; }
.site-footer__links a, .site-footer__grid .box a { color: inherit; text-decoration: none; opacity: .82; font-size: .93rem; }
.site-footer__links a:hover, .site-footer__grid .box a:hover { opacity: 1; color: #d9b874; }
.site-footer--columns .social { justify-content: flex-start; }
.site-footer__contact { margin-top: 1rem; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.site-footer__bottom .site-footer__copy { padding-block: 1.1rem; font-size: .85rem; text-align: center; }
@media (max-width: 720px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.site-footer__about { grid-column: 1 / -1; }
}

/* ---------- صفحة الخطأ ---------- */
.error-box { max-width: 40rem; padding-block: 5rem; text-align: center; }
.error-box__code { font-family: var(--font-head); font-size: 6rem; line-height: 1; color: var(--brass); margin: 0; }
.error-box__debug { text-align: start; direction: ltr; overflow-x: auto; background: var(--surface); padding: 1rem; font-size: .8rem; border-radius: var(--radius-sm); }
.contentpane { padding: 1.5rem; background: var(--surface); }

/* ---------- الطباعة ---------- */
@media print {
	.topbar, .site-nav, .site-search, .quicklinks, .layout__aside, .band, .site-footer, .to-top, .header-band { display: none !important; }
	.has-sidebar .layout { display: block; }
	body { background: #fff; color: #000; }
	a { color: #000; }
	.blog-item { box-shadow: none; padding: 0; }
}
