/* =========================================================
   NINEVEH RECORD — An Open Archive from Mosul
   Stylesheet v1.0 — Al-Hadba University, Mosul
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Reem+Kufi:wght@400..700&display=swap');

/* ---------- Tokens ---------- */
:root {
  --ink:        #1a1410;
  --ink-soft:   #3a2e25;
  --ink-fade:   #6b5a4b;
  --paper:      #faf6ef;
  --paper-2:    #f1e9d8;
  --paper-3:    #e7dcc6;
  --rule:       #c9b896;

  --rust:       #9a3318;     /* Mosul brick / Old City terracotta  */
  --rust-dark:  #6f2310;
  --ochre:      #b8862f;     /* sandstone / Hadba gold              */
  --tigris:     #2d5a6b;     /* Tigris deep teal                    */
  --tigris-dk:  #1f3f4b;

  --shadow-1: 0 1px 0 rgba(26,20,16,.04), 0 2px 8px rgba(26,20,16,.06);
  --shadow-2: 0 8px 30px rgba(26,20,16,.10);

  --serif:      'Fraunces', 'EB Garamond', Georgia, serif;
  --serif-2:    'EB Garamond', Georgia, serif;
  --arabic:     'Amiri', 'Reem Kufi', 'Times New Roman', serif;
  --arabic-disp:'Reem Kufi', 'Amiri', serif;

  --maxw: 1240px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif-2);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 1200px 600px at 80% -10%, rgba(184,134,47,.08), transparent 60%),
    radial-gradient(ellipse 900px 500px at -10% 30%, rgba(45,90,107,.06), transparent 60%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--rust-dark); text-decoration: none; }
a:hover { color: var(--rust); text-decoration: underline; text-underline-offset: 3px; }

/* RTL support */
html[dir="rtl"] body { font-family: var(--arabic); font-size: 18px; }
html[dir="rtl"] .display, html[dir="rtl"] h1, html[dir="rtl"] h2,
html[dir="rtl"] h3, html[dir="rtl"] .masthead-title { font-family: var(--arabic-disp); }

/* Latin-only typographic flourishes don't apply to Arabic — strip uppercase + letter-spacing */
html[dir="rtl"] .hero-eyebrow,
html[dir="rtl"] .section-kicker,
html[dir="rtl"] .article-kicker,
html[dir="rtl"] .article-byline,
html[dir="rtl"] .stat-label,
html[dir="rtl"] .foot h4,
html[dir="rtl"] .mainnav a,
html[dir="rtl"] .topic-num,
html[dir="rtl"] .masthead-kicker,
html[dir="rtl"] .topbar,
html[dir="rtl"] .hero-cta,
html[dir="rtl"] .contribute .btn {
  letter-spacing: 0;
  text-transform: none;
}

html[dir="rtl"] .hero-cta-secondary { margin-left: 0; margin-right: 14px; }
html[dir="rtl"] .topic-arrow::before { content: ""; }
html[dir="rtl"] .article-toc a { border-left: 0; border-right: 1px solid var(--rule); padding-left: 0; padding-right: 10px; }
html[dir="rtl"] .article-toc a:hover { border-color: var(--rust); }
html[dir="rtl"] .article figcaption { padding-left: 0; padding-right: 14px; border-left: 0; border-right: 2px solid var(--ochre); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .04em;
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.topbar a { color: var(--paper-2); }
.topbar a:hover { color: var(--ochre); text-decoration: none; }
.topbar-left { display: flex; gap: 18px; align-items: center; }
.topbar-right { display: flex; gap: 14px; align-items: center; }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--ink-fade);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button,
.lang-toggle a {
  background: transparent;
  border: 0;
  color: var(--paper-2);
  padding: 4px 10px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .03em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.lang-toggle button.active,
.lang-toggle a.active { background: var(--ochre); color: var(--ink); }
.lang-toggle a:hover { color: var(--ochre); text-decoration: none; }
.lang-toggle a.active:hover { color: var(--ink); }

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 2px solid var(--ink);
  padding: 28px 28px 18px;
}
.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 24px;
}
.masthead-meta {
  font-family: var(--serif);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-fade);
  line-height: 1.6;
}
.masthead-meta.right { text-align: right; }
.masthead-center { text-align: center; }
.masthead-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--rust-dark);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.masthead-title {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144;
  font-size: clamp(48px, 7vw, 96px);
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
}
.masthead-title .amp {
  color: var(--rust);
  font-style: italic;
  font-weight: 400;
}
.masthead-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--ink-soft);
  margin-top: 8px;
  letter-spacing: .02em;
}
.masthead-rule {
  max-width: var(--maxw);
  margin: 14px auto 0;
  height: 6px;
  background:
    linear-gradient(var(--ink), var(--ink)) top/100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom/100% 2px no-repeat;
}

/* ---------- Primary navigation ---------- */
.mainnav {
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.mainnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.mainnav a {
  display: inline-block;
  padding: 16px 18px;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.mainnav a:hover {
  color: var(--rust);
  border-bottom-color: var(--rust);
  text-decoration: none;
}
.mainnav a.active {
  color: var(--rust);
  border-bottom-color: var(--rust);
}
.mainnav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-fade);
}
.mainnav-search input {
  border: 0;
  border-bottom: 1px solid var(--ink-fade);
  background: transparent;
  padding: 6px 4px;
  font-family: var(--serif-2);
  font-size: 14px;
  color: var(--ink);
  width: 160px;
}
.mainnav-search input:focus { outline: none; border-color: var(--rust); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background:
    linear-gradient(180deg, transparent 0%, rgba(231,220,198,.6) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(184,134,47,.18), transparent 55%),
    var(--paper);
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 28px 80px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--rust);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0 0 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--rust-dark);
  font-weight: 500;
}
.hero-lede {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 56ch;
}
.hero-lede::first-letter {
  font-family: var(--serif);
  font-size: 3.4em;
  font-weight: 600;
  line-height: .85;
  float: left;
  margin: 6px 10px 0 0;
  color: var(--rust);
}
html[dir="rtl"] .hero-lede::first-letter { float: right; margin: 6px 0 0 10px; }
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 0;
  cursor: pointer;
  transition: background .2s;
}
.hero-cta:hover { background: var(--rust); text-decoration: none; color: var(--paper); }
.hero-cta-secondary {
  margin-left: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Hero illustration (SVG of Al-Hadba minaret + Tigris) */
.hero-art {
  position: relative;
  aspect-ratio: 5 / 6;
  background: linear-gradient(180deg, #d9c89a 0%, #c4a772 45%, #8b6a3a 100%);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  width: 85%;
  margin: 0 auto;
}
.hero-art svg,
.hero-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-art-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  background: linear-gradient(transparent, rgba(26,20,16,.85));
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: .04em;
}

/* ---------- Section primitives ---------- */
.section { padding: 80px 28px; border-bottom: 1px solid var(--rule); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}
.section-kicker {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 8px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0;
}
.section-title em { font-style: italic; color: var(--rust-dark); }
.section-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-fade);
  letter-spacing: .04em;
}

/* ---------- Topics grid ---------- */
.topics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  align-items: stretch;
}
.topic {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 30px;
  min-height: 232px;
  height: 100%;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  background: linear-gradient(158deg, #fffdf9 0%, var(--paper) 48%, var(--paper-2) 100%);
  border: 1.7px solid var(--ink);
  border-radius: 9px;
  box-shadow:
    7px 8px 0 0 var(--rust),
    7px 8px 0 1.7px var(--ink),
    0 9px 22px rgba(26,20,16,.10);
  transition:
    transform .32s cubic-bezier(.34,1.42,.5,1),
    box-shadow .32s ease,
    background .25s ease;
  will-change: transform;
}
/* lit top edge of the 3D block */
.topic::before {
  content: "";
  position: absolute;
  left: 7px; right: 7px; top: 6px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.92), transparent);
  transition: opacity .25s ease;
}
.topic:hover {
  transform: translateY(-7px);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  box-shadow:
    12px 15px 0 0 var(--rust),
    12px 15px 0 1.7px var(--ink),
    0 22px 42px rgba(26,20,16,.30);
  animation: topicShake .56s cubic-bezier(.36,.07,.19,.97);
}
.topic:hover::before { opacity: 0; }
@keyframes topicShake {
  0%   { transform: translateY(-7px) rotate(0deg)    skewX(0); }
  13%  { transform: translateY(-7px) rotate(-2.6deg) skewX(1.5deg); }
  28%  { transform: translateY(-7px) rotate(2.1deg)  skewX(-1.2deg); }
  44%  { transform: translateY(-7px) rotate(-1.6deg) skewX(.8deg); }
  60%  { transform: translateY(-7px) rotate(1.1deg)  skewX(-.5deg); }
  76%  { transform: translateY(-7px) rotate(-.6deg)  skewX(.25deg); }
  100% { transform: translateY(-7px) rotate(0deg)    skewX(0); }
}
.topic:hover .topic-num,
.topic:hover .topic-desc { color: var(--paper-3); }
.topic:hover .topic-icon { color: var(--ochre); }
@media (prefers-reduced-motion: reduce) {
  .topic { transition: box-shadow .25s ease, background .25s ease; }
  .topic:hover { transform: translateY(-3px); animation: none; }
}
/* closing "About this archive" panel — fills the 3 empty cells after tile 17 */
.topic-about {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 38px;
  min-height: 232px;
  border: 1.7px solid var(--ink);
  border-radius: 9px;
  background:
    linear-gradient(150deg, rgba(154,51,24,.05), rgba(45,90,107,.05)),
    linear-gradient(158deg, #fffdf9 0%, var(--paper) 55%, var(--paper-2) 100%);
  box-shadow:
    7px 8px 0 0 var(--tigris),
    7px 8px 0 1.7px var(--ink),
    0 9px 22px rgba(26,20,16,.10);
}
.topic-about .about-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--rust);
  margin: 0 0 10px;
}
.topic-about p {
  font-family: var(--serif-2);
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0;
  max-width: 64ch;
}
.topic-about a.about-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--tigris);
  text-decoration: none;
  border-bottom: 1.5px solid var(--ochre);
  padding-bottom: 1px;
  transition: color .2s ease;
}
.topic-about a.about-link:hover { color: var(--rust); }
@media (max-width: 1080px) {
  .topic-about { grid-column: span 3; }
}
@media (max-width: 720px) {
  .topic-about { grid-column: span 2; }
}
@media (max-width: 460px) {
  .topic-about { grid-column: span 1; }
}
.topic-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-fade);
  letter-spacing: .08em;
}
.topic-icon {
  width: 36px;
  height: 36px;
  margin: 14px 0 16px;
  color: var(--rust);
  transition: color .25s;
}
.topic-icon svg { width: 100%; height: 100%; stroke: currentColor; }
.topic-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.topic-desc {
  font-family: var(--serif-2);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
  flex-grow: 1;
  transition: color .25s;
}
.topic-arrow {
  position: absolute;
  bottom: 22px;
  right: 22px;
  font-family: var(--serif);
  font-size: 22px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .25s, transform .25s;
}
.topic:hover .topic-arrow { opacity: 1; transform: translateX(0); color: var(--ochre); }
html[dir="rtl"] .topic-arrow { right: auto; left: 22px; transform: scaleX(-1) translateX(-6px); }
html[dir="rtl"] .topic:hover .topic-arrow { transform: scaleX(-1) translateX(0); }

/* ---------- Districts ---------- */
.districts-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
}
.districts-list { list-style: none; padding: 0; margin: 0; }
.districts-list li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.districts-list li:first-child { border-top: 1px solid var(--rule); }
.districts-list .num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ochre);
  font-size: 16px;
}
.districts-list .name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.districts-list .name a { color: var(--ink); }
.districts-list .name a:hover { color: var(--rust); text-decoration: none; }
.districts-list .name small {
  display: block;
  font-family: var(--serif-2);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-fade);
  letter-spacing: 0;
  margin-top: 2px;
}
.districts-list .arabic {
  font-family: var(--arabic);
  font-size: 22px;
  color: var(--ink-soft);
  direction: rtl;
}

.districts-map {
  border: 1px solid var(--ink);
  background: linear-gradient(160deg, #ede2c9, #d6c39b);
  aspect-ratio: 4 / 5;
  position: relative;
  box-shadow: var(--shadow-2);
}
.districts-map svg { width: 100%; height: 100%; }
.districts-map-caption {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

/* ---------- Mission ---------- */
.mission {
  background: var(--ink);
  color: var(--paper-2);
}
.mission .section-title { color: var(--paper); }
.mission .section-kicker { color: var(--ochre); }
.mission .section-head { border-color: var(--paper-3); }
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}
.mission-col h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 12px;
  color: var(--paper);
}
.mission-col p {
  font-family: var(--serif-2);
  font-size: 16px;
  line-height: 1.65;
  color: var(--paper-3);
  margin: 0;
}
.mission-col .ix {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ochre);
  letter-spacing: .08em;
  display: block;
  margin-bottom: 10px;
}

/* ---------- Stats ---------- */
.stats {
  background: var(--paper-2);
  padding: 70px 28px 76px;
  border-bottom: 1px solid var(--rule);
}
.stats-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.82fr 0.82fr 1.54fr 0.82fr;
  gap: 28px;
}
html[lang="ar"] .stats-inner {
  grid-template-columns: 0.7fr 0.7fr 1.9fr 0.7fr;
}
.stat {
  position: relative;
  text-align: center;
  padding: 36px 22px 32px;
  background: linear-gradient(157deg, #fffdf9 0%, var(--paper) 46%, var(--paper-2) 100%);
  border: 1.7px solid var(--ink);
  border-radius: 9px;
  box-shadow:
    8px 9px 0 0 var(--rust),
    8px 9px 0 1.7px var(--ink),
    0 10px 26px rgba(26,20,16,.12);
  transition:
    transform .32s cubic-bezier(.34,1.45,.5,1),
    box-shadow .32s ease;
  will-change: transform;
}
/* thin light edge along the top — the lit face of a 3D block */
.stat::before {
  content: "";
  position: absolute;
  left: 7px; right: 7px; top: 6px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
}
.stat:hover {
  transform: translateY(-7px);
  box-shadow:
    13px 16px 0 0 var(--rust),
    13px 16px 0 1.7px var(--ink),
    0 24px 46px rgba(26,20,16,.26);
  animation: statShake .58s cubic-bezier(.36,.07,.19,.97);
}
@keyframes statShake {
  0%   { transform: translateY(-7px) rotate(0deg)    skewX(0); }
  12%  { transform: translateY(-7px) rotate(-2.8deg) skewX(1.6deg); }
  27%  { transform: translateY(-7px) rotate(2.3deg)  skewX(-1.3deg); }
  42%  { transform: translateY(-7px) rotate(-1.8deg) skewX(.9deg); }
  58%  { transform: translateY(-7px) rotate(1.3deg)  skewX(-.6deg); }
  74%  { transform: translateY(-7px) rotate(-.7deg)  skewX(.3deg); }
  100% { transform: translateY(-7px) rotate(0deg)    skewX(0); }
}
.stat-num {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1;
  color: var(--rust);
  margin: 0;
}
.stat-label {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-top: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .stat { transition: box-shadow .25s ease; }
  .stat:hover { transform: translateY(-3px); animation: none; }
}

/* ---------- Contribute / Call ---------- */
.contribute {
  background:
    linear-gradient(rgba(154,51,24,.95), rgba(111,35,16,.95)),
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255,255,255,.03) 18px 19px);
  color: var(--paper);
  padding: 80px 28px;
}
.contribute-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.contribute h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--paper);
}
.contribute h2 em { font-style: italic; color: var(--ochre); }
.contribute p {
  font-family: var(--serif-2);
  font-size: 18px;
  line-height: 1.6;
  color: var(--paper-3);
  margin: 0 auto 32px;
  max-width: 56ch;
}
.contribute .btn {
  display: inline-block;
  background: var(--paper);
  color: var(--rust-dark);
  padding: 14px 32px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  border: 0;
}
.contribute .btn:hover { background: var(--ochre); color: var(--ink); text-decoration: none; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--paper-3);
  padding: 56px 28px 28px;
}
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--ink-soft);
}
.foot h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 0 0 14px;
}
.foot a { color: var(--paper-3); display: block; padding: 4px 0; font-family: var(--serif-2); }
.foot a:hover { color: var(--ochre); text-decoration: none; }
.foot-brand .logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--paper);
  letter-spacing: -.01em;
  margin-bottom: 8px;
}
.foot-brand p {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 14px;
  color: var(--paper-3);
  margin: 0 0 18px;
  line-height: 1.5;
}
.foot-bottom {
  max-width: var(--maxw);
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-fade);
}
.foot-bottom a { color: var(--ink-fade); }
.foot-bottom a:hover { color: var(--ochre); }

/* ---------- Article (topic page) ---------- */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 28px 100px;
}
.article-kicker {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 14px;
}
.article-title {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 18px;
}
.article-deck {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 36px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
}
.article-byline {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 36px;
}
.article p { font-size: 18px; line-height: 1.75; margin: 0 0 22px; color: var(--ink); text-align: justify; hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; }
html[dir="rtl"] .article p { hyphens: none; -webkit-hyphens: none; -ms-hyphens: none; text-align: justify; unicode-bidi: isolate; }
.article > .article-byline + p::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 4.4em;
  line-height: .85;
  float: left;
  margin: 8px 12px 0 0;
  color: var(--rust);
}
/* Arabic: no drop cap (Arabic letters connect contextually; ::first-letter renders them disconnected). */
html[dir="rtl"] .article p::first-letter,
html[dir="rtl"] .article-deck::first-letter,
html[dir="rtl"] .hero-lede::first-letter,
html[dir="rtl"] .article > .article-byline + p::first-letter {
  font-family: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  float: none !important;
  margin: 0 !important;
  color: inherit !important;
}
.article h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.15;
  margin: 48px 0 16px;
  color: var(--ink);
}
.article h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 32px 0 10px;
  color: var(--rust-dark);
}
.article blockquote {
  border-left: 3px solid var(--rust);
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-soft);
}
html[dir="rtl"] .article blockquote {
  border-left: 0;
  border-right: 3px solid var(--rust);
  padding: 4px 24px 4px 0;
}
.article figure { margin: 36px 0; }
.article figure img { border: 1px solid var(--ink); }
.article figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-fade);
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid var(--ochre);
}
.article .map-fig { margin: 44px 0; }
.article .map-fig svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  box-shadow: var(--shadow-1);
}

.article-toc {
  position: sticky;
  top: 80px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-fade);
}
.article-toc h4 { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--rust); margin: 0 0 12px; }
.article-toc a { color: var(--ink-soft); display: block; padding: 5px 0; border-left: 1px solid var(--rule); padding-left: 10px; }
.article-toc a:hover { color: var(--rust); text-decoration: none; border-color: var(--rust); }

.article-with-toc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 28px 100px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 200px;
  gap: 40px;
}
.article-with-toc .article { padding: 0; max-width: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .topics { grid-template-columns: repeat(3, 1fr); }
  .stats-inner, html[lang="ar"] .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .mission-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-with-toc { grid-template-columns: minmax(0, 1fr); }
  .article-toc { position: static; margin-bottom: 24px; }
}
@media (max-width: 820px) {
  .masthead-inner { grid-template-columns: 1fr; gap: 6px; }
  .masthead-meta, .masthead-meta.right { text-align: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 40px 24px 56px; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .topics { grid-template-columns: repeat(2, 1fr); }
  .districts-wrap { grid-template-columns: 1fr; gap: 32px; }
  .foot { grid-template-columns: 1fr 1fr; gap: 28px; }
  .mainnav-search { display: none; }
}
@media (max-width: 540px) {
  .topics { grid-template-columns: 1fr; }
  .stats-inner, html[lang="ar"] .stats-inner { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .section { padding: 56px 24px; }
  .topbar-inner { padding: 8px 16px; flex-wrap: wrap; }
  .mainnav a { padding: 12px 12px; font-size: 12.5px; }
}

/* ---------- Page-load reveal ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) backwards; }
.reveal > *:nth-child(1){ animation-delay:.05s; }
.reveal > *:nth-child(2){ animation-delay:.18s; }
.reveal > *:nth-child(3){ animation-delay:.30s; }
.reveal > *:nth-child(4){ animation-delay:.42s; }

/* ---------- Print ---------- */
@media print {
  .topbar, .mainnav, .contribute, footer { display: none; }
  body { background: white; }
}
