/* الهوية: الأصفر يسأل، الأبيض يشرح، الأسود يحسم. التصميم للموبايل أولًا، والديسكتوب امتداد له. */
:root {
  --y: #FFD400;
  --ink: #121210;
  --paper: #FFFFFF;
  --mute: #5F5D56;
  --rule: #E4E2DA;
  --wash: #F4F3EF;
  --sec-general: #FFD400;
  --sec-politics: #FF5A4C;
  --sec-economy: #33C8F5;
  --sec-culture: #B8A6FF;
  --sec-sports: #1FC95B;
  --c: var(--sec-general);
  --on: var(--ink);
  --font: "Cairo", "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  --t-q: clamp(30px, 8.6vw, 40px);
  --t-h1: clamp(28px, 8vw, 38px);
  --gut: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
.c-general { --c: var(--sec-general); --on: var(--ink); }
.c-politics { --c: var(--sec-politics); --on: var(--ink); }
.c-economy { --c: var(--sec-economy); --on: var(--ink); }
.c-culture { --c: var(--sec-culture); --on: var(--ink); }
.c-sports { --c: var(--sec-sports); --on: var(--ink); }
.c-grave { --c: var(--ink); --on: var(--paper); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--font); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.c-grave :focus-visible, .qs.grave :focus-visible { outline-color: var(--y); }
.num { font-variant-numeric: tabular-nums; }
bdi { unicode-bidi: isolate; }
.wrap { padding-left: var(--gut); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip-link:focus { top: 8px; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.reading main { padding-bottom: 0; }

/* ---------- الشريط السفلي ---------- */
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper); border-top: 2px solid var(--ink); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar a { display: grid; justify-items: center; gap: 1px; padding: 8px 0 6px; font-size: 12px; font-weight: 700; text-decoration: none; color: var(--mute); min-height: 56px; }
.tabbar svg { width: 30px; height: 24px; padding: 2px 5px; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { background: var(--y); }

/* ---------- الترويسة ---------- */
.mast { background: var(--y); border-bottom: 2px solid var(--ink); }
.mast-in { display: flex; align-items: center; justify-content: space-between; padding-block: 14px 8px; }
.logo { display: flex; align-items: center; text-decoration: none; padding-block: 2px; }
.logo img { display: block; height: 29px; width: auto; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; padding: 0; color: inherit; text-decoration: none; }
.icon-btn svg { width: 22px; height: 22px; }
.web-nav { display: none; }
.dateline { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; padding-block: 0 10px; }
.secnav { display: flex; gap: 6px; overflow-x: auto; padding-block: 0 12px; scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; text-decoration: none; padding: 4px 10px; background: var(--paper); border: 2px solid var(--ink); min-height: 34px; }
.secnav a i { width: 10px; height: 10px; background: var(--c); outline: 1.5px solid var(--ink); }
.secnav a.on { background: var(--ink); color: var(--paper); }
.sec-head { background: var(--c); color: var(--on); border-bottom: 2px solid var(--ink); }
.sec-head h1 { margin: 0; padding-block: 18px; font-size: 32px; font-weight: 900; }

/* ---------- عناصر مشتركة ---------- */
.tape { display: inline-block; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 800; padding: 3px 10px 4px; line-height: 1.5; width: max-content; max-width: 100%; }
.chip { display: inline-block; background: var(--c); color: var(--on); font-size: 12px; font-weight: 800; padding: 1px 8px 2px; line-height: 1.6; flex: 0 0 auto; }
.meta { font-size: 12px; color: var(--mute); font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.meta .qmark { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 800; }
.meta .qmark i { font-style: normal; background: var(--y); color: var(--ink); width: 18px; height: 18px; display: grid; place-items: center; font-size: 13px; line-height: 1; font-weight: 900; }
.dek { font-size: 16px; line-height: 1.75; margin: 0; }
.empty { padding-block: 40px; color: var(--mute); font-size: 16px; }
.empty h1 { color: var(--ink); font-size: 26px; margin: 0 0 8px; }
.empty a { color: var(--ink); font-weight: 800; }

/* الصور: صورة حقيقية، أو نمط نقطي بلون القسم في مكانها */
.ph { position: relative; width: 100%; overflow: hidden; background: #1d1c19; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph:not(.has-img)::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--c) 0 1.5px, transparent 1.9px); background-size: 6px 6px; -webkit-mask-image: radial-gradient(ellipse 52% 66% at 62% 55%, #000 0 35%, transparent 72%), linear-gradient(0deg, #000, transparent 45%); mask-image: radial-gradient(ellipse 52% 66% at 62% 55%, #000 0 35%, transparent 72%), linear-gradient(0deg, #000, transparent 45%); }
.c-grave .ph:not(.has-img)::before, .ph.c-grave:not(.has-img)::before { background-image: radial-gradient(circle, #8d8a80 0 1.5px, transparent 1.9px); }

/* ---------- الرئيسية ---------- */
.lead { display: block; text-decoration: none; }
.lead-ph { aspect-ratio: 5 / 4; }
.lead-slab { background: var(--paper); margin-top: -56px; margin-inline-end: 34px; position: relative; padding-top: 16px; padding-bottom: 22px; display: grid; gap: 8px; }
.lead-slab .tape.c-grave, .lead-slab .tape.c-general { background: var(--ink); color: var(--paper); }
.lead-slab .tape:not(.c-grave):not(.c-general) { background: var(--c); color: var(--on); }
.h-lead { font-size: var(--t-h1); font-weight: 900; line-height: 1.28; margin: 0; text-wrap: balance; }
.band { display: grid; gap: 14px; text-decoration: none; background: var(--c); color: var(--on); padding-block: 26px 28px; border-top: 2px solid var(--ink); }
.band .tape { background: var(--on); color: var(--c); }
.band .h-band { font-size: clamp(27px, 8.2vw, 38px); font-weight: 900; line-height: 1.24; margin: 0; text-wrap: balance; }
.band-ph { aspect-ratio: 16 / 10; margin-inline-start: calc(var(--gut) * -1); width: calc(100% + var(--gut)); }
.band.flip .band-ph { margin-inline-start: 0; margin-inline-end: calc(var(--gut) * -1); }
.band .dek { font-weight: 500; }
.band .meta { color: inherit; opacity: .82; }
.band .meta .qmark { color: inherit; }
.band .meta .qmark i { background: var(--on); color: var(--c); }
.qlist { padding-block: 26px 12px; }
.qlist-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 3px solid var(--ink); }
.qlist-h h2 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.3; }
.qlist-h span { font-size: 12px; color: var(--mute); font-weight: 700; }
.qrow { display: grid; gap: 6px; padding-block: 18px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.qrow:hover .qrow-q { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--y); text-underline-offset: 6px; }
.qrow-q { font-size: 21px; font-weight: 800; line-height: 1.45; margin: 0; text-wrap: pretty; }
.qrow-t { font-size: 14.5px; color: var(--mute); font-weight: 600; line-height: 1.6; margin: 0; display: flex; gap: 8px; align-items: baseline; }
.resume { display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--paper); padding-block: 12px; text-decoration: none; }
.resume .rbar { flex: 0 0 46px; height: 4px; background: #3b3a36; position: relative; }
.resume .rbar span { position: absolute; inset: 0 0 0 auto; background: var(--y); }
.resume small { display: block; font-size: 12px; color: var(--y); font-weight: 800; }
.resume strong { font-size: 14.5px; font-weight: 700; line-height: 1.5; display: block; }
.foot { padding-block: 24px 30px; font-size: 13px; color: var(--mute); line-height: 1.8; border-top: 1px solid var(--rule); margin-top: 20px; }
.foot p { margin: 0 0 4px; }
.foot b, .foot a { color: var(--ink); }
.static { padding-block: 26px 10px; max-width: 720px; }
.static h1 { font-size: 30px; font-weight: 900; margin: 0 0 12px; }
.static p { font-size: 18px; line-height: 1.95; }
.search { padding-block: 22px 6px; display: grid; gap: 8px; }
.search label { font-weight: 900; font-size: 20px; }
.search-row { display: flex; gap: 0; border: 2.5px solid var(--ink); }
.search-row input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 17px; padding: 10px 12px; background: var(--paper); }
.search-row input:focus { outline: none; background: #fffbe0; }
.search-row button { border: 0; background: var(--ink); color: var(--paper); font-weight: 800; padding: 0 18px; cursor: pointer; font-size: 16px; }

/* ---------- القصة: الشريط العلوي ---------- */
.sbar { position: sticky; top: 0; z-index: 30; background: var(--paper); display: flex; align-items: center; gap: 4px; padding-inline: 8px; height: 54px; border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
.story:not(.answered) .sbar { background: var(--c); color: var(--on); border-bottom-color: rgba(18, 18, 16, .25); }
.sbar-t { flex: 1; min-width: 0; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; }
.sbar.show-t .sbar-t { opacity: 1; }
.prog { position: absolute; inset: auto 0 -1px 0; height: 3px; }
.prog span { display: block; height: 100%; width: 0; background: var(--ink); }
[data-save][aria-pressed="true"] svg path { fill: currentColor; }

/* ---------- شاشة السؤال ---------- */
.qs { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--c); color: var(--on); min-height: calc(100svh - 54px - env(safe-area-inset-top, 0px)); }
.qs-mark { flex: 1 1 0; min-height: 96px; position: relative; overflow: hidden; }
.glyph { position: absolute; inset-inline-end: -.04em; top: -.22em; font-size: min(300px, 78vw); line-height: 1; font-weight: 1000; pointer-events: none; user-select: none; color: var(--ink); }
.qs.grave .glyph { color: transparent; -webkit-text-stroke: 2px var(--y); }
.qs-top { position: relative; padding-block: 18px 0; display: flex; justify-content: flex-start; }
.qs-cat { margin: 0; font-size: 12px; font-weight: 800; }
.qs-cat span { display: block; font-weight: 600; opacity: .75; }
.qs-body { padding-block: 0 18px; display: grid; gap: 16px; position: relative; }
.qs-ctx { font-size: 16px; line-height: 1.8; margin: 0; font-weight: 500; max-width: 34ch; }
.qs-ctx b { font-weight: 800; }
.qs-q { font-size: var(--t-q); font-weight: 900; line-height: 1.3; margin: 0; text-wrap: balance; }
.qs-hint { font-size: 13px; line-height: 1.7; margin: 0; font-weight: 600; opacity: .85; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.choice { min-height: 64px; border: 2.5px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 20px; font-weight: 800; cursor: pointer; padding: 8px 10px; line-height: 1.3; transition: background .12s, color .12s; }
.choice:hover { background: var(--ink); color: var(--paper); }
.qs.grave .choice { background: transparent; color: var(--paper); border-color: var(--paper); }
.qs.grave .choice:hover { background: var(--paper); color: var(--ink); }
.choice.picked { background: var(--ink); color: var(--c); }
.qs.grave .choice.picked { background: var(--y); color: var(--ink); border-color: var(--y); }
.qs-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; padding-top: 4px; }
.qs-foot span { opacity: .75; }
.skip { background: none; border: 0; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 10px 0; min-height: 44px; color: inherit; }

/* بعد الإجابة: تنكمش شاشة السؤال إلى شريط التعليق ويظهر المقال */
.story.answered .qs { display: none; }
.story:not(.answered) .art { display: none; }
.ans { background: var(--c); color: var(--on); padding-block: 16px 18px; display: grid; gap: 8px; border-bottom: 2px solid var(--ink); }
.ans.grave { border-bottom: 0; }
.ans-q { font-size: 13px; font-weight: 700; opacity: .8; margin: 0; line-height: 1.6; }
.ans-pick { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.ans-pick b { background: var(--on); color: var(--c); padding: 2px 10px 3px; font-size: 14px; }
.ans.grave .ans-pick b { background: var(--y); color: var(--ink); }
.ans-c { font-size: 18px; font-weight: 700; line-height: 1.65; margin: 0; }
.enter .ans { animation: squash .26s ease-out both; }
.enter .art { animation: rise .38s .06s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes squash { from { clip-path: inset(0 0 -60% 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- رأس المقال ---------- */
.ahead { padding-block: 24px 18px; display: grid; gap: 12px; }
.kick { display: flex; gap: 10px; align-items: center; font-size: 12px; font-weight: 800; flex-wrap: wrap; }
.kick .tape { background: var(--c); color: var(--on); }
.c-general .kick .tape { background: var(--ink); color: var(--paper); }
.h1 { font-size: var(--t-h1); font-weight: 900; line-height: 1.3; margin: 0; text-wrap: balance; }
.h1:focus { outline: none; }
.adek { font-size: 19px; line-height: 1.75; font-weight: 500; margin: 0; }
.byline { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--mute); font-weight: 600; border-top: 1px solid var(--rule); padding-top: 10px; }
.byline b { color: var(--ink); font-weight: 800; }
.hero { margin: 0; }
.hero-ph { aspect-ratio: 4 / 3; }
.hero-cap, .fig figcaption { font-size: 12.5px; color: var(--mute); line-height: 1.7; padding-block: 8px 0; margin: 0; }
.credit { opacity: .8; }

/* ---------- المتن ---------- */
.body { padding-block: 14px 0; }
.body > * { margin: 0; }
.p { font-size: 18px; line-height: 1.95; margin-block: 0 22px !important; text-wrap: pretty; }
mark { background: linear-gradient(transparent 52%, var(--y) 52% 92%, transparent 92%); color: inherit; padding: 0 2px; }
.h2 { font-size: 23px; font-weight: 900; line-height: 1.45; margin-block: 16px 12px !important; text-wrap: balance; }
.h2::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--c); outline: 2px solid var(--ink); outline-offset: -2px; margin-inline-end: 10px; vertical-align: .12em; }
.c-grave .h2::before { background: var(--y); }
.blk-h { font-size: 15px; font-weight: 900; margin-block: 4px 8px !important; }
.fig { margin-block: 6px 26px !important; }
.fig-ph { aspect-ratio: 16 / 10; }

.short { background: var(--ink); color: var(--paper); margin-inline: calc(var(--gut) * -1) !important; padding: 22px var(--gut) 24px; margin-block: 8px 30px !important; display: grid; gap: 10px; }
.short .tape { background: var(--c); color: var(--on); }
.c-grave .short .tape { background: var(--y); color: var(--ink); }
.short h3 { font-size: 22px; font-weight: 900; line-height: 1.5; margin: 0; text-wrap: balance; }
.short p { font-size: 16.5px; line-height: 1.9; margin: 0; color: #e6e4dc; }

.pull { margin-block: 10px 30px !important; padding-block: 18px; border-block: 3px solid var(--ink); display: grid; gap: 6px; }
.pull blockquote { margin: 0; }
.pull q { font-size: 32px; font-weight: 900; line-height: 1.3; quotes: "«" "»"; }
.pull q::before, .pull q::after { background: var(--y); padding: 0 2px; }
.pull figcaption { font-size: 14px; color: var(--mute); font-weight: 600; line-height: 1.7; }

.note { font-size: 14.5px; line-height: 1.85; margin-block: 0 26px !important; padding: 12px 14px; border-inline-start: 6px solid var(--y); outline: 1px solid var(--rule); font-weight: 500; }
.note b { font-weight: 800; }
.note-analysis { border-inline-start-style: dashed; }

.stat { margin-block: 6px 30px !important; border-top: 3px solid var(--ink); padding-top: 14px; display: grid; gap: 8px; }
.stat-n { font-size: clamp(34px, 11vw, 48px); font-weight: 900; line-height: 1.15; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.stat-n b { background: var(--c); color: var(--on); padding: 0 10px 4px; font-weight: 900; }
.c-grave .stat-n b { background: var(--y); color: var(--ink); }
.stat-n small { font-size: 17px; font-weight: 800; line-height: 1.5; }
.stat p { margin: 0; font-size: 16px; line-height: 1.8; font-weight: 500; }
.stat > span { font-size: 12.5px; color: var(--mute); font-weight: 600; line-height: 1.7; }

.mech { margin-block: 6px 30px !important; display: grid; gap: 10px; }
.mech-h { font-size: 15px; font-weight: 900; margin: 0; }
.mech ol { list-style: none; margin: 0; padding: 0; }
.mech li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.mech li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 21px; top: 44px; bottom: 0; width: 2px; background: var(--ink); }
.mech .n { width: 44px; height: 44px; border: 2.5px solid var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 18px; background: var(--paper); position: relative; z-index: 1; }
.mech li.fail .n { background: var(--c); color: var(--on); }
.c-grave .mech li.fail .n { background: var(--y); color: var(--ink); }
.mech li.fail:not(:last-child)::after { background: repeating-linear-gradient(180deg, var(--ink) 0 5px, transparent 5px 10px); }
.mech strong { display: block; font-size: 16.5px; font-weight: 800; line-height: 1.5; padding-top: 2px; }
.mech li span:not(.n) { display: block; font-size: 14.5px; line-height: 1.75; color: var(--mute); }
.mech li.fail span:not(.n) { color: var(--ink); }
.mech-src { font-size: 12px; color: var(--mute); margin: 0; line-height: 1.7; }

.tl { margin-block: 4px 30px !important; border-top: 3px solid var(--ink); }
.tl-h { display: flex; justify-content: space-between; align-items: baseline; padding-block: 10px 6px; gap: 10px; }
.tl-h strong { font-size: 15px; font-weight: 900; }
.tl-h span { font-size: 12px; color: var(--mute); font-weight: 700; }
.tl-i { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding-block: 11px; border-bottom: 1px solid var(--rule); }
.tl-d { font-size: 13px; font-weight: 800; line-height: 1.6; }
.tl-t { font-size: 15px; line-height: 1.75; }
.tl-i.key { background: var(--c); color: var(--on); margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); border-bottom-color: var(--ink); }
.c-grave .tl-i.key { background: var(--y); color: var(--ink); }
.tl-i.key .tl-t { font-weight: 700; }

.cases { margin-block: 4px 26px !important; }
.case { display: grid; gap: 6px; padding-block: 14px; border-top: 2px solid var(--ink); }
.case:last-child { border-bottom: 2px solid var(--ink); }
.case-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.case-h strong { font-size: 17px; font-weight: 900; }
.case-h span { font-size: 12.5px; font-weight: 700; color: var(--mute); }
.case-o { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.75; }
.case-o i { font-style: normal; flex: 0 0 auto; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border: 2px solid var(--ink); line-height: 1.5; margin-top: 2px; white-space: nowrap; }
.case-o i.tag-solid { background: var(--ink); color: var(--paper); }
.case-o i.tag-accent { background: var(--c); color: var(--on); }
.c-grave .case-o i.tag-accent { background: var(--y); color: var(--ink); }
.case.now { background: var(--wash); margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); }

.settle { margin-block: 4px 30px !important; display: grid; gap: 14px; }
.settle-col h4 { margin: 0; font-size: 14px; font-weight: 900; padding: 8px 12px; line-height: 1.5; }
.settle-col.yes h4 { background: var(--ink); color: var(--paper); }
.settle-col.no h4 { outline: 2.5px dashed var(--ink); outline-offset: -2.5px; }
.settle-col ul { margin: 0; padding: 0; list-style: none; }
.settle-col li { font-size: 15px; line-height: 1.75; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.settle-stamp { font-size: 12px; color: var(--mute); font-weight: 700; margin: 0; }

.follow { margin-block: 4px 30px !important; background: var(--c); color: var(--on); margin-inline: calc(var(--gut) * -1) !important; padding: 20px var(--gut) 22px; display: grid; gap: 10px; }
.c-grave .follow { background: var(--y); color: var(--ink); }
.follow h3 { margin: 0; font-size: 19px; font-weight: 900; }
.follow ul { margin: 0; padding: 0; list-style: none; }
.follow li { font-size: 15.5px; line-height: 1.7; padding: 9px 0; border-top: 1.5px solid currentColor; font-weight: 600; }

.term { margin-block: 0 26px !important; border: 2.5px solid var(--ink); padding: 12px 14px; display: grid; gap: 6px; }
.term dt { font-size: 17px; font-weight: 900; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.term .tape { background: var(--c); color: var(--on); }
.c-grave .term .tape { background: var(--y); color: var(--ink); }
.term dd { margin: 0; font-size: 15px; line-height: 1.8; }

.qa { margin-block: 0 26px !important; border-top: 3px solid var(--ink); }
.qa-i { padding-block: 12px; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.qa dt { font-size: 16.5px; font-weight: 900; line-height: 1.6; }
.qa dt::before { content: "س. "; color: var(--mute); }
.qa dd { margin: 0; font-size: 15.5px; line-height: 1.85; }

.cmpb { margin-block: 4px 28px !important; }
.cmpb-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.cmpb-c { padding: 12px; display: grid; gap: 6px; align-content: start; }
.cmpb-c span { font-size: 12.5px; font-weight: 900; }
.cmpb-c p { margin: 0; font-size: 15px; line-height: 1.75; }
.cmpb-c.before { outline: 2.5px dashed var(--ink); outline-offset: -2.5px; }
.cmpb-c.after { background: var(--c); color: var(--on); }
.c-grave .cmpb-c.after { background: var(--y); color: var(--ink); }
.cmpb-arrow { align-self: center; font-size: 22px; font-weight: 900; }

.chart { margin: 4px 0 28px !important; border-top: 3px solid var(--ink); padding-top: 10px; display: grid; gap: 10px; }
.chart-h { font-size: 15px; font-weight: 900; line-height: 1.6; }
.chart-h span { font-weight: 700; color: var(--mute); margin-inline-start: 6px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 7.5em) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.bar-l { font-weight: 700; line-height: 1.4; }
.bar-t { height: 22px; background: var(--wash); position: relative; }
.bar-f { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--c); outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.c-grave .bar-f { background: var(--y); }
.bar-v { font-weight: 800; white-space: nowrap; }
.chart-line { width: 100%; height: auto; overflow: visible; }
.chart-line .axis { stroke: var(--ink); stroke-width: 1.5; }
.chart-line .line { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.chart-line .dot { fill: var(--c); stroke: var(--ink); stroke-width: 2; }
.c-grave .chart-line .dot { fill: var(--y); }
.chart-line text { font-family: var(--font); font-size: 11px; text-anchor: middle; fill: var(--ink); font-weight: 700; }
.chart-line .lab { fill: var(--mute); font-weight: 600; }
.chart-src { font-size: 12px; color: var(--mute); margin: 0; line-height: 1.7; }

.srcs { margin-top: 8px; border-top: 3px solid var(--ink); padding-block: 12px 4px; display: grid; gap: 8px; }
.srcs h3 { margin: 0; font-size: 15px; font-weight: 900; }
.srcs ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 7px; }
.srcs li { font-size: 13.5px; line-height: 1.7; color: var(--mute); }
.srcs li a, .srcs li b { color: var(--ink); font-weight: 700; text-decoration-color: var(--y); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.endmark { display: flex; align-items: center; gap: 10px; padding-block: 22px 18px; font-size: 12px; color: var(--mute); font-weight: 700; }
.endmark i { font-style: normal; width: 22px; height: 22px; background: var(--ink); color: var(--y); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.next { display: grid; gap: 10px; background: var(--ink); color: var(--paper); padding-block: 26px calc(30px + env(safe-area-inset-bottom, 0px)); text-decoration: none; }
.next small { color: #fff; opacity: .7; font-size: 12px; font-weight: 800; }
.next strong { font-size: 24px; font-weight: 900; line-height: 1.4; text-wrap: balance; }
.next > span { font-size: 14px; color: #c4c2ba; }
.next .next-go { display: inline-flex; gap: 8px; align-items: center; background: var(--c); color: var(--on); font-weight: 800; font-size: 14px; padding: 8px 14px; width: max-content; margin-top: 4px; }
.next .next-go.c-grave { background: var(--y); color: var(--ink); }

.toast { position: fixed; inset: auto 16px calc(80px + env(safe-area-inset-bottom, 0px)) 16px; z-index: 60; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700; padding: 10px 14px; border-inline-start: 6px solid var(--y); opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s; pointer-events: none; max-width: 420px; margin-inline: auto; }
.reading .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.toast.on { opacity: 1; transform: none; }
.preview-flag { position: fixed; inset: auto 0 0 0; background: var(--ink); color: var(--y); font-size: 12px; font-weight: 800; text-align: center; padding: 4px; z-index: 70; }

@media (prefers-reduced-motion: reduce) {
  .enter .ans, .enter .art { animation: none; }
  .sbar-t, .toast, .choice { transition: none; }
}

@media (max-width: 340px) {
  :root { --gut: 16px; }
  .choice { font-size: 18px; min-height: 58px; }
  .tl-i { grid-template-columns: 80px 1fr; }
  .pull q { font-size: 27px; }
  .cmpb-row { grid-template-columns: 1fr; }
  .cmpb-arrow { transform: rotate(-90deg); justify-self: center; }
}

/* ---------- الديسكتوب: المنطق نفسه بتكوين أعرض ---------- */
@media (min-width: 900px) {
  :root { --gut: 40px; }
  main { padding-bottom: 0; }
  .tabbar { display: none; }
  .toast { bottom: 30px; inset-inline: auto 30px; width: 340px; }
  .mast-in, .dateline, .secnav { max-width: 1240px; margin-inline: auto; }
  .web-nav { display: flex; gap: 22px; font-size: 14px; font-weight: 800; }
  .web-nav a { text-decoration: none; padding-bottom: 2px; }
  .web-nav a[aria-current="page"] { border-bottom: 3px solid var(--ink); }
  .mast-search { display: none; }
  .logo img { height: 34px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border-bottom: 2px solid var(--ink); max-width: 1240px; margin-inline: auto; }
  .home-grid .lead { border-inline-end: 2px solid var(--ink); }
  .home-grid .lead-ph { aspect-ratio: 16 / 10; }
  .home-grid .band { border-top: 0; align-content: start; }
  .home-grid .band-ph { margin: 0; width: 100%; }
  .lead-slab { margin-top: -70px; margin-inline-end: 120px; padding-inline-end: 24px; }
  .qlist, .static, .search, .empty, .foot, .sec-head h1 { max-width: 1240px; margin-inline: auto; }
  .qlist-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
  .qrow { border-bottom: 0; border-top: 1px solid var(--rule); }
  .band.wide { grid-template-columns: 5fr 4fr; align-items: center; column-gap: 36px; padding-inline: max(40px, calc(50% - 580px)); }
  .band.wide .band-ph { grid-row: span 4; grid-column: 2; margin: 0; width: 100%; }
  .band.wide > :not(.band-ph) { grid-column: 1; }
  .qs { min-height: 640px; }
  .qs-body { max-width: 840px; margin-inline: auto; width: 100%; }
  .glyph { font-size: 460px; }
  .ans > *, .ahead, .body { max-width: 720px; margin-inline: auto; width: 100%; }
  .ans { padding-inline: 40px; }
  .ahead, .body { padding-inline: 0; }
  .hero { max-width: 1040px; margin-inline: auto; padding-inline: 40px; }
  .hero-cap { padding-inline: 0; }
  .short, .follow { margin-inline: -40px !important; padding-inline: 40px; }
  .tl-i.key, .case.now { margin-inline: -20px; padding-inline: 20px; }
  .settle { grid-template-columns: 1fr 1fr; }
  .settle-stamp { grid-column: 1 / -1; }
  .next { padding-inline: max(40px, calc(50% - 360px)); }
  .endmark { max-width: 720px; margin-inline: auto; padding-inline: 0; }
}
