/*
Theme Name: Intersection Observatory
Theme URI: https://map.intersection.uno
Author: Intersection Association
Description: Map-first theme for Intersection's observatory of rights and freedoms violations. Same identity as intersection.uno (purple #794AAF, navy #2D3883, Tajawal) in a data-focused layout. Pairs with the Intersection Observatory plugin.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: intersection-observatory
*/

/* ---------- Tokens (current identity) ---------- */
:root {
	--purple: #794AAF;
	--purple-dark: #5E3790;
	--purple-50: #F5F0FB;
	--purple-100: #EBE1F6;
	--pink: #FFBBF9;
	--pink-50: #FFF1FE;
	--navy: #2D3883;
	--ink: #211F40;
	--text: #2E2C47;
	--muted: #54595F;
	--line: #E4E1EC;
	--bg: #FFFFFF;
	--bg-soft: #F8F7FC;
	--accent: #B7ACC5;
	--red: #C62A44;
	--font: "Noto Kufi Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
	--radius: 14px;
	--radius-sm: 10px;
	--container: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--shadow: 0 1px 2px rgba(33, 31, 64, .05), 0 10px 30px -16px rgba(33, 31, 64, .22);
	--focus: 0 0 0 3px #fff, 0 0 0 5px var(--purple);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.8 var(--font); }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--purple); text-underline-offset: 3px; }
a:hover { color: var(--purple-dark); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 800; line-height: 1.35; text-wrap: balance; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(var(--container), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(40px, 6vw, 76px); }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2 { position: relative; padding-bottom: 10px; }
.section-head h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--purple); }
.section-head p { margin: 8px 0 0; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--navy); color: #fff; }
.skip-link:focus { top: 12px; color: #fff; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.hp { position: absolute; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 10px; border: 2px solid transparent; font: 700 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--purple); border-color: var(--purple-100); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple-dark); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--pink-50); color: var(--navy); }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--purple); color: #fff; font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--pink); }
.social { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.social .icon { width: 17px; height: 17px; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { flex: none; display: block; }
.brand img { display: block; width: auto; height: 58px; }
.main-nav { margin-inline-start: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--purple); background: var(--purple-50); }
.main-nav .sub-menu { position: absolute; top: 100%; inset-inline-start: 0; z-index: 50; min-width: 280px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { font-weight: 500; font-size: 15px; white-space: normal; }
.main-nav .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); margin-inline-start: 4px; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch a { display: grid; place-items: center; min-width: 36px; height: 30px; padding: 0 8px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 13px; text-decoration: none; text-transform: uppercase; }
.lang-switch a[aria-current="true"] { background: var(--purple); color: #fff; }
.header-cta { flex: none; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; margin-inline-start: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
@media (max-width: 1080px) {
	.menu-toggle { display: inline-flex; }
	.header-cta { display: none; }
	/* Off-canvas panel slides in from the reading-start edge (right in Arabic, left otherwise). */
	.main-nav { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60; display: flex; flex-direction: column; width: min(360px, 88vw); margin: 0; padding: 84px 18px 24px; background: #fff; box-shadow: 0 0 40px -10px rgba(33, 31, 64, .35); overflow-y: auto; transform: translateX(-110%); transition: transform .2s; }
	[dir="rtl"] .main-nav { transform: translateX(110%); }
	.main-nav.is-open, [dir="rtl"] .main-nav.is-open { transform: none; }
	.main-nav > ul { flex-direction: column; align-items: stretch; }
	.main-nav .sub-menu { position: static; min-width: 0; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 12px 0 0; }
	[dir="ltr"] .main-nav .sub-menu { padding: 0 0 0 12px; }
	.main-nav .menu-item-has-children > a::after { display: none; }
	.nav-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(33, 31, 64, .45); }
	.lang-switch { margin-top: 16px; align-self: flex-start; }
}
@media (max-width: 560px) { .topbar .contact-mail span { display: none; } .brand img { height: 46px; } .header-inner { min-height: 70px; } }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(33, 31, 64, .92) 10%, rgba(33, 31, 64, .35) 70%); }
.hero .container { position: relative; z-index: 1; padding-block: clamp(56px, 10vw, 120px) clamp(36px, 6vw, 64px); }
.hero h1 { color: #fff; max-width: 22em; font-size: clamp(28px, 4.2vw, 48px); }
.hero h1 a { color: inherit; text-decoration: none; }
.hero p { max-width: 46em; margin-top: 14px; color: rgba(255, 255, 255, .86); font-size: 18px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; }
.hero .btn-row { margin-top: 22px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--purple-50); color: var(--purple-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.badge-pink { background: var(--pink); color: var(--ink); }
a.badge:hover { background: var(--purple-100); }
.hero .date { color: rgba(255, 255, 255, .8); font-size: 14px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { aspect-ratio: 16 / 9; background: var(--purple-50); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.card h3 { font-size: 18px; line-height: 1.5; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--purple); }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.card .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; }
.card .meta .badge { position: relative; z-index: 1; }
.card-row { flex-direction: row; }
.card-row .card-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 150px; }
@media (max-width: 620px) { .card-row { flex-direction: column; } .card-row .card-media { aspect-ratio: 16/9; } }
.no-thumb { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--purple-50), var(--pink-50)); }
.no-thumb img { width: 46%; height: auto; object-fit: contain; opacity: .55; }

/* Featured layout on home */
.news-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.news-layout .news-list { display: grid; gap: 14px; }
.news-list .card-row .card-media { flex-basis: 34%; min-height: 110px; }
.news-list .card h3 { font-size: 16px; }
@media (max-width: 900px) { .news-layout { grid-template-columns: 1fr; } }

/* Programs */
.programs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1100px) { .programs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .programs { grid-template-columns: 1fr; } }
.program { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 170px; transition: border-color .15s, box-shadow .15s; }
.program:hover { border-color: var(--purple); box-shadow: var(--shadow); color: var(--ink); }
.program .ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--purple-50); color: var(--purple); }
.program .ic .icon { width: 26px; height: 26px; }
.program h3 { font-size: 17px; }
.program span.count { margin-top: auto; color: var(--muted); font-size: 14px; }

/* About band */
.about-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.about-band .lead { font-size: 18px; color: var(--text); }
.vm { display: grid; gap: 16px; }
.vm-item { padding: 22px; border-radius: var(--radius); background: #fff; border-inline-start: 5px solid var(--purple); box-shadow: var(--shadow); }
.vm-item:nth-child(2) { border-color: var(--pink); }
.vm-item h3 { margin-bottom: 6px; color: var(--purple); }
.vm-item p { margin: 0; font-size: 16px; }
@media (max-width: 900px) { .about-band { grid-template-columns: 1fr; } }

/* Freedom faces */
.faces-band { background: linear-gradient(135deg, var(--ink), var(--navy)); color: #fff; }
.faces-band h2, .faces-band h2::after { color: #fff; }
.faces-band .section-head h2::after { background: var(--pink); }
.faces-band .section-head p { color: rgba(255, 255, 255, .8); }
.face-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); color: var(--ink); transition: box-shadow .15s, transform .15s; }
.face-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.face-card .card-media { aspect-ratio: 1 / 1; }
.face-card .card-media img { object-position: center 20%; }
.face-card .card-body { gap: 6px; padding: 14px 16px 16px; }
.face-card h3 { font-size: 17px; }
.face-card h3 a { color: var(--ink); text-decoration: none; }
.face-card h3 a::after { content: ""; position: absolute; inset: 0; }
.face-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--purple-50); color: var(--purple-dark); }
.state-detained { background: #FDECEF; color: var(--red); }
.state-released { background: #E8F5EE; color: #1F7A4D; }
.state-dead { background: #EEEEF2; color: #3C3B4F; }
.faces-filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; margin-bottom: 22px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 860px) { .faces-filters { grid-template-columns: 1fr 1fr; } .faces-filters .f-search { grid-column: 1 / -1; } }
.faces-count { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; color: var(--ink); font-size: 15px; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font: 400 16px/1.5 var(--font); }
textarea.input { min-height: 150px; resize: vertical; }
.input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(121, 74, 175, .15); }
.form-card { padding: clamp(20px, 4vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.alert-ok { background: #E8F5EE; color: #1F5F3D; }
.alert-err { background: #FDECEF; color: #8E1B2E; }
.hint { color: var(--muted); font-size: 14px; font-weight: 400; }

/* ---------- Page header & article ---------- */
.page-head { padding-block: clamp(32px, 5vw, 56px) clamp(22px, 3vw, 32px); background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head p { max-width: 46em; margin: 10px 0 0; color: var(--muted); font-size: 17px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--purple); }
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
@media (max-width: 1000px) { .article-wrap { grid-template-columns: 1fr; } }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 14.5px; }
.article-cover { margin: 26px 0 0; border-radius: var(--radius); overflow: hidden; background: var(--purple-50); }
.article-cover img { display: block; width: 100%; }
.prose { font-size: 18px; line-height: 1.95; color: var(--text); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose img { border-radius: 10px; }
.prose figure { margin-inline: 0; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose blockquote { margin-inline: 0; padding: 14px 20px; border-inline-start: 4px solid var(--purple); background: var(--purple-50); border-radius: 0 10px 10px 0; }
[dir="rtl"] .prose blockquote { border-radius: 10px 0 0 10px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }
.prose a.btn { color: #fff; }
.prose .logos, .prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; align-items: center; }
.prose .logos figure, .prose .gallery figure { margin: 0; display: grid; place-items: center; padding: 14px; aspect-ratio: 3 / 2; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.prose .logos img { max-height: 90px; width: auto; object-fit: contain; border-radius: 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--purple); color: var(--purple); }
.sidebar { position: sticky; top: 110px; display: grid; gap: 18px; }
.side-box { padding: 20px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.side-box h2 { font-size: 17px; margin-bottom: 12px; }
.side-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-box li a { color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.5; }
.side-box li a:hover { color: var(--purple); }
.side-cta { background: var(--purple); color: #fff; border: 0; }
.side-cta h2, .side-cta p { color: #fff; }
.side-cta p { font-size: 15px; opacity: .9; }

/* Profile */
.profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; }
.profile-photo { border-radius: var(--radius); overflow: hidden; background: var(--purple-50); aspect-ratio: 3 / 4; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } .profile-photo { max-width: 280px; } }

/* Filters / chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 24px; padding: 0; }
.chip { display: inline-flex; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.chip:hover { border-color: var(--purple); color: var(--purple); }
.chip[aria-current="page"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.search-form { display: flex; gap: 8px; }
.search-form .input { flex: 1; }

/* Pagination */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 34px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.pagination .current { background: var(--purple); border-color: var(--purple); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--purple); color: var(--purple); }

/* CTA band */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding: clamp(22px, 4vw, 36px); border-radius: var(--radius); background: linear-gradient(120deg, var(--purple), var(--navy)); color: #fff; }
.cta-band h2 { color: #fff; font-size: clamp(20px, 2.4vw, 26px); }
.cta-band p { margin: 6px 0 0; color: rgba(255, 255, 255, .85); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 80px); background: var(--ink); color: rgba(255, 255, 255, .78); font-size: 15px; }
.site-footer .container { padding-block: 48px 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { display: inline-block; padding: 10px 14px; border-radius: 12px; background: #fff; }
.footer-logo img { display: block; height: 50px; width: auto; }
.site-footer h2 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.site-footer .social a { background: rgba(255, 255, 255, .08); }
.footer-contact li { display: flex; gap: 8px; align-items: center; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13.5px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: var(--radius); }
.ltr-num { direction: ltr; unicode-bidi: embed; }

/* ---------- Fixes ---------- */
[hidden] { display: none !important; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }
.programs { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .programs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .programs { grid-template-columns: 1fr; } }
@media (min-width: 1081px) { .main-nav { display: flex; align-items: center; gap: 12px; } }
.site-footer .social { display: flex; flex-wrap: wrap; margin-top: 14px; }
.brand img { width: auto; max-width: 220px; height: auto; max-height: 62px; }
@media (max-width: 560px) { .brand img { max-height: 48px; max-width: 170px; } }


/* =====================================================================
   Observatory layer
   ===================================================================== */
:root { --header-h: 72px; }
.obs-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--line); }
.obs-header .header-inner { min-height: var(--header-h); }
.obs-header .brand img { max-height: 50px; }
.obs-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.obs-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
@media (max-width: 1080px) { .obs-tag { display: none; } }

/* App shell: map + filters */
.obs-app { position: relative; }
.obs-stage { position: relative; display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - var(--header-h)); min-height: 560px; max-height: 900px; border-bottom: 1px solid var(--line); }
.obs-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: #fff; border-inline-end: 1px solid var(--line); overflow-y: auto; }
.obs-panel h1 { font-size: 22px; line-height: 1.4; }
.obs-panel .lead { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.obs-map-wrap { position: relative; background: #E9ECF2; }
#obs-map, .obs-gov-map { position: absolute; inset: 0; }
.obs-gov-map { display: grid; place-items: center; padding: 18px; background: var(--bg-soft); }
.obs-gov-map svg { width: auto; height: 100%; max-width: 100%; }
.obs-view-toggle { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 500; display: flex; padding: 3px; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.obs-view-toggle button { padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 700 14px var(--font); cursor: pointer; }
.obs-view-toggle button[aria-pressed="true"] { background: var(--purple); color: #fff; }
.obs-count-chip { position: absolute; bottom: 14px; inset-inline-start: 14px; z-index: 500; padding: 8px 14px; border-radius: 10px; background: rgba(33, 31, 64, .88); color: #fff; font-weight: 700; font-size: 14px; }
.obs-filters { display: grid; gap: 10px; }
.obs-filters .field { margin: 0; }
.obs-filters label { font-size: 13.5px; }
.obs-filters .input { min-height: 42px; padding: 8px 12px; font-size: 15px; }
.obs-years { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.obs-reset { align-self: flex-start; padding: 6px 0; border: 0; background: none; color: var(--purple); font: 700 14px var(--font); cursor: pointer; text-decoration: underline; }
.obs-panel .btn { width: 100%; }
.obs-filter-toggle { display: none; }
@media (max-width: 900px) {
	.obs-stage { grid-template-columns: 1fr; height: auto; max-height: none; }
	.obs-map-wrap { height: 62vh; min-height: 380px; order: -1; }
	.obs-panel { border-inline-end: 0; border-top: 1px solid var(--line); }
	.obs-filter-toggle { display: inline-flex; }
	.obs-filters[hidden-mobile="true"] { display: none; }
}

/* Leaflet theming */
.leaflet-container { font: 400 14px var(--font); background: #E9ECF2; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 0; width: 260px !important; }
.obs-pop { display: grid; gap: 6px; }
.obs-pop img { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 12px 12px 0 0; }
.obs-pop .b { padding: 10px 14px 14px; display: grid; gap: 6px; }
.obs-pop h3 { font-size: 15px; line-height: 1.5; }
.obs-pop h3 a { color: var(--ink); text-decoration: none; }
.obs-pop .m { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12.5px; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(121, 74, 175, .25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--purple) !important; color: #fff; font: 700 13px var(--font); }
.marker-cluster { background-clip: padding-box; border-radius: 20px; }
.marker-cluster div { width: 30px; height: 30px; margin-left: 5px; margin-top: 5px; text-align: center; border-radius: 15px; }
.marker-cluster span { line-height: 30px; }
.obs-pin { width: 16px !important; height: 16px !important; margin: -8px 0 0 -8px !important; border-radius: 50%; background: var(--purple); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }

/* Governorate shading */
.gov { stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; transition: fill .15s; }
.gov.lvl-0 { fill: #E4E1EC; }
.gov.lvl-1, .obs-legend .lvl-1 { fill: #DCCDEF; background: #DCCDEF; }
.gov.lvl-2, .obs-legend .lvl-2 { fill: #BC9EE0; background: #BC9EE0; }
.gov.lvl-3, .obs-legend .lvl-3 { fill: #9A70CC; background: #9A70CC; }
.gov.lvl-4, .obs-legend .lvl-4 { fill: #794AAF; background: #794AAF; }
.gov.has { cursor: pointer; }
.gov.has:hover, .gov.is-active { fill: var(--navy); }
.gov-n { font: 700 26px var(--font); fill: var(--ink); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(255, 255, 255, .9); stroke-width: 5px; pointer-events: none; }
.obs-legend { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.obs-legend i { display: inline-block; width: 22px; height: 10px; border-radius: 3px; }

/* KPIs */
.obs-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--ink); color: #fff; }
.obs-kpi { padding: 22px clamp(14px, 3vw, 28px); border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.obs-kpi:first-child { border: 0; }
.obs-kpi b { display: block; font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.1; color: #fff; }
.obs-kpi span { color: rgba(255, 255, 255, .78); font-size: 14px; }
.obs-kpi.accent b { color: var(--pink); }
@media (max-width: 760px) { .obs-kpis { grid-template-columns: repeat(2, 1fr); } .obs-kpi:nth-child(3) { border: 0; } .obs-kpi { border-top: 1px solid rgba(255, 255, 255, .12); } }

/* Charts */
.obs-charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
@media (max-width: 900px) { .obs-charts { grid-template-columns: 1fr; } }
.chart-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.chart-card h2 { font-size: 18px; margin-bottom: 14px; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 36px; gap: 10px; align-items: center; font-size: 14px; }
.bar .lbl { color: var(--ink); line-height: 1.4; }
.bar .trk { height: 12px; border-radius: 6px; background: var(--purple-50); overflow: hidden; }
.bar .fil { display: block; height: 100%; border-radius: 6px; background: var(--purple); }
.bar b { text-align: end; color: var(--ink); }
button.bar { width: 100%; padding: 4px; border: 0; border-radius: 8px; background: none; font: inherit; cursor: pointer; text-align: start; }
button.bar:hover { background: var(--bg-soft); }
.timeline svg { display: block; width: 100%; height: auto; }
.timeline .col { fill: var(--purple); }
.timeline .col:hover { fill: var(--navy); }
.timeline text { font: 500 11px var(--font); fill: var(--muted); }

/* List */
.obs-list-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.obs-list-head select { width: auto; }
.v-card .meta .badge { position: relative; z-index: 1; }
.v-card .loc { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; }
.obs-more { display: flex; justify-content: center; margin-top: 26px; }
.noscript-note { padding: 16px; background: var(--pink-50); border-radius: 10px; }

/* Single violation */
.v-facts { display: grid; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.v-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 15px; }
.v-facts div:first-child { border-top: 0; }
.v-facts dt { color: var(--muted); font-weight: 600; }
.v-facts dd { margin: 0; color: var(--ink); }
.v-mini-map { height: 220px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

/* Basemap background while vector tiles load (same as the land colour in basemap.js). */
.leaflet-container { background: #F7F4FB; }
.map-label { background: none; border: 0; }
.map-label span { display: block; transform: translate(-50%, -50%); white-space: nowrap; font: 700 12.5px/1 var(--font); color: var(--purple-dark); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff; pointer-events: none; }
.map-label.is-context span { font-size: 15px; font-weight: 800; letter-spacing: .02em; color: rgba(46, 44, 71, .45); }
.z-low .map-label.is-small span { display: none; }
.z-low .map-label span { font-size: 11px; }
.z-high .map-label span { font-size: 14px; }
.leaflet-control-attribution { font: 400 11px var(--font); }
/* At country scale (small screens) governorate names would overlap: show them from zoom 7 up. */
.z-min .map-label:not(.is-context) span { display: none; }

/* =====================================================================
   v2 — Observatory identity: Noto Kufi Arabic, dark "control room" chrome,
   flat data cards. Purple stays the accent; navy/ink carry the structure.
   ===================================================================== */
:root {
	--font: "Noto Kufi Arabic", "Segoe UI", system-ui, sans-serif;
	--night: #15142A;
	--night-2: #1F1D3D;
	--night-line: rgba(255, 255, 255, .10);
	--signal: #FFBBF9;
	--radius: 10px;
	--radius-sm: 8px;
}
body { font: 400 16px/1.95 var(--font); background: #FAFAFC; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: 0; line-height: 1.55; }
h1 { font-size: clamp(24px, 3.2vw, 38px); }
h2 { font-size: clamp(19px, 2.2vw, 25px); }
.num, .kpi-v, .obs-kpi b, .bar b, .rank b, time { font-variant-numeric: tabular-nums; }
.btn { border-radius: 8px; font-weight: 600; font-size: 15px; }
.badge { border-radius: 6px; font-weight: 600; }

/* Header: dark bar */
.obs-header { background: var(--night); border-bottom: 1px solid var(--night-line); }
.obs-header .brand { padding: 6px 10px; background: #fff; border-radius: 10px; }
.obs-header .brand img { max-height: 40px; }
.obs-header .main-nav a { color: rgba(255, 255, 255, .78); font-weight: 500; font-size: 15px; }
.obs-header .main-nav a:hover, .obs-header .main-nav .current-menu-item > a, .obs-header .main-nav .current-menu-ancestor > a { color: #fff; background: rgba(255, 255, 255, .08); }
.obs-header .main-nav .current-menu-item > a { box-shadow: inset 0 -2px 0 var(--signal); border-radius: 6px 6px 0 0; }
.obs-header .lang-switch { border-color: var(--night-line); }
.obs-header .lang-switch a { color: rgba(255, 255, 255, .7); }
.obs-header .obs-tag { background: transparent; border: 1px solid var(--night-line); color: rgba(255, 255, 255, .85); font-weight: 500; }
.obs-header .menu-toggle { background: transparent; border-color: var(--night-line); color: #fff; }
@media (max-width: 1080px) { .obs-header .main-nav { background: var(--night); } }

/* Page heads: dark band shared by every page */
.page-head { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); border-bottom: 0; color: #fff; }
.page-head h1 { color: #fff; }
.page-head p, .page-head .breadcrumb, .page-head .breadcrumb a { color: rgba(255, 255, 255, .72); }
.page-head .breadcrumb a:hover { color: var(--signal); }
.page-head .meta { color: rgba(255, 255, 255, .75); }
.page-head .badge { background: rgba(255, 187, 249, .14); color: var(--signal); }
.page-head .eyebrow { display: inline-block; margin-bottom: 8px; color: var(--signal); font-size: 13px; font-weight: 600; letter-spacing: .02em; }

/* Flat data cards */
.card, .chart-card, .side-box, .form-card, .program { border-radius: var(--radius); box-shadow: none; border-color: #E6E4EE; }
.card:hover { box-shadow: 0 6px 18px -12px rgba(21, 20, 42, .35); transform: none; }
.section-head h2::after { width: 32px; height: 3px; background: var(--purple); }
.panel { padding: clamp(18px, 3vw, 26px); background: #fff; border: 1px solid #E6E4EE; border-radius: var(--radius); }
.panel h2 { font-size: 18px; margin-bottom: 14px; }
.panel .more { margin-top: 14px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* Home: hero with headline numbers */
.hq { background: radial-gradient(900px 400px at 85% 0%, rgba(121, 74, 175, .35), transparent 60%), linear-gradient(180deg, var(--night), var(--night-2)); color: #fff; }
.hq .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 7vw, 84px); }
.hq h1 { color: #fff; font-size: clamp(26px, 3.6vw, 44px); }
.hq p { color: rgba(255, 255, 255, .78); font-size: 17px; max-width: 34em; margin-top: 12px; }
.hq .btn-row { margin-top: 24px; }
.hq .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--night-line); border: 1px solid var(--night-line); border-radius: 12px; overflow: hidden; }
.kpi { padding: 22px 22px 18px; background: rgba(255, 255, 255, .03); }
.kpi-v { display: block; font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; line-height: 1.1; color: #fff; }
.kpi:first-child .kpi-v { color: var(--signal); }
.kpi-l { color: rgba(255, 255, 255, .72); font-size: 14px; }
.kpi-note { grid-column: 1 / -1; padding: 10px 22px; background: rgba(255, 255, 255, .03); color: rgba(255, 255, 255, .6); font-size: 13px; }
@media (max-width: 900px) { .hq .container { grid-template-columns: 1fr; } }

/* Home: map + ranking */
.split-2 { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; }
@media (max-width: 860px) { .split-2 { grid-template-columns: 1fr; } }
.gov-svg { display: block; width: 100%; max-height: 620px; }
.gov-svg a .gov { cursor: pointer; }
.gov-svg a:hover .gov, .gov-svg a:focus .gov { fill: var(--navy); }
.gov-svg a:focus { outline: none; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank li a { display: grid; grid-template-columns: 26px minmax(90px, 34%) 1fr 40px; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px; }
.rank li a:hover { background: var(--purple-50); }
.rank .pos { color: var(--muted); font-size: 13px; text-align: center; }
.rank .trk { height: 10px; border-radius: 5px; background: var(--purple-50); overflow: hidden; }
.rank .fil { display: block; height: 100%; background: var(--purple); border-radius: 5px; }
.rank b { text-align: end; }

/* Home: latest as a timeline */
.tl { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 0; }
.tl::before { content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 7px; width: 2px; background: #E6E4EE; }
.tl li { position: relative; padding-block: 12px; padding-inline-start: 34px; }
.tl li::before { content: ""; position: absolute; top: 20px; inset-inline-start: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--purple); }
.tl time { display: block; color: var(--muted); font-size: 13px; }
.tl a { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.7; }
.tl a:hover { color: var(--purple); }
.tl .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Statistics dashboard */
.filterbar { position: sticky; top: var(--header-h); z-index: 20; background: #fff; border-bottom: 1px solid #E6E4EE; }
.filterbar form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; padding-block: 12px; }
.filterbar .field { margin: 0; min-width: 180px; }
.filterbar .input { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-row .kpi-box { padding: 18px 20px; background: #fff; border: 1px solid #E6E4EE; border-radius: var(--radius); }
.kpi-row .kpi-box b { display: block; font-size: 34px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.kpi-row .kpi-box span { color: var(--muted); font-size: 14px; }
.kpi-row .kpi-box.hl { background: var(--night); border-color: var(--night); }
.kpi-row .kpi-box.hl b { color: var(--signal); }
.kpi-row .kpi-box.hl span { color: rgba(255, 255, 255, .7); }
@media (max-width: 860px) { .kpi-row { grid-template-columns: 1fr 1fr; } }
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash .wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } }
.cols svg { display: block; width: 100%; height: auto; }
.cols .c { fill: var(--purple); }
.cols .c:hover { fill: var(--navy); }
.cols text { font: 500 11px var(--font); fill: var(--muted); }
.ytable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ytable th, .ytable td { padding: 9px 10px; border-bottom: 1px solid #EEEDF3; text-align: start; }
.ytable th { color: var(--muted); font-weight: 600; font-size: 13px; }
.ytable td.n { font-weight: 700; }
.ytable .delta-up { color: #B4233B; }
.ytable .delta-down { color: #1F7A4D; }
.table-wrap { overflow-x: auto; }

/* Term (classification) pages */
.term-kpis { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 16px; }
.term-kpis div b { display: block; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.2; }
.term-kpis div span { color: rgba(255, 255, 255, .7); font-size: 13.5px; }

/* Reports library */
.lib { display: grid; gap: 20px; }
.lib-item { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 18px; background: #fff; border: 1px solid #E6E4EE; border-radius: var(--radius); }
.lib-cover { aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--purple-50); box-shadow: 0 10px 24px -14px rgba(21, 20, 42, .5); }
.lib-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-item h2 { font-size: 20px; }
.lib-item h2 a { color: var(--ink); text-decoration: none; }
.lib-item p { color: var(--muted); font-size: 15px; }
.lib-item .btn-row { margin-top: 12px; }
@media (max-width: 640px) { .lib-item { grid-template-columns: 1fr; } .lib-cover { max-width: 200px; } }

/* About: methodology */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.method .step { position: relative; padding: 22px; background: #fff; border: 1px solid #E6E4EE; border-radius: var(--radius); }
.method .step i { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 8px; background: var(--night); color: var(--signal); font-style: normal; font-weight: 800; }
.method .step h3 { font-size: 17px; margin-bottom: 6px; }
.method .step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .method { grid-template-columns: 1fr; } }
.glossary { columns: 2 260px; column-gap: 24px; list-style: none; margin: 0; padding: 0; }
.glossary li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid #EEEDF3; display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.glossary a { color: var(--ink); text-decoration: none; }
.glossary a:hover { color: var(--purple); }

/* Report form: steps */
.steps-bar { display: flex; gap: 0; list-style: none; margin: 0 0 22px; padding: 0; counter-reset: s; }
.steps-bar li { flex: 1; position: relative; padding-top: 34px; text-align: center; font-size: 13.5px; color: var(--muted); counter-increment: s; }
.steps-bar li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--night); color: var(--signal); font-weight: 800; font-size: 13px; z-index: 1; }
.steps-bar li + li::after { content: ""; position: absolute; top: 12px; inset-inline-end: 50%; width: 100%; height: 2px; background: #E6E4EE; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border-radius: 8px; background: #F3F1F8; font-size: 14.5px; color: var(--ink); }

/* Explorer page keeps the map, re-skinned */
.obs-panel { background: #fff; }
.obs-kpis { background: var(--night); }
.site-footer { background: var(--night); }
.badge-navy { background: #E8EAF5; color: var(--navy); }
.cta-band { background: var(--night); border-radius: var(--radius); margin-block: 8px 48px; background-image: radial-gradient(600px 200px at 0% 100%, rgba(121, 74, 175, .45), transparent 70%); }
.panel .more svg { width: 16px; height: 16px; vertical-align: middle; }
.rank .trk { display: flex; }
.privacy-note .icon { flex: none; width: 20px; height: 20px; color: var(--purple); margin-top: 3px; }
.side-dark { background: var(--night); border-color: var(--night); color: rgba(255, 255, 255, .85); }
.side-dark h2 { color: #fff; }
.after-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; font-size: 15px; }
.after-steps li::marker { color: var(--signal); font-weight: 800; }
.sidebar .side-box + .side-box { margin-top: 16px; }
.lib-item .meta { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.lib-cover .no-thumb { display: grid; place-items: center; height: 100%; padding: 24px; }
.side-box .social { display: flex; flex-wrap: wrap; gap: 8px; }
.obs-header .lang-switch a { color: rgba(255, 255, 255, .85); } .obs-header .lang-switch a[aria-current="true"] { background: var(--purple); color: #fff; }
@media (max-width: 560px) {
	.rank li a { grid-template-columns: 22px 1fr 36px; row-gap: 6px; }
	.rank .trk { grid-column: 2; grid-row: 2; }
	.rank b { grid-column: 3; grid-row: 1 / 3; }
}
/* Home: labelled geographic map with a Greater Tunis inset */
.geo-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
@media (max-width: 860px) { .geo-split { grid-template-columns: 1fr; } }
.hex-panel { display: grid; gap: 12px; }
.geomap { display: block; width: 100%; max-width: 620px; max-height: 900px; height: auto; margin-inline: auto; direction: ltr; }
.gm-gov { stroke: #fff; stroke-width: 2; stroke-linejoin: round; transition: fill .15s; }
.gm-cell:hover .gm-gov, .gm-cell:focus-visible .gm-gov { fill: var(--purple); }
.gm-cell:focus { outline: none; }
.gm-name { font: 600 19px var(--font); fill: var(--navy); pointer-events: none; }
.gm-n { font: 800 25px var(--font); fill: var(--navy); pointer-events: none; }
.gm-name.sm { font-size: 15px; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; }
.gm-name.sm.on-dark { stroke: rgba(29,36,90,.85); }
.gm-n.sm { font-size: 17px; }
.gm-n.zero { font-weight: 500; fill: #9EA3BD; }
.on-dark { fill: #fff; }
.gm-cell:hover .gm-name, .gm-cell:hover .gm-n { fill: #fff; }
.gm-frame { fill: none; stroke: var(--navy); stroke-width: 2; stroke-dasharray: 5 4; }
.gm-lead { stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 5 4; }
.gm-inset-bg { fill: #fff; stroke: #D6DAF0; stroke-width: 2; }
.gm-inset-title { font: 700 17px var(--font); fill: var(--muted); }
.hex-legend { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }
.hex-legend i { width: 140px; height: 10px; border-radius: 5px; background: linear-gradient(to left, #D6DAF0, #2D3883); }
[dir="ltr"] .hex-legend i { background: linear-gradient(to right, #D6DAF0, #2D3883); }

/* Mobile menu: backdrop-filter on the header trapped the fixed drawer inside the header's height. */
@media (max-width: 1080px) {
	.site-header, .obs-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
	.main-nav { height: 100dvh; max-height: 100vh; }
	.nav-close { display: grid; place-items: center; position: absolute; top: 18px; inset-inline-end: 16px; width: 44px; height: 44px; border: 1px solid var(--night-line, #ddd); border-radius: 10px; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
}
.nav-close { display: none; }
@media (max-width: 1080px) { .nav-close { display: grid; } }
