/* ═══════════════════════════════════════════════════════════════════════
   صوت الحرية — الواجهة العامة
   هوية: ورق الجريدة الكريمي + حبر كحلي (من الشعار) + أحمر عاجل + رقائق ذهبية
   «الطبعة الليلية»: وضع داكن كامل • كل الحركات تحترم prefers-reduced-motion
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --paper: #FBF8F1;
    --paper-2: #F3EEE2;
    --paper-3: #EAE3D3;
    --card: #FFFFFF;
    --ink: #101828;
    --ink-2: #344054;
    --muted: #6B7280;
    --line: #E6DFD0;
    --line-2: #D8CFBB;
    --navy: #0B2A5B;
    --navy-2: #12397A;
    --red: #C8102E;
    --red-2: #E11D3A;
    --gold: #C5A46D;
    --gold-2: #E2C68F;
    --green: #0A7A42;
    --sec: #C8102E;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
    --shadow: 0 10px 30px -12px rgba(11, 42, 91, .25);
    --shadow-lg: 0 30px 60px -20px rgba(11, 42, 91, .35);
    --radius: 14px;
    --radius-sm: 9px;
    --font-head: "Amiri", "Traditional Arabic", serif;
    --font-ui: "Cairo", "Segoe UI", Tahoma, sans-serif;
    --font-sign: "Aref Ruqaa", "Amiri", serif;
    --wrap: 1280px;
    --nav-h: 54px;
    --fs: 1;
    color-scheme: light;
}

/* ═══ الطبعة الليلية ═══ */
:root[data-theme="dark"] {
    --paper: #0A0E16;
    --paper-2: #0F1520;
    --paper-3: #172033;
    --card: #121926;
    --ink: #ECE7DC;
    --ink-2: #C7CEDB;
    --muted: #8D97A8;
    --line: #222C3D;
    --line-2: #2E3A50;
    --navy: #9DB8EC;
    --navy-2: #C2D3F5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 12px 30px -12px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    transition: background-color .5s ease, color .5s ease;
}
/* حبيبات ورق خفيفة فوق الصفحة */
body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .5;
    background-image: radial-gradient(rgba(16, 24, 40, .035) 1px, transparent 1.2px);
    background-size: 3px 3px;
}
:root[data-theme="dark"] body::before { background-image: radial-gradient(rgba(255, 255, 255, .025) 1px, transparent 1.2px); }
body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
::selection { background: var(--navy); color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; top: -100px; right: 16px; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { top: 12px; color: #fff; }
.hidden { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.ic { flex-shrink: 0; vertical-align: middle; }

/* ═══════════ شريط التقدم (التنقل) والقراءة ═══════════ */
#ajaxProgress { position: fixed; top: 0; right: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, var(--gold), var(--red)); opacity: 0; transition: width .25s ease, opacity .3s; box-shadow: 0 0 12px rgba(200, 16, 46, .6); }
#ajaxProgress.on { opacity: 1; }
.reading-progress { position: fixed; top: 0; right: 0; height: 4px; width: 0; z-index: 1500; background: linear-gradient(90deg, var(--red), var(--gold)); transition: width .1s linear; }

/* ═══════════ الشريط العلوي ═══════════ */
.top-strip { background: var(--ink); color: #D7DCE5; font-size: 12.5px; }
:root[data-theme="dark"] .top-strip { background: #05070B; }
.top-strip .wrap { display: flex; align-items: center; gap: 18px; min-height: 36px; }
.ts-date { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ts-date .dot, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-2); display: inline-block; box-shadow: 0 0 0 0 rgba(225, 29, 58, .7); animation: pulse 1.8s infinite; }
.ts-clock { font-variant-numeric: tabular-nums; color: var(--gold-2); font-weight: 700; }
.ts-markets { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ts-markets-track { display: inline-flex; gap: 26px; white-space: nowrap; animation: marquee-rtl 38s linear infinite; padding-inline-start: 20px; }
.ts-markets:hover .ts-markets-track { animation-play-state: paused; }
.mk { display: inline-flex; align-items: center; gap: 6px; }
.mk b { color: #fff; font-weight: 700; }
.mk .chg { font-weight: 800; font-size: 11.5px; padding: 0 6px; border-radius: 4px; }
.mk .up { color: #34D399; } .mk .down { color: #F87171; } .mk .flat { color: #CBD5E1; }
.ts-links { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.ts-links a { color: #D7DCE5; display: inline-flex; align-items: center; gap: 5px; }
.ts-links a:hover { color: var(--gold-2); }
.ts-btn { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; height: 26px; min-width: 26px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; transition: .2s; }
.ts-btn:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ═══════════ الترويسة (Masthead) ═══════════ */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-block: 18px 14px; }
.mh-edition { justify-self: start; display: flex; align-items: stretch; gap: 0; border: 1.5px solid var(--ink); background: var(--card); box-shadow: 4px 4px 0 var(--ink); border-radius: 4px; overflow: hidden; }
.mh-edition .num { background: var(--ink); color: #fff; padding: 8px 14px; text-align: center; line-height: 1.2; }
.mh-edition .num small { display: block; font-size: 10px; letter-spacing: .1em; opacity: .8; }
.mh-edition .num b { font-size: 22px; font-family: var(--font-head); }
.mh-edition .meta { padding: 7px 12px; font-size: 11.5px; line-height: 1.55; color: var(--ink-2); }
.mh-edition .meta b { color: var(--ink); }
.mh-brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mh-brand .logo { height: 92px; width: auto; transition: transform .6s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 6px 14px rgba(11, 42, 91, .12)); }
.mh-brand:hover .logo { transform: scale(1.04) rotate(-.6deg); }
:root[data-theme="dark"] .mh-brand .logo { filter: drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 0 18px rgba(157, 184, 236, .25)) brightness(1.25); }
.mh-tagline { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; }
.mh-tagline::before, .mh-tagline::after { content: ""; width: 36px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold)); }
.mh-tagline::after { transform: scaleX(-1); }
.mh-side { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mh-social { display: flex; gap: 6px; }
.mh-social a { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--ink-2); transition: .25s; }
.mh-social a:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }
.mh-cta { display: flex; gap: 8px; }

/* ═══════════ القائمة الرئيسية (ثابتة) ═══════════ */
.mainnav { position: sticky; top: 0; z-index: 900; background: var(--navy); color: #fff; box-shadow: 0 6px 20px -10px rgba(11, 42, 91, .6); }
:root[data-theme="dark"] .mainnav { background: #0C1422; border-bottom: 1px solid var(--line); }
.mainnav::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--red) 0 33%, #fff 33% 66%, var(--ink) 66%); opacity: .9; }
.mainnav .wrap { display: flex; align-items: center; gap: 8px; height: var(--nav-h); }
.nav-mini-logo { display: none; height: 34px; width: auto; filter: brightness(0) invert(1); opacity: 0; transform: translateX(10px); transition: .35s; }
.mainnav.compact .nav-mini-logo { display: block; opacity: 1; transform: none; }
.nav-links { display: flex; align-items: stretch; height: 100%; gap: 0; flex: 1; overflow: hidden; }
.nav-links a { position: relative; display: flex; align-items: center; padding: 0 14px; font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; transition: background .2s; }
.nav-links a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 7px; height: 3px; border-radius: 3px; background: var(--sec, var(--gold)); transform: scaleX(0); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.nav-links a:hover, .nav-links a.active { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-tools { display: flex; align-items: center; gap: 6px; }
.nav-btn { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-weight: 700; font-size: 13px; transition: .2s; }
.nav-btn:hover { background: #fff; color: var(--navy); }
.nav-btn kbd { font-family: var(--font-ui); font-size: 10.5px; background: rgba(255, 255, 255, .15); border-radius: 4px; padding: 1px 6px; }
.nav-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; color: #fff; padding: 0 10px; white-space: nowrap; }
.menu-toggle { display: none; }

/* ═══════════ شريط العاجل ═══════════ */
.breaking { background: linear-gradient(90deg, #8E0B20, var(--red) 40%, #8E0B20); color: #fff; overflow: hidden; }
.breaking .wrap { display: flex; align-items: center; gap: 14px; height: 42px; }
.br-label { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--red); font-weight: 900; font-size: 14px; padding: 4px 14px; border-radius: 6px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15); position: relative; }
.br-label .live-dot { background: var(--red); }
.br-track-wrap { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.br-track { display: inline-flex; white-space: nowrap; animation: marquee-rtl 60s linear infinite; }
.breaking:hover .br-track { animation-play-state: paused; }
.br-item { display: inline-flex; align-items: center; gap: 12px; padding-inline: 18px; font-weight: 700; font-size: 14.5px; color: #fff; }
.br-item::before { content: "◆"; color: var(--gold-2); font-size: 10px; }
a.br-item:hover { color: var(--gold-2); text-decoration: underline; text-underline-offset: 4px; }

@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 58, .7); } 70% { box-shadow: 0 0 0 9px rgba(225, 29, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 58, 0); } }

/* ═══════════ المحتوى العام ═══════════ */
main { min-height: 60vh; }
main.page-enter > * { animation: page-in .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.section { padding-block: 34px; }
.section + .section { padding-top: 6px; }

/* عنوان القسم: شريط أحمر + خط مزدوج */
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sec-head h2 { font-family: var(--font-head); font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sec-head h2::before { content: ""; width: 8px; height: 28px; border-radius: 2px; background: var(--sec, var(--red)); box-shadow: 4px 0 0 var(--gold); }
.sec-head .rule { flex: 1; height: 7px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); opacity: .85; }
.sec-head .more { font-size: 13px; font-weight: 800; color: var(--sec, var(--red)); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 6px 12px; border-radius: 999px; border: 1px solid currentColor; transition: .25s; }
.sec-head .more:hover { background: var(--sec, var(--red)); color: #fff; border-color: var(--sec, var(--red)); }
.sec-sub { color: var(--muted); margin-top: -12px; margin-bottom: 20px; }

/* ═══════════ الأزرار ═══════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 800; font-size: 14.5px; transition: .25s cubic-bezier(.2, .8, .2, 1); white-space: nowrap; position: relative; overflow: hidden; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px -8px rgba(11, 42, 91, .7); }
:root[data-theme="dark"] .btn-primary { background: #2B5BB0; }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(11, 42, 91, .8); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(200, 16, 46, .7); }
.btn-red:hover { color: #fff; transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2A1E08; }
.btn-gold:hover { color: #2A1E08; transform: translateY(-2px); }
.btn-outline { border-color: var(--line-2); background: var(--card); color: var(--ink); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
/* لمعة تمر على الزر */
.btn-primary::after, .btn-red::after, .btn-gold::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; right: -60%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: right .7s; }
.btn-primary:hover::after, .btn-red:hover::after, .btn-gold:hover::after { right: 130%; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--sec, var(--red)); color: #fff; line-height: 1.6; letter-spacing: .01em; }
.chip.ghost { background: transparent; color: var(--sec, var(--red)); border: 1px solid currentColor; }
.chip.ink { background: var(--ink); color: var(--paper); }
.chip.gold { background: var(--gold); color: #2A1E08; }
.chip.breaking-chip { background: var(--red); animation: glow 1.6s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 0 0 rgba(200, 16, 46, .0); } to { box-shadow: 0 0 14px 2px rgba(200, 16, 46, .45); } }
.kicker { font-size: 13px; font-weight: 900; color: var(--sec, var(--red)); display: inline-flex; align-items: center; gap: 6px; }
.kicker::before { content: ""; width: 14px; height: 3px; background: currentColor; border-radius: 2px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.meta-row span { display: inline-flex; align-items: center; gap: 5px; }

/* ═══════════ الواجهة الأولى (Hero) ═══════════ */
.front { padding-top: 26px; }
.front-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 22px; }
.hero-card { position: relative; border-radius: 20px; overflow: hidden; min-height: 520px; display: flex; align-items: flex-end; isolation: isolate; box-shadow: var(--shadow-lg); background: var(--navy); }
.hero-card .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 22s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-2%, 2%); } }
.hero-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 10, 22, .95) 0%, rgba(5, 10, 22, .65) 42%, rgba(5, 10, 22, .05) 75%); }
/* بقعة ضوء تتبع المؤشر */
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 30%), rgba(226, 198, 143, .22), transparent 60%); transition: background .1s; }
.hero-body { padding: 34px; color: #fff; max-width: 820px; }
.hero-body .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-body h1 { font-family: var(--font-head); font-size: clamp(28px, 3.4vw, 46px); line-height: 1.28; font-weight: 700; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.hero-body h1 a:hover { color: var(--gold-2); }
.hero-body p { font-size: 17px; color: rgba(255, 255, 255, .86); margin: 14px 0 18px; max-width: 680px; }
.hero-body .meta-row { color: rgba(255, 255, 255, .75); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
/* كشف العنوان كالحبر */
.ink-reveal { animation: ink 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ink { from { clip-path: inset(0 0 0 100%); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-item { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: .3s cubic-bezier(.2, .8, .2, 1); position: relative; overflow: hidden; }
.stack-item::before { content: attr(data-n); position: absolute; left: 12px; bottom: -14px; font-family: var(--font-head); font-size: 70px; font-weight: 700; color: transparent; -webkit-text-stroke: 1.5px var(--line-2); line-height: 1; pointer-events: none; }
.stack-item:hover { transform: translateX(-4px); border-color: var(--sec, var(--red)); box-shadow: var(--shadow); }
.stack-item .thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: var(--paper-2); }
.stack-item .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.stack-item:hover .thumb img { transform: scale(1.08); }
.stack-item h3 { font-family: var(--font-head); font-size: 17.5px; line-height: 1.45; font-weight: 700; margin: 4px 0; }

/* ═══════════ البطاقات ═══════════ */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s; position: relative; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card .media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--paper-2); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.card:hover .media img { transform: scale(1.07); }
.card .media .chip { position: absolute; top: 12px; right: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.card .media .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .15); }
.card .media .play .ic { width: 56px; height: 56px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-family: var(--font-head); font-size: 19px; font-weight: 700; line-height: 1.5; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .excerpt { color: var(--ink-2); font-size: 14.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.card .meta-row { margin-top: auto; padding-top: 6px; }
.card::after { content: ""; position: absolute; top: 0; right: 0; width: 100%; height: 3px; background: var(--sec, var(--red)); transform: scaleX(0); transform-origin: right; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.card:hover::after { transform: scaleX(1); }
/* إمالة ثلاثية الأبعاد */
.tilt { transform-style: preserve-3d; will-change: transform; }

/* بطاقة أفقية مختصرة */
.row-item { display: grid; grid-template-columns: 1fr 120px; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); align-items: center; }
.row-item:last-child { border-bottom: 0; }
.row-item h4 { font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.row-item .thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: var(--paper-2); }
.row-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-item.no-thumb { grid-template-columns: 1fr; }

/* ═══════════ نبض الأخبار + الأكثر قراءة + الاستطلاع ═══════════ */
.pulse-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .95fr); gap: 22px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { font-family: var(--font-head); font-size: 22px; display: flex; align-items: center; gap: 8px; }
.panel-head .badge-live { display: inline-flex; align-items: center; gap: 6px; background: rgba(200, 16, 46, .1); color: var(--red); font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.timeline::before { content: ""; position: absolute; right: 44px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--red), var(--gold), transparent); }
.timeline li { display: grid; grid-template-columns: 40px 1fr; gap: 20px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; right: 39px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--sec, var(--red)); z-index: 1; }
.timeline time { font-weight: 900; font-size: 13px; color: var(--navy); padding-top: 9px; font-variant-numeric: tabular-nums; }
.timeline a { font-family: var(--font-head); font-size: 16.5px; font-weight: 700; line-height: 1.55; display: block; }
.timeline .tl-sec { font-size: 11.5px; font-weight: 800; color: var(--sec, var(--red)); }
.timeline li.fresh { animation: fresh 2.6s ease; }
@keyframes fresh { 0% { background: rgba(197, 164, 109, .35); transform: translateX(-12px); opacity: 0; } 25% { opacity: 1; transform: none; } 100% { background: transparent; } }

.mostread { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.mostread li { counter-increment: mr; display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mostread li:last-child { border-bottom: 0; }
.mostread li::before { content: counter(mr); font-family: var(--font-head); font-size: 50px; font-weight: 700; line-height: 1; text-align: center; color: transparent; -webkit-text-stroke: 1.6px var(--gold); transition: .3s; }
.mostread li:hover::before { color: var(--gold); }
.mostread li:first-child::before { -webkit-text-stroke-color: var(--red); }
.mostread a { font-family: var(--font-head); font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.mostread small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; }

/* استطلاع الرأي */
.poll { background: linear-gradient(160deg, var(--navy), #061633); color: #fff; border: 0; }
:root[data-theme="dark"] .poll { background: linear-gradient(160deg, #13284F, #0A1426); }
.poll .panel-head h3 { color: #fff; }
.poll::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; left: -90px; top: -90px; background: radial-gradient(rgba(226, 198, 143, .35), transparent 70%); }
.poll-q { font-family: var(--font-head); font-size: 19px; line-height: 1.6; margin-bottom: 14px; position: relative; }
.poll-opt { width: 100%; text-align: right; display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 9px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-weight: 700; transition: .2s; position: relative; overflow: hidden; }
.poll-opt:hover { background: rgba(255, 255, 255, .14); border-color: var(--gold); }
.poll-opt .bar { position: absolute; inset-block: 0; right: 0; width: 0; background: linear-gradient(90deg, rgba(197, 164, 109, .55), rgba(226, 198, 143, .25)); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); z-index: 0; }
.poll-opt span { position: relative; z-index: 1; }
.poll-opt .pct { margin-inline-start: auto; font-weight: 900; color: var(--gold-2); }
.poll-total { font-size: 12.5px; opacity: .75; margin-top: 6px; }

/* ═══════════ اختيارات المحرر (شريط أفقي) ═══════════ */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; cursor: grab; }
.rail > * { scroll-snap-align: start; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging a { pointer-events: none; }
.rail-nav { display: flex; gap: 6px; }
.rail-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); display: grid; place-items: center; transition: .2s; }
.rail-nav button:hover { background: var(--navy); color: #fff; }

.pick-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; display: flex; align-items: flex-end; color: #fff; isolation: isolate; box-shadow: var(--shadow); }
.pick-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.pick-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 10, 22, .95), rgba(5, 10, 22, .15) 65%); }
.pick-card:hover img { transform: scale(1.1) rotate(.6deg); }
.pick-card .body { padding: 18px; }
.pick-card h3 { font-family: var(--font-head); font-size: 20px; line-height: 1.45; margin-top: 8px; }
.pick-card:hover { color: #fff; }
.pick-card .star { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2A1E08; }

/* ═══════════ تخطيطات الأقسام ═══════════ */
.layout-lead { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; }
.lead-card .media { aspect-ratio: 16/9; }
.lead-card h3 { font-size: 26px; }
.lead-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; }
.layout-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.layout-strip .card .media { aspect-ratio: 1/1; }
.layout-strip .card h3 { font-size: 16.5px; }
.layout-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 14px; }
.mosaic-item { position: relative; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.mosaic-item:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .9s; }
.mosaic-item::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent 70%); }
.mosaic-item:hover img { transform: scale(1.08); }
.mosaic-item:hover { color: #fff; }
.mosaic-item .body { padding: 16px; }
.mosaic-item h3 { font-family: var(--font-head); font-size: 17px; line-height: 1.45; margin-top: 6px; }
.mosaic-item:first-child h3 { font-size: 26px; }

/* ═══════════ آراء حرة ═══════════ */
.opinions { background: linear-gradient(180deg, var(--paper-2), var(--paper)); border-block: 1px solid var(--line); }
.op-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 20px; position: relative; display: flex; flex-direction: column; gap: 12px; transition: .35s cubic-bezier(.2, .8, .2, 1); }
.op-card::before { content: "\201D"; position: absolute; left: 18px; top: -10px; font-family: var(--font-head); font-size: 110px; line-height: 1; color: var(--gold); opacity: .35; }
.op-card:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow); }
.op-writer { display: flex; align-items: center; gap: 12px; }
.avatar { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 16px; color: #fff; background: conic-gradient(from 200deg, var(--navy), var(--red), var(--gold), var(--navy)); padding: 3px; flex-shrink: 0; }
.avatar > span, .avatar > img { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--ink); object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 26px; }
.op-writer b { font-family: var(--font-sign); font-size: 20px; line-height: 1.2; display: block; }
.op-writer small { color: var(--muted); font-size: 12px; font-weight: 700; }
.op-card h3 { font-family: var(--font-head); font-size: 21px; line-height: 1.5; }
.op-card p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.op-card h3 a::after { content: ""; position: absolute; inset: 0; }

/* ═══════════ ركن الفتوى ═══════════ */
.fatwa-corner { position: relative; border-radius: 22px; overflow: hidden; padding: 30px; color: #F5EEDD; background-color: #2B2416; isolation: isolate; }
/* خلفية ركن الفتوى: علامة مائية متكررة (شعار الجريدة واسمها) — بدون أي نجوم أو أشكال هندسية */
.fatwa-corner::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .14;
    background-image: url("/assets/watermark?tone=gold"); background-size: 560px 420px; }
.fatwa-corner::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(226, 198, 143, .35); border-radius: 16px; pointer-events: none; }
.fatwa-corner .grid { position: relative; }
.fatwa-corner h2 { font-family: var(--font-head); font-size: 32px; color: var(--gold-2); }
.fatwa-item { background: rgba(255, 255, 255, .05); border: 1px solid rgba(226, 198, 143, .22); border-radius: 14px; padding: 16px; transition: .3s; display: block; color: #F5EEDD; }
.fatwa-item:hover { background: rgba(226, 198, 143, .12); color: #fff; transform: translateY(-3px); }
.fatwa-item b { font-family: var(--font-head); font-size: 18px; display: block; line-height: 1.5; }
.fatwa-item small { color: rgba(245, 238, 221, .65); font-size: 12px; }
.fatwa-no { display: inline-block; font-size: 11px; font-weight: 900; color: #2B2416; background: var(--gold-2); border-radius: 5px; padding: 0 7px; margin-bottom: 6px; }

/* ═══════════ أرشيف الأعداد (أغلفة ثلاثية الأبعاد) ═══════════ */
.editions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px 20px; perspective: 1200px; }
.edition { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.edition .cover { width: 100%; aspect-ratio: 3/4; position: relative; transform-style: preserve-3d; transform: rotateY(-14deg) rotateX(4deg); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.edition:hover .cover { transform: rotateY(0) rotateX(0) translateY(-8px) scale(1.04); }
.edition .cover .face { position: absolute; inset: 0; border-radius: 4px 10px 10px 4px; overflow: hidden; background: #F7F2E6; border: 1px solid #DDD3BE; box-shadow: 12px 16px 30px -12px rgba(0, 0, 0, .45); display: flex; flex-direction: column; padding: 10px; color: #111; }
.edition .cover .face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .08), transparent 12%, transparent 85%, rgba(255, 255, 255, .5)); pointer-events: none; }
.edition .cover .spine { position: absolute; top: 2px; bottom: 2px; right: -10px; width: 12px; background: repeating-linear-gradient(0deg, #EFE7D6 0 2px, #D9CDB4 2px 3px); transform: rotateY(-90deg); transform-origin: left; border-radius: 0 4px 4px 0; }
.edition .face .np-name { font-family: var(--font-head); font-size: 20px; font-weight: 700; border-bottom: 2px solid #111; padding-bottom: 2px; }
.edition .face .np-line { height: 5px; margin: 6px 0; background: repeating-linear-gradient(90deg, #CFC5AF 0 70%, transparent 70% 100%); background-size: 24px 5px; opacity: .8; }
.edition .face .np-img { flex: 1; background: linear-gradient(135deg, #D7CCB2, #BFB293); border-radius: 2px; margin: 4px 0; position: relative; overflow: hidden; }
.edition .face .np-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85) contrast(1.05); }
.edition .face .np-num { font-size: 11px; font-weight: 800; display: flex; justify-content: space-between; }
.edition b { font-size: 14px; }
.edition small { color: var(--muted); font-size: 12px; }

/* ═══════════ النشرة البريدية ═══════════ */
.newsletter { border-radius: 22px; padding: 34px; display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 24px; align-items: center; background: radial-gradient(circle at 15% 20%, rgba(197, 164, 109, .35), transparent 40%), linear-gradient(120deg, var(--red), #7E0A1D); color: #fff; position: relative; overflow: hidden; }
.newsletter::after { content: ""; position: absolute; width: 380px; height: 380px; left: -120px; bottom: -200px; border-radius: 50%; border: 50px solid rgba(255, 255, 255, .06); }
.newsletter h2 { font-family: var(--font-head); font-size: 32px; }
.newsletter p { opacity: .9; margin: 6px 0 0; }
.nl-form { display: flex; gap: 8px; background: rgba(255, 255, 255, .12); padding: 7px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .25); position: relative; z-index: 1; }
.nl-form input[type=email] { flex: 1; min-width: 0; border: 0; background: #fff; color: #111; border-radius: 11px; padding: 0 14px; height: 46px; font-weight: 600; }
.nl-form .btn { height: 46px; }

/* ═══════════ صفحة الخبر ═══════════ */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; padding-block: 26px 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { opacity: .5; }
.article-head .kicker { margin: 10px 0 6px; }
.article-head h1 { font-family: var(--font-head); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.32; font-weight: 700; }
.lead { font-size: calc(19px * var(--fs)); line-height: 1.9; color: var(--ink-2); border-right: 4px solid var(--gold); padding: 4px 16px 4px 0; margin: 18px 0; font-family: var(--font-head); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-block: 1px solid var(--line); margin-bottom: 20px; }
.byline { display: flex; align-items: center; gap: 10px; }
.byline .avatar { width: 44px; height: 44px; font-size: 13px; }
.byline b { display: block; font-size: 14.5px; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tool { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 800; transition: .2s; }
.tool:hover, .tool.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.figure { margin: 0 0 24px; border-radius: 18px; overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow); }
.figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.figure figcaption { padding: 10px 16px; font-size: 13px; color: var(--muted); background: var(--card); border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
.video { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; margin-bottom: 24px; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose { font-family: var(--font-head); font-size: calc(21px * var(--fs)); line-height: 2.05; color: var(--ink); }
.prose > p:first-of-type::first-letter { float: right; font-size: 3.6em; line-height: .9; padding: 8px 0 0 12px; color: var(--red); font-weight: 700; }
.prose h2 { font-size: 1.35em; margin: 1.4em 0 .5em; padding-right: 14px; border-right: 4px solid var(--red); }
.prose h3 { font-size: 1.15em; margin: 1.2em 0 .4em; color: var(--navy); }
.prose blockquote { margin: 1.4em 0; padding: 20px 26px; background: var(--paper-2); border-radius: 16px; border-right: 5px solid var(--gold); font-size: 1.08em; position: relative; }
.prose blockquote::before { content: "\201D"; position: absolute; left: 14px; top: -16px; font-size: 80px; color: var(--gold); opacity: .5; }
.prose ul, .prose ol { padding-right: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--red); }
.prose a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.prose img { border-radius: 14px; margin: 1em auto; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 15px; margin: 1em 0; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 8px 12px; }
.prose th { background: var(--paper-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.tags a { font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 5px; }
.tags a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.share-box b { margin-inline-end: 6px; display: inline-flex; align-items: center; gap: 6px; }
.share-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); transition: .25s; }
.share-btn:hover { transform: translateY(-3px); color: #fff; background: var(--navy); border-color: var(--navy); }
.share-btn.wa:hover { background: #25D366; border-color: #25D366; }
.share-btn.tg:hover { background: #229ED9; border-color: #229ED9; }
.share-btn.fb:hover { background: #1877F2; border-color: #1877F2; }
.next-card { margin-top: 30px; display: grid; grid-template-columns: 220px 1fr; border-radius: 18px; overflow: hidden; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); transition: .35s; }
:root[data-theme="dark"] .next-card { background: #182238; }
.next-card:hover { color: #fff; transform: translateY(-4px); }
.next-card img { width: 100%; height: 100%; object-fit: cover; min-height: 160px; }
.next-card .body { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.next-card small { color: var(--gold-2); font-weight: 900; letter-spacing: .03em; display: inline-flex; align-items: center; gap: 6px; }
.next-card h3 { font-family: var(--font-head); font-size: 24px; line-height: 1.45; }

/* وضع القراءة الهادئة */
body.focus-mode .article-side, body.focus-mode .top-strip, body.focus-mode .breaking, body.focus-mode .masthead, body.focus-mode .site-footer, body.focus-mode .related { display: none; }
body.focus-mode .article-wrap { grid-template-columns: minmax(0, 780px); justify-content: center; }

.side-sticky { position: sticky; top: calc(var(--nav-h) + 18px); display: flex; flex-direction: column; gap: 20px; }

/* ═══════════ رأس الأقسام والصفحات ═══════════ */
.page-banner { position: relative; overflow: hidden; padding: 40px 0 34px; color: #fff; background: linear-gradient(120deg, var(--sec, var(--navy)), #061633); isolation: isolate; }
.page-banner::before { content: attr(data-word); position: absolute; left: -10px; bottom: -40px; font-family: var(--font-head); font-size: 200px; font-weight: 700; line-height: 1; color: rgba(255, 255, 255, .06); z-index: -1; white-space: nowrap; }
.page-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 0%, rgba(255, 255, 255, .18), transparent 45%); }
.page-banner h1 { font-family: var(--font-head); font-size: clamp(32px, 4vw, 52px); }
.page-banner p { opacity: .88; max-width: 720px; margin: 8px 0 0; }
.page-banner .crumbs { color: rgba(255, 255, 255, .75); }
.page-banner .crumbs a:hover { color: #fff; }
.banner-stats { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.banner-stats span { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-weight: 800; font-size: 13.5px; transition: .2s; }
.filters a:hover { border-color: var(--navy); color: var(--navy); }
.filters a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.load-more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; }
.load-more .spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ترقيم الصفحات */
.pager { list-style: none; padding: 0; margin: 26px 0 0; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); font-weight: 800; padding: 0 10px; }
.pager .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager .gap { border: 0; background: none; }

/* ═══════════ الفتاوى ═══════════ */
.fatwa-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; position: relative; transition: .3s; }
.fatwa-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--gold); }
.fatwa-card h3 { font-family: var(--font-head); font-size: 20px; line-height: 1.5; }
.fatwa-card h3 a::after { content: ""; position: absolute; inset: 0; }
.fatwa-card .q { color: var(--ink-2); font-size: 14.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qa-box { border-radius: 18px; padding: 22px 26px; margin-bottom: 20px; position: relative; }
.qa-box.q { background: var(--paper-2); border: 1px solid var(--line); }
.qa-box.a { background: var(--card); border: 1px solid var(--gold); box-shadow: 0 0 0 5px rgba(197, 164, 109, .12); }
.qa-box .qa-label { position: absolute; top: -14px; right: 20px; background: var(--navy); color: #fff; font-weight: 900; font-size: 13px; padding: 2px 14px; border-radius: 999px; }
.qa-box.a .qa-label { background: var(--gold); color: #2A1E08; }
.search-box { display: flex; gap: 8px; background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; padding: 7px; box-shadow: var(--shadow-sm); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 12px; height: 46px; font-size: 16px; outline: none; }

/* ═══════════ النماذج ═══════════ */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.input, .textarea, .select { width: 100%; border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 12px; padding: 11px 14px; transition: .2s; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11, 42, 91, .12); background: var(--card); }
.textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.alert-error { background: rgba(200, 16, 46, .1); color: var(--red); border: 1px solid rgba(200, 16, 46, .3); }
.alert-success { background: rgba(10, 122, 66, .1); color: var(--green); border: 1px solid rgba(10, 122, 66, .3); }
.success-box { text-align: center; padding: 40px 20px; }
.success-box .ic { color: var(--green); width: 64px; height: 64px; margin-inline: auto; }
.result-info { font-size: 12px; color: var(--muted); }
form.is-busy { opacity: .7; pointer-events: none; }

/* ═══════════ البحث السريع (Ctrl+K) ═══════════ */
.palette { position: fixed; inset: 0; z-index: 3000; background: rgba(5, 10, 22, .55); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.palette.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.palette-box { width: 100%; max-width: 680px; background: var(--card); border-radius: 20px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6); overflow: hidden; border: 1px solid var(--line); animation: pop .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { transform: translateY(-14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; border: 0; background: transparent; height: 64px; font-size: 19px; outline: none; }
.palette-input kbd { font-size: 11px; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.palette-results { max-height: 56vh; overflow-y: auto; padding: 8px; }
.pr-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; }
.pr-item.on, .pr-item:hover { background: var(--paper-2); color: var(--ink); }
.pr-item .chip { flex-shrink: 0; margin-top: 3px; }
.pr-item b { display: block; font-family: var(--font-head); font-size: 17px; line-height: 1.5; }
.pr-item small { color: var(--muted); font-size: 12.5px; }
.palette-empty { padding: 26px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
mark { background: rgba(197, 164, 109, .4); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ═══════════ عناصر عائمة ═══════════ */
.fresh-pill { position: fixed; top: calc(var(--nav-h) + 14px); left: 50%; transform: translate(-50%, -30px); opacity: 0; z-index: 950; background: var(--red); color: #fff; font-weight: 900; font-size: 13.5px; padding: 8px 18px; border-radius: 999px; box-shadow: 0 12px 30px -8px rgba(200, 16, 46, .7); display: inline-flex; align-items: center; gap: 8px; transition: .45s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.fresh-pill.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.to-top { position: fixed; left: 22px; bottom: 22px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--card); color: var(--navy); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 800; opacity: 0; transform: translateY(20px); transition: .35s; }
.to-top.show { opacity: 1; transform: none; }
.to-top svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top svg.ring circle { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; transition: stroke-dashoffset .1s linear; }
.toast { position: fixed; bottom: 26px; right: 50%; transform: translate(50%, 30px); opacity: 0; z-index: 3500; background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 14px; font-weight: 800; box-shadow: var(--shadow-lg); transition: .35s cubic-bezier(.2, .8, .2, 1); pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(50%, 0); }
.toast.t-success { background: var(--green); color: #fff; }
.toast.t-error { background: var(--red); color: #fff; }
.toast.t-warning { background: #B45309; color: #fff; }

/* ═══════════ الظهور عند التمرير ═══════════ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ═══════════ صفحات نصية ═══════════ */
.static-page { max-width: 860px; margin: 0 auto; padding: 30px 0 50px; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-align: center; }
.stat-box b { display: block; font-family: var(--font-head); font-size: 36px; color: var(--navy); line-height: 1.2; }
.stat-box span { font-weight: 700; color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.error-code { font-family: var(--font-head); font-size: 140px; line-height: 1; font-weight: 700; background: linear-gradient(135deg, var(--red), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ═══════════ التذييل ═══════════ */
.site-footer { background: #071530; color: #C8D1E0; margin-top: 50px; position: relative; }
.site-footer::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--red) 0 33%, #fff 33% 66%, #111 66%); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 34px; padding: 50px 0 34px; }
.footer-logo { background: var(--paper); border-radius: 16px; padding: 12px 18px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 70px; width: auto; }
.site-footer h4 { color: #fff; font-family: var(--font-head); font-size: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.site-footer h4::before { content: ""; width: 6px; height: 18px; background: var(--gold); border-radius: 2px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a { color: #C8D1E0; font-size: 14.5px; transition: .2s; }
.footer-links a:hover { color: var(--gold-2); padding-right: 4px; }
.footer-about { font-size: 14px; line-height: 1.9; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: #fff; transition: .25s; }
.footer-social a:hover { background: var(--gold); color: #2A1E08; transform: translateY(-3px); }
.footer-imprint { font-size: 13px; line-height: 2; }
.footer-imprint b { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #8E9BB3; }
.footer-bottom a { color: #C8D1E0; }
.site-footer .nl-form { background: rgba(255, 255, 255, .06); }

/* ═══════════ قائمة الجوال ═══════════ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(5, 10, 22, .55); z-index: 1100; opacity: 0; pointer-events: none; transition: .3s; }
.drawer { position: fixed; top: 0; bottom: 0; right: 0; width: min(340px, 86vw); background: var(--card); z-index: 1200; transform: translateX(105%); transition: transform .4s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; padding: 18px; box-shadow: var(--shadow-lg); }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer-head img { height: 54px; width: auto; }
.drawer a.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-radius: 12px; font-weight: 800; border-right: 4px solid var(--sec, transparent); margin-bottom: 4px; }
.drawer a.nav-item:hover, .drawer a.nav-item.active { background: var(--paper-2); color: var(--ink); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); display: grid; place-items: center; }

/* ═══════════ الطباعة ═══════════ */
@media print {
    .top-strip, .mainnav, .breaking, .masthead .mh-side, .masthead .mh-edition, .site-footer, .article-side, .tools, .share-box, .next-card, .related, .to-top, .toast, .fresh-pill, .reading-progress { display: none !important; }
    body { background: #fff; color: #000; }
    body::before { display: none; }
    .article-wrap { display: block; }
    .prose { font-size: 14pt; }
}

/* ═══════════ الاستجابة للشاشات ═══════════ */
@media (max-width: 1180px) {
    .pulse-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pulse-grid .poll { grid-column: span 2; }
    .layout-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .editions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1020px) {
    .nav-links, .nav-live, .nav-btn .lbl, .nav-btn kbd { display: none; }
    .menu-toggle { display: inline-flex; }
    .nav-mini-logo { display: block; opacity: 1; transform: none; }
    .mainnav .wrap { justify-content: space-between; }
    .front-grid, .layout-lead, .article-wrap { grid-template-columns: minmax(0, 1fr); }
    .article-side { order: 2; }
    .side-sticky { position: static; }
    .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .masthead .wrap { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
    .mh-edition, .mh-side { justify-self: center; }
    .mh-side { align-items: center; }
    .ts-links .hide-sm { display: none; }
    .newsletter { grid-template-columns: 1fr; }
    .layout-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    body { font-size: 15px; }
    .wrap { padding-inline: 16px; }
    .ts-markets { display: none; }
    .top-strip .wrap { justify-content: space-between; }
    .mh-edition { display: none; }
    .mh-brand .logo { height: 70px; }
    .hero-card { min-height: 440px; border-radius: 16px; }
    .hero-body { padding: 22px 18px; }
    .hero-body p { font-size: 15px; }
    .stack-item { grid-template-columns: 96px 1fr; }
    .pulse-grid, .g-2, .g-3, .g-4, .layout-strip, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .pulse-grid .poll { grid-column: auto; }
    .layout-mosaic { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 220px; }
    .mosaic-item:first-child { grid-column: auto; grid-row: span 1; }
    .editions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sec-head h2 { font-size: 23px; }
    .sec-head .rule { display: none; }
    .sec-head { justify-content: space-between; }
    .next-card { grid-template-columns: 1fr; }
    .next-card img { aspect-ratio: 16/9; min-height: 0; }
    .prose { font-size: calc(19px * var(--fs)); }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-banner::before { font-size: 110px; }
    .newsletter { padding: 24px; }
    .nl-form { flex-direction: column; }
    .row-item { grid-template-columns: 1fr 96px; }
    .fatwa-corner { padding: 22px 18px; }
    .breaking .br-label .lbl-long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
    .ts-markets-track, .br-track { animation: none !important; }
}

/* ═══════════ أدوات مساعدة ═══════════ */
.sign { font-family: var(--font-sign); font-size: 21px; line-height: 1.2; display: block; }
.rot180 { transform: rotate(180deg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mb-3 { margin-bottom: 20px; } .mb-0 { margin-bottom: 0; }
.page-banner .op-writer { gap: 18px; margin-top: 8px; }
.page-banner .op-writer h1 { font-family: var(--font-sign); }
.i-sun, .i-moon { pointer-events: none; }
:root[data-theme="dark"] .i-moon { display: none; }
:root[data-theme="dark"] .i-sun.hidden { display: inline-block !important; }
.prose.fs-anim { transition: font-size .25s ease; }
.tool[data-listen].on .ic { animation: pulse-icon 1s ease-in-out infinite; }
@keyframes pulse-icon { 50% { transform: scale(1.25); } }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; padding-block: 30px; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.info-list li { display: flex; gap: 12px; align-items: flex-start; }
.info-list .ic { color: var(--red); margin-top: 4px; }
.search-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 22px; }
.result-item { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.result-item h3 { font-family: var(--font-head); font-size: 20px; line-height: 1.5; }
.result-item p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.edition-detail { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 34px; padding-block: 30px; }
.edition-detail .edition .cover { transform: rotateY(-8deg); }
@media (max-width: 1020px) { .contact-grid, .edition-detail { grid-template-columns: minmax(0, 1fr); } }
.jc-center { justify-content: center; }
.edition-detail h1 { font-family: var(--font-head); font-size: clamp(30px, 3.4vw, 44px); margin-top: 10px; }
.edition-detail h2 { font-family: var(--font-head); font-size: 24px; }
.edition-detail .editions { grid-template-columns: 1fr; }
.static-page h2 { font-size: 1.3em; }
.hero-body .kicker { color: var(--gold-2); }
.mh-brand .logo { height: 104px; }
/* ثبات ألوان العناصر الداكنة في الطبعة الليلية */
.avatar > span { background: #0B1A33; color: #fff; }
:root[data-theme="dark"] .mh-edition { border-color: var(--gold); box-shadow: 4px 4px 0 var(--gold); }
:root[data-theme="dark"] .mh-edition .num { background: #0B2A5B; }
:root[data-theme="dark"] .chip.ink { background: #E9E3D5; color: #0A0E16; }
:root[data-theme="dark"] .mh-brand .logo { filter: drop-shadow(0 0 18px rgba(157, 184, 236, .2)); background: rgba(251, 248, 241, .92); border-radius: 18px; padding: 6px 12px; }
/* منع تمدد حاويات الشرائط المتحركة لعرض محتواها (كان يسبب تمريراً أفقياً على الجوال) */
.br-track-wrap, .ts-markets { min-width: 0; }
.breaking .wrap, .top-strip .wrap { min-width: 0; overflow: hidden; }
html { overflow-x: clip; }
@media (max-width: 1020px) { .hide-sm { display: none !important; } }
@media (max-width: 420px) { .ts-date { font-size: 11.5px; } .mh-tagline::before, .mh-tagline::after { display: none; } }
/* مكان صورة الصفحة الأولى في أغلفة الأرشيف: علامة مائية بالشعار واسم الجريدة */
.edition .face .np-img { background-image: url("/assets/watermark?tone=navy"), linear-gradient(135deg, #E4DAC4, #CFC2A3); background-size: 280px 210px, cover; }
