/* =========================================================================
   د. عبد العزيز الأمير — للمحاماة والاستشارات القانونية
   نظام التصميم — مشتق من design_handoff_alameer_site/README.md
   القيم هنا هي المصدر الوحيد؛ لا لون ولا مقاس خارج هذا الملف.
   ========================================================================= */

/* ---------- 1 · الخطوط ---------- */

@font-face {
  font-family: 'ZaridSerif';
  src: url('../fonts/ZaridSerif-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bukra';
  src: url('../fonts/Bukra-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bukra';
  src: url('../fonts/Bukra-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
/* لا يوجد وزن عريض ولا مائل مرخّص. التوكيد بالحجم واللون والفراغ فقط. */

/* ---------- 2 · الرموز ---------- */

:root {
  /* اللون */
  --ink:            #14130F;
  --paper:          #FBFAF7;
  --sand:           #F5F2EA;
  --rule:           #E6E2D8;  /* خط شعري على الورقي */
  --rule-ink:       #2B2823;  /* خط شعري داخل الأقسام الداكنة */
  --rule-field:     #D9D4C8;  /* حدود الحقول والأزرار الثانوية */
  --rule-ink-soft:  #3A3730;  /* حدّ الزر الثانوي على الداكن */
  --gold-on-paper:  #7C663A;  /* الذهبي كنصّ على الورقي — الوحيد الذي يجتاز 4.5:1 */
  --gold-on-ink:    #C7AC73;  /* الذهبي كنصّ على الحبري */
  --text-2:         #57534A;  /* فقرات على الورقي */
  --text-muted:     #55534E;  /* عناوين صغيرة */
  --text-faint:     #7A7871;  /* الأرقام الترتيبية والفواصل */
  --text-2-ink:     #A9A69E;  /* فقرات داخل الأقسام الداكنة */
  --success:        #3F6B4A;

  /* الخطوط */
  --display: 'ZaridSerif', 'Times New Roman', serif;
  --body:    'Bukra', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* المسافات والقياسات */
  --container: 1240px;
  --gutter: 40px;
  --gap: clamp(24px, 3.5vw, 96px);
  --section-pad: 132px;
  --header-h: 92px;
}

/* ---------- 3 · الأساس ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* الصينية تستخدم نوتو */
body.lang-zh { font-family: 'Noto Sans SC', system-ui, sans-serif; line-height: 1.9; }
body.lang-zh .display,
body.lang-zh h1, body.lang-zh h2, body.lang-zh h3 {
  font-family: 'Noto Serif SC', serif; letter-spacing: 0.02em; line-height: 1.42;
}

img { max-width: 100%; }

/* سمة hidden تغلب أي display في الأصناف — وإلا بقيت التبويبات المخفية ظاهرة */
[hidden] { display: none !important; }

a { color: var(--ink); text-decoration: none; transition: color .12s linear; }
a:hover { color: var(--gold-on-paper); }

h1, h2, h3, p, figure, blockquote { margin: 0; }

hr.rule-mark {
  width: 40px; height: 1px; border: 0; margin: 0;
  background: var(--gold-on-paper);
}
.on-ink hr.rule-mark { background: var(--gold-on-ink); }

input, textarea, select, button { font-family: inherit; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 1px solid var(--gold-on-paper);
  outline-offset: 4px;
}

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 14px 24px; font-size: 15px;
}
.skip-link:focus { inset-inline-start: 0; color: var(--paper); }

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

/* ---------- 4 · التخطيط ---------- */

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

.section { padding-block: var(--section-pad); }
.section--sand { background: var(--sand); }
.section--ink  { background: var(--ink); color: var(--paper); }

/* عمود جانبي + محتوى — كل الأعمدة minmax(0,Nfr) بلا استثناء */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.26fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.aside { display: flex; flex-direction: column; gap: 16px; }
.aside--sticky { position: sticky; top: calc(var(--header-h) + 24px); }

.stack { display: flex; flex-direction: column; }
.stack-20 { display: flex; flex-direction: column; gap: 20px; }
.stack-32 { display: flex; flex-direction: column; gap: 32px; }
.stack-44 { display: flex; flex-direction: column; gap: 44px; }

/* ---------- 5 · الطباعة ---------- */

.display { font-family: var(--display); font-weight: 400; line-height: 1.34; }

.h-hero    { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5vw, 68px); line-height: 1.34; }
.h-page    { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.34; }
.h-section { font-family: var(--display); font-weight: 400; font-size: clamp(29px, 3.4vw, 46px); line-height: 1.36; }
.h-card    { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.38; }
.h-area    { font-family: var(--display); font-weight: 400; font-size: clamp(25px, 2.9vw, 38px); line-height: 1.34; }

.quote {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(21px, 2vw, 26px); line-height: 1.85;
  color: var(--ink); max-width: 52ch;
}

.lede  { font-size: 18px; line-height: 1.9; color: var(--text-2); font-weight: 300; max-width: 58ch; }
.body  { font-size: 17px; line-height: 1.9; color: var(--text-2); font-weight: 300; max-width: 58ch; }
.small { font-size: 15px; line-height: 1.85; color: var(--text-2); font-weight: 300; }

.on-ink .lede, .on-ink .body, .on-ink .small { color: var(--text-2-ink); }

.label { font-size: 14px; line-height: 1.7; font-weight: 400; color: var(--text-muted); }

/* العنوان الصغير: التتبّع على الشطر اللاتيني فقط.
   الحرف العربي المتباعد تنكسر وصلاته ويصير غير مقروء. */
.eyebrow { font-size: 15px; font-weight: 400; color: var(--text-muted); }
.eyebrow .lat { letter-spacing: 0.14em; }
.eyebrow--gold { color: var(--gold-on-paper); }
.on-ink .eyebrow { color: var(--gold-on-ink); }
.eyebrow--sm { font-size: 14px; }
.eyebrow--sm .lat { letter-spacing: 0.12em; }

.num-ordinal { font-family: var(--body); font-weight: 400; color: var(--text-faint); line-height: 1; }

/* ---------- 6 · الأزرار ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 15px; font-weight: 400; line-height: 1;
  padding: 17px 40px; min-height: 44px;
  border: 1px solid transparent; border-radius: 0;
  cursor: pointer; white-space: nowrap;
  transition: background-color .12s linear, border-color .12s linear, color .12s linear;
}
.btn--sm { font-size: 14px; padding: 13px 28px; }
.btn--md { padding: 15px 34px; }

/* حبري مملوء — الفعل الأساسي على الورقي */
.btn--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--ink:hover { background: var(--gold-on-paper); border-color: var(--gold-on-paper); color: var(--paper); }

/* خطّي — الفعل الثانوي على الورقي */
.btn--line { background: transparent; color: var(--ink); border-color: var(--rule-field); }
.btn--line:hover { border-color: var(--gold-on-paper); color: var(--gold-on-paper); }

/* على الخلفية الحبرية */
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--paper:hover { background: var(--gold-on-ink); border-color: var(--gold-on-ink); color: var(--ink); }

.btn--line-ink { background: transparent; color: var(--paper); border-color: var(--rule-ink-soft); }
.btn--line-ink:hover { border-color: var(--gold-on-ink); color: var(--gold-on-ink); }

.btn[disabled] { opacity: .38; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* الذهبي لا يُملأ أبداً. لا تدرّج، ولا ظل، ولا استدارة. */

/* ---------- 7 · الترويسة ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 54px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); margin-inline-start: auto; }
.nav a { font-size: 14px; color: var(--text-2); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }

.header-end { display: flex; align-items: center; gap: 24px; flex: 0 0 auto; }

.lang { display: flex; align-items: center; gap: 20px; }
.lang a, .lang span { font-family: var(--body); font-size: 15px; color: var(--text-muted); }
.lang a:hover { color: var(--ink); }
.lang .lat { letter-spacing: 0.14em; }
.lang [aria-current="true"] { color: var(--gold-on-paper); }

/* زر القائمة للجوال */
.menu-btn {
  display: none;
  background: none; border: 0; cursor: pointer; padding: 0;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  font-size: 14px; letter-spacing: 0.13em; color: var(--ink);
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: 24px var(--gutter) 48px;
  overflow-y: auto;
  flex-direction: column; gap: 8px;
  padding-top: calc(24px + env(safe-area-inset-top));
}
.mobile-menu:not([hidden]) { display: flex; } /* الإظهار يعيدها كتلة لا عمودًا مرنًا — تُضبط صراحة */
.mobile-menu-top img { height: 44px; width: auto; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 24px; }
.mobile-menu-close { background: none; border: 0; color: var(--paper); font-size: 14px; letter-spacing: 0.13em; cursor: pointer; min-height: 48px; padding-inline: 4px; }
.mobile-menu a {
  font-family: var(--display); font-size: 28px; line-height: 1.34;
  color: var(--paper); padding-block: 12px; min-height: 48px;
  border-bottom: 1px solid var(--rule-ink);
}
.mobile-menu a:hover { color: var(--gold-on-ink); }
.mobile-menu .mobile-lang { display: flex; gap: 26px; padding-top: 32px; }
.mobile-menu .mobile-lang a, .mobile-menu .mobile-lang span { font-family: var(--body); font-size: 15px; color: var(--text-2-ink); border: 0; padding: 0; min-height: 44px; display: inline-flex; align-items: center; }
.mobile-menu .mobile-lang [aria-current="true"] { color: var(--gold-on-ink); }

/* ---------- 8 · المقدمة ---------- */

.hero { background: var(--ink); color: var(--paper); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: stretch;
}
.hero-text { padding-block: 120px 104px; display: flex; flex-direction: column; gap: 32px; }
.hero-accred { display: flex; align-items: center; gap: 18px; }
.hero-accred span { font-size: 15px; letter-spacing: 0.13em; color: var(--gold-on-ink); }
.hero h1 .accent { color: var(--gold-on-ink); }
.hero .lede { color: var(--text-2-ink); max-width: 48ch; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 4px; }

.hero-portrait {
  align-self: center;
  border-inline-start: 1px solid var(--rule-ink);
  padding-inline-start: clamp(24px, 3vw, 56px);
}
/* الصورة تُقيَّد هي لا الحاوية — مصدرها 2008×3011.
   height:auto ضرورية: بدونها تفرض سمة height في الوسم ارتفاع ٣٠١١ بكسل
   ويُهمَل aspect-ratio تمامًا. */
.hero-portrait img {
  width: 100%; height: auto; aspect-ratio: 4 / 5;
  object-fit: cover; object-position: 50% 18%;
  display: block;
}

/* شريط البراهين */
.proof { border-top: 1px solid var(--rule-ink); }
.proof-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.proof-cell {
  padding: 40px 32px 44px;
  border-inline-start: 1px solid var(--rule-ink);
  display: flex; flex-direction: column; gap: 10px;
}
.proof-figure { font-family: var(--body); font-weight: 400; font-size: clamp(30px, 3vw, 42px); line-height: 1; color: var(--gold-on-ink); }
.proof-label  { font-size: 14px; line-height: 1.7; color: var(--text-2-ink); font-weight: 300; }

/* ---------- 9 · صفوف مجالات الممارسة / المدونة / الأبحاث ---------- */

.rows { display: flex; flex-direction: column; }
.rows-end { border-top: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns: minmax(0, 0.22fr) minmax(0, 1fr) auto;
  gap: var(--gap);
  align-items: baseline;
  padding-block: 42px;
  padding-inline: 0;
  border-top: 1px solid var(--rule);
  color: inherit;
  transition: background-color .12s linear;
}
.row:hover { background: var(--sand); color: inherit; }
.row-num { font-family: var(--body); font-weight: 400; font-size: clamp(34px, 4.4vw, 62px); color: var(--text-faint); line-height: 1; }
.row-kind { font-family: var(--body); font-weight: 400; font-size: 14px; color: var(--gold-on-paper); }
.row-main { display: flex; flex-direction: column; gap: 14px; }
.row-blurb { font-size: 16px; line-height: 1.9; color: var(--text-2); max-width: 58ch; font-weight: 300; }
.row-go { font-family: var(--body); font-weight: 400; font-size: 15px; letter-spacing: 0.13em; color: var(--gold-on-paper); white-space: nowrap; }
.row-go--muted { color: var(--text-muted); }

/* ---------- 10 · شبكات البطاقات ---------- */

/* الحدود على الخلايا لا على الحاوية — عدد فردي وإلا ظهرت خلية شبح */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cell-credential {
  padding: 22px 26px;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 6px;
}
.cell-credential .name { font-size: 15px; line-height: 1.7; color: var(--ink); font-weight: 400; white-space: pre-line; }
.section--sand .cell-credential { border-color: var(--rule-field); }

/* بطاقتا التواصل في الرئيسية */
.duo {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
}
.duo-cell { background: var(--paper); padding: 56px 48px; display: flex; flex-direction: column; gap: 24px; }
.duo-foot { margin-top: auto; padding-top: 32px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.tel { font-family: var(--body); font-weight: 400; font-size: 20px; letter-spacing: 0.06em; color: var(--text-2); }

/* ---------- 11 · قوائم البيانات (السيرة) ---------- */

.datalist { display: flex; flex-direction: column; }
.datalist-end { border-top: 1px solid var(--rule); }
.datarow {
  display: grid;
  grid-template-columns: minmax(0, 128px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: baseline;
  padding-block: 28px;
  border-top: 1px solid var(--rule);
}
.datarow--tight { padding-block: 22px; }
.datarow--wide { grid-template-columns: minmax(0, 190px) minmax(0, 1fr); padding-block: 24px; }
.datarow .when { font-family: var(--body); font-weight: 400; font-size: 18px; color: var(--gold-on-paper); }
.datarow--wide .when { font-size: 15px; }
.datarow .what { display: flex; flex-direction: column; gap: 8px; }
.datarow .role { font-family: var(--display); font-weight: 400; font-size: clamp(21px, 1.9vw, 26px); color: var(--ink); }
.datarow .detail { font-size: 16px; line-height: 1.85; color: var(--text-2); font-weight: 300; max-width: 58ch; }
.datarow .title-line { font-size: 17px; color: var(--ink); font-weight: 400; }

/* الشهادات: الاسم ثم الجهة المانحة */
.certrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: baseline;
  padding-block: 20px;
  border-bottom: 1px solid var(--rule);
}
.certrow .name   { font-size: 16px; line-height: 1.7; color: var(--ink); font-weight: 400; }
.certrow .issuer { font-size: 15px; line-height: 1.7; color: var(--text-2); font-weight: 300; }
.certlist { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }

.about-block { display: flex; flex-direction: column; }
.about-block > .eyebrow { padding-bottom: 18px; }

/* ---------- 12 · صفحة التخصص ---------- */

.area-head { padding-block: 72px 64px; border-bottom: 1px solid var(--rule); }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.crumbs a { color: var(--text-muted); }
.crumbs .sep { color: var(--text-faint); }
.crumbs .here { color: var(--ink); }

.area-body { padding-block: 72px var(--section-pad); }

.subnav { display: flex; flex-direction: column; position: sticky; top: calc(var(--header-h) + 24px); }
.subnav a {
  border-top: 1px solid var(--rule);
  padding-block: 18px;
  font-size: 15px;
  color: var(--text-2);
  min-height: 44px;
  display: flex; align-items: center;
}
.subnav a:hover { color: var(--gold-on-paper); }
.subnav a[aria-current="true"] { color: var(--gold-on-paper); }
.subnav-end { border-top: 1px solid var(--rule); }

.points { display: flex; flex-direction: column; padding-top: 12px; }
.point {
  display: grid; grid-template-columns: minmax(0, 72px) minmax(0, 1fr);
  gap: 24px; align-items: baseline;
  padding-block: 24px; border-top: 1px solid var(--rule);
}
.point .n { font-family: var(--body); font-weight: 400; font-size: 24px; color: var(--text-faint); }
.point .t { font-size: 17px; color: var(--ink); font-weight: 400; }

.note { border-top: 1px solid var(--rule); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; max-width: 58ch; }

/* ---------- 13 · الدورات ---------- */

.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.course {
  padding-block: 44px; padding-inline-end: 40px;
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 20px;
}
.course p { max-width: 46ch; }
.course-foot { margin-top: auto; padding-top: 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.course-mode { font-size: 14px; color: var(--text-muted); }

/* ---------- 14 · الأسئلة الشائعة ---------- */

.faq { display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--rule); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer;
  padding: 26px 0; font-family: inherit; text-align: start;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: baseline;
  color: var(--ink);
}
.faq-q .q { font-family: var(--display); font-weight: 400; font-size: clamp(21px, 1.9vw, 26px); line-height: 1.5; }
.faq-q .sign { font-family: var(--body); font-weight: 400; font-size: 20px; color: var(--gold-on-paper); }
.faq-a { font-size: 17px; line-height: 1.9; color: var(--text-2); max-width: 62ch; padding-bottom: 32px; font-weight: 300; }
.faq-a[hidden] { display: none; }

/* ---------- 15 · النموذج ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.2fr) minmax(0, 1fr) minmax(250px, 0.5fr);
  gap: clamp(28px, 3.5vw, 96px);
  align-items: start;
}
/* الحد الأدنى 250px ليس تجميلاً: عنوان البريد يبلغ 226px ويتكسر دونه */

.form { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 36px); max-width: 620px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--text-muted); }
.field label .lat { letter-spacing: 0.12em; }

.field input, .field select, .field textarea {
  width: 100%;
  font-size: 17px; line-height: 1.85; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rule-field);
  border-radius: 0;
  padding: 10px 0;
  min-height: 44px;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--gold-on-paper);
}
.field select { cursor: pointer; }

.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }

/* فخّ السبام: حقل لا يراه البشر ويملؤه الروبوت — خارج الشاشة لا display:none حتى لا تتجاهله الروبوتات */
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.consent { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; padding-block: 8px; }
.consent input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 5px; accent-color: var(--gold-on-paper); cursor: pointer; }
.consent span { font-size: 16px; line-height: 1.85; color: var(--text-2); font-weight: 300; }

.form-status { border-top: 1px solid var(--success); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.form-status[hidden] { display: none; }
.form-status .eyebrow { color: var(--success); }
.form-status--error { border-top-color: var(--gold-on-paper); }
.form-status--error .eyebrow { color: var(--gold-on-paper); }

.contact-aside { display: flex; flex-direction: column; gap: 40px; padding-top: 12px; }
.contact-card { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--rule); padding-top: 24px; }
.contact-card .big { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--ink); }
.contact-card .tel-lg { font-family: var(--body); font-weight: 400; font-size: 22px; letter-spacing: 0.04em; color: var(--ink); white-space: nowrap; }
.contact-card .mail { font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.contact-card .go { font-size: 15px; color: var(--gold-on-paper); padding-top: 4px; }

/* ---------- 16 · التذييل ---------- */

.site-footer { background: var(--ink); color: var(--paper); padding-block: 96px 40px; margin-top: auto; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 72px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); }
.footer-brand { display: flex; flex-direction: column; gap: 28px; }
.footer-brand img, .footer-logo { height: 88px; width: auto; align-self: flex-start; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-2-ink); font-weight: 300; }
.footer-contact a { color: var(--text-2-ink); }
.footer-contact a:hover { color: var(--paper); }
.footer-contact .tel { font-family: var(--body); font-weight: 400; font-size: 20px; letter-spacing: 0.04em; color: var(--text-2-ink); }

.footer-col { display: flex; flex-direction: column; gap: 18px; }
.footer-col .head { font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: 0.13em; color: var(--gold-on-ink); }
.footer-col a { font-size: 15px; color: var(--text-2-ink); font-weight: 300; }
.footer-col a:hover { color: var(--paper); }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  padding-top: 36px; border-top: 1px solid var(--rule-ink);
}
.footer-bottom .lang a, .footer-bottom .lang span { font-size: 14px; color: var(--text-2-ink); }
.footer-bottom .lang a:hover { color: var(--gold-on-ink); }
.footer-bottom .lang [aria-current="true"] { color: var(--gold-on-ink); }
.footer-bottom .lang .lat { letter-spacing: 0.13em; }
.footer-meta { font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: 0.14em; color: var(--text-2-ink); }
.social { display: flex; gap: 32px; }
.social a {
  font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: 0.13em;
  color: var(--text-2-ink); min-height: 44px; display: inline-flex; align-items: center;
}
.social a:hover { color: var(--gold-on-ink); }

/* ---------- 17 · الصفحة الصينية ---------- */

.zh-areas { display: flex; flex-direction: column; }
.zh-area {
  display: grid; grid-template-columns: minmax(0, 0.14fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px); align-items: baseline;
  padding-block: 26px; border-top: 1px solid var(--rule);
}
.zh-area .n { font-family: var(--body); font-weight: 400; font-size: 22px; color: var(--text-faint); }
.zh-area .t { font-size: 19px; color: var(--ink); }

/* الحدود على الخلايا لا الحاوية — خمس خلايا في ثلاثة أعمدة وإلا ظهرت خلية شبح (عيب ٧) */
.zh-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--rule); border-inline-start: 1px solid var(--rule); }
.zh-cell { background: var(--paper); padding: 32px 30px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--rule); border-inline-end: 1px solid var(--rule); }
/* رمز الاستجابة داخل خليّته لا بجوارها — عدد الأعمدة يتغيّر بعرض الشاشة */
.zh-cell img {
  width: 148px; height: auto; align-self: flex-start; margin-top: 4px;
  background: #FFFFFF; border: 1px solid var(--rule); padding: 10px; /* أبيض ناصع عمدًا: خلفية رمز الاستجابة لا الورقي */
}

/* ---------- 17ب · صفحة المقال (تولّدها وحدة النشر العام) ----------
   تخطيط قراءة بالمفردات نفسها: خط شعري، عنوان صغير، عرض سطر 62ch. */

.article-head { padding-block: 88px 56px; border-bottom: 1px solid var(--rule); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; font-size: 14px; color: var(--text-muted); }
.article-meta .cat { color: var(--gold-on-paper); }
.article-meta time { font-family: var(--body); }

.article-body { padding-block: 64px var(--section-pad); }
.prose { max-width: 62ch; font-size: 17px; line-height: 1.9; color: var(--text-2); font-weight: 300; }
.prose > * + * { margin-top: 1.2em; }
.prose p { margin: 0; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--display); font-weight: 400; color: var(--ink); line-height: 1.38;
  margin-top: 2.2em; margin-bottom: 0;
}
.prose h2 { font-size: clamp(24px, 2.4vw, 30px); }
.prose h3 { font-size: clamp(20px, 2vw, 24px); }
.prose h4 { font-size: 18px; font-family: var(--body); font-weight: 400; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  margin: 0; padding-inline-start: 24px; border-inline-start: 1px solid var(--gold-on-paper);
  font-family: var(--display); font-size: clamp(19px, 1.8vw, 22px); line-height: 1.8; color: var(--ink);
}
.prose img { display: block; max-width: 100%; height: auto; }
.prose figure { margin: 0; }
.prose figcaption { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.prose a { color: var(--gold-on-paper); border-bottom: 1px solid var(--rule-field); }
.prose a:hover { border-bottom-color: var(--gold-on-paper); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 400; color: var(--text-muted); font-size: 14px; }
.prose b, .prose strong { font-weight: 400; color: var(--ink); } /* لا وزن عريض مرخّص — التوكيد باللون */
.prose em, .prose i { font-style: normal; color: var(--ink); }

.article-cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 48px; }

.article-foot { max-width: 62ch; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 20px; }
.share { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.share a { font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: 0.13em; color: var(--gold-on-paper); min-height: 44px; display: inline-flex; align-items: center; }
.share a:hover { color: var(--ink); }

.empty { border-top: 1px solid var(--rule); padding-block: 48px; }

/* ---------- 18 · الجوال ---------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-portrait { border-inline-start: 0; padding-inline-start: 0; max-width: 320px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; --section-pad: 56px; --gap: 28px; }

  .nav, .header-end .lang { display: none; }
  .menu-btn { display: inline-flex; margin-inline-start: auto; }
  .header-end { gap: 12px; }
  .header-end .btn { display: none; }

  .split { grid-template-columns: minmax(0, 1fr); }
  .aside--sticky, .subnav { position: static; }

  .hero-text { padding-block: 48px 40px; }
  .hero-portrait { max-width: 220px; }

  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-cell { padding: 26px 20px 30px; }
  .proof-cell:nth-child(2n+1) { border-inline-start: 0; }
  .proof-cell:nth-child(n+3) { border-top: 1px solid var(--rule-ink); }

  .row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 30px; }
  .row-num { font-size: 34px; }
  .row-go { justify-self: start; }

  .duo, .grid-2, .course-grid, .field-pair { grid-template-columns: minmax(0, 1fr); }
  .duo-cell { padding: 36px 26px; }
  .course { padding-inline-end: 0; }

  .datarow, .datarow--wide { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .certrow { grid-template-columns: minmax(0, 1fr); gap: 4px; }

  .subnav { flex-direction: row; flex-wrap: wrap; gap: 0 24px; }
  .subnav a { border-top: 0; border-bottom: 1px solid var(--rule); padding-block: 12px; }
  .subnav-end { display: none; }

  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .site-footer { padding-block: 56px 32px; }
  .site-footer .wrap { gap: 44px; }
  .footer-bottom { gap: 20px; }

  .btn, .row-go, .subnav a, .faq-q { min-height: 48px; }
  .btn { padding-block: 15px; }
}

@media (max-width: 460px) {
  .hero-actions .btn { width: 100%; }
  .social { gap: 20px; }
}

/* ---------- 19 · الحركة والطباعة الورقية ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .mobile-menu, .site-footer, .hero-actions, .btn { display: none; }
  body { color: #000; background: #fff; }
  .section { padding-block: 24px; }
}
