/*
Theme Name: Inside the Walls 2.0
Theme URI: https://prisons.intersection.uno
Author: Ahmed Morsy
Description: Arabic RTL map-first theme for the Tunis Prison Atlas plugin, built on the 2026 graphic charter (Deep Midnight / Electric Purple).
Version: 2.9.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: inside-the-walls-2
*/

/* ---------- Tokens (from the graphic charter) ---------- */
:root {
	--bg: #0B0616;
	--bg-2: #100A22;
	--bg-3: #160E30;
	--glass: rgba(124, 58, 237, 0.07);
	--glass-2: rgba(124, 58, 237, 0.15);
	--line: rgba(167, 139, 250, 0.22);
	--line-2: rgba(167, 139, 250, 0.48);
	--purple: #7C3AED;
	--purple-deep: #5B21B6;
	--lav: #A78BFA;
	--lav-2: #C4B5FD;
	--crimson: #F43F5E;
	--crimson-soft: #FFB4C0;
	--cyan: #38BDF8;
	--cyan-soft: #BDE9FF;
	--text: #F1EDFF;
	--muted: #ADA6C9;
	--dim: #7B7499;
	--ar: "Cairo", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
	--num: "Space Grotesk", "Cairo", ui-monospace, monospace;
	--radius: 16px;
	--radius-sm: 12px;
	--gutter: clamp(16px, 4vw, 48px);
	--container: 1200px;
	--header-h: 68px;
	--shadow-glow: 0 30px 60px -30px rgba(124, 58, 237, 0.7);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	background: var(--bg);
	background-image:
		radial-gradient(900px 520px at 85% -8%, rgba(124, 58, 237, 0.22), transparent 60%),
		radial-gradient(700px 420px at 8% 18%, rgba(56, 189, 248, 0.07), transparent 60%);
	color: var(--text);
	font: 400 16px/1.8 var(--ar);
	direction: rtl;
}
img { max-width: 100%; height: auto; }
a { color: var(--lav-2); text-decoration: none; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 900; }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.screen-reader-text, .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -100px; right: 16px; z-index: 100; padding: 8px 14px; background: var(--purple); color: #fff; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--lav); }
.lede { color: var(--muted); font-size: 17px; max-width: 62ch; }

/* ---------- Buttons, tags, pills ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
	background: var(--glass); color: var(--lav-2); font-weight: 700; font-size: 14px; line-height: 1.4;
	transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { border-color: var(--lav); color: var(--text); background: var(--glass-2); }
.btn--primary { background: linear-gradient(135deg, var(--purple), var(--purple-deep)); border-color: transparent; color: #fff; box-shadow: 0 10px 28px -10px var(--purple); }
.btn--primary:hover { color: #fff; background: linear-gradient(135deg, #8B5CF6, var(--purple)); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn[aria-pressed="true"] { background: var(--glass-2); border-color: var(--lav); color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--glass); color: var(--lav-2); font-size: 12.5px; font-weight: 700; }
.tag--crit { color: var(--crimson-soft); border-color: rgba(244, 63, 94, 0.5); background: rgba(244, 63, 94, 0.12); }
.tag--cyan { color: var(--cyan-soft); border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.1); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-family: var(--num); font-weight: 700; font-size: 13px; direction: ltr; }
.pill--ok { background: rgba(56, 189, 248, 0.18); color: var(--cyan-soft); }
.pill--mid { background: rgba(167, 139, 250, 0.2); color: var(--lav-2); }
.pill--crit { background: rgba(244, 63, 94, 0.18); color: var(--crimson-soft); }
.pill--none { background: rgba(255, 255, 255, 0.06); color: var(--dim); font-family: var(--ar); direction: rtl; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); background: var(--glass); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.callout { border: 1px solid var(--line); border-inline-start: 3px solid var(--crimson); background: var(--glass); border-radius: 14px; padding: 16px 18px; }
.callout--cyan { border-inline-start-color: var(--cyan); }
.callout h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.callout p { color: var(--muted); font-size: 14.5px; }
.metric { border: 1px solid var(--line); background: var(--glass); border-radius: 14px; padding: 14px 12px; text-align: center; }
.metric strong { display: block; font-family: var(--num); font-size: 30px; font-weight: 700; line-height: 1.1; direction: ltr; }
.metric span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.metric--lav strong { color: var(--lav-2); }
.metric--cyan strong { color: var(--cyan); }
.metric--crit strong { color: var(--crimson); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(11, 6, 22, 0.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .2s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.9); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 900; font-size: 19px; }
.brand__mark { width: 38px; height: 38px; border-radius: 10px; flex: none; filter: drop-shadow(0 0 14px rgba(124, 58, 237, 0.55)); }
.brand small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); line-height: 1.2; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14.5px; position: relative; }
.site-nav a:not(.btn):hover { color: var(--text); background: var(--glass); }
.site-nav a.is-current { color: var(--text); }
.site-nav a.is-current::after { content: ""; position: absolute; inset: auto 12px -2px; height: 2px; border-radius: 2px; background: var(--purple); }
.site-nav .btn { margin-inline-start: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--glass); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span:not(.sr) { width: 18px; height: 2px; background: var(--lav-2); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: rgba(11, 6, 22, 0.6); }
.site-footer__inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; padding-block: 40px 28px; }
.site-footer p { color: var(--muted); font-size: 14.5px; max-width: 46ch; margin-top: 8px; }
.site-footer h4 { font-size: 14px; color: var(--lav); letter-spacing: .05em; margin-bottom: 10px; }
.site-footer ul { display: grid; gap: 6px; }
.site-footer li a { color: var(--muted); font-size: 14.5px; }
.site-footer li a:hover { color: var(--text); }
.site-footer__bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ---------- Home: hero (map first) ---------- */
.hero { padding-block: 28px 8px; }
.hero__grid { display: grid; grid-template-columns: 1.2fr 0.85fr; gap: 24px; align-items: stretch; }
.hero__side { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hero__side h1 { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.15; }
.hero__side .lede { font-size: 15.5px; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.legend i.is-dashed { background: transparent; border: 1px dashed var(--muted); }

.atlas { position: relative; border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; min-height: 560px; background: radial-gradient(60% 55% at 50% 45%, rgba(124, 58, 237, 0.26), rgba(124, 58, 237, 0.04) 70%, transparent), var(--bg-2); box-shadow: var(--shadow-glow); }
.atlas__map { position: absolute; inset: 0; }
.atlas__caption { position: absolute; z-index: 3; top: 14px; right: 16px; font-size: 13px; font-weight: 700; color: var(--lav-2); pointer-events: none; }
.atlas__tools { position: absolute; z-index: 3; bottom: 14px; left: 14px; display: flex; flex-direction: column; gap: 6px; }
.atlas__tools .btn { background: rgba(11, 6, 22, 0.82); backdrop-filter: blur(8px); }
.atlas__status { position: absolute; z-index: 3; bottom: 14px; right: 16px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(11, 6, 22, 0.82); color: var(--muted); font-size: 12.5px; }
.atlas[data-state="ready"] .atlas__status { display: none; }
.atlas__labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.atlas__label { position: absolute; transform: translate(-50%, -140%); font-size: 11px; font-weight: 700; color: rgba(241, 237, 255, 0.72); text-shadow: 0 1px 6px rgba(11, 6, 22, 0.9); white-space: nowrap; }
.atlas__label { transform: translate(-50%, -50%); font-size: 10.5px; color: rgba(241, 237, 255, 0.62); transition: color 0.15s; }
.atlas__label.is-hover { color: #fff; }
.atlas__credit { position: absolute; z-index: 2; bottom: 6px; right: 12px; margin: 0; font-size: 10px; color: var(--dim); pointer-events: none; }
.atlas__credit a { pointer-events: auto; color: inherit; }
.atlas .maplibregl-canvas { outline: none; }
.atlas .maplibregl-ctrl-group { background: rgba(11, 6, 22, 0.85); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: none; overflow: hidden; }
.atlas .maplibregl-ctrl-group button { width: 34px; height: 34px; border-bottom: 1px solid var(--line) !important; }
.atlas .maplibregl-ctrl-group button:last-child { border-bottom: 0 !important; }
.atlas .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) hue-rotate(180deg) brightness(1.4); }
.atlas .maplibregl-ctrl-top-left { top: 12px; left: 12px; }
.atlas .maplibregl-cooperative-gesture-screen { font-family: var(--ar); background: rgba(11, 6, 22, 0.75); color: var(--text); }
.atlas .maplibregl-ctrl-attrib { display: none; }

/* search with suggestions */
.search { position: relative; }
.search__box { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 14px; padding: 4px 6px 4px 14px; background: rgba(11, 6, 22, 0.7); }
.search__box:focus-within { border-color: var(--lav); }
.search__icon { width: 15px; height: 15px; border: 2px solid var(--lav); border-radius: 50%; position: relative; flex: none; }
.search__icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--lav); left: -6px; bottom: -3px; transform: rotate(45deg); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 4px; outline: none; font-size: 14.5px; }
.search input::placeholder { color: var(--dim); opacity: 1; }
.search__list { position: absolute; z-index: 20; inset: calc(100% + 6px) 0 auto; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(16, 10, 34, 0.97); backdrop-filter: blur(12px); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9); overflow: hidden; }
.search__list[hidden] { display: none; }
.search__list button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border: 0; background: transparent; text-align: right; font-size: 14px; }
.search__list button:hover, .search__list button:focus-visible { background: var(--glass-2); outline: none; }
.search__list button small { color: var(--muted); font-size: 12px; }
.search__list button.is-gov span { color: var(--lav-2); font-weight: 700; }
.search__list .is-empty { padding: 10px 14px; color: var(--dim); font-size: 13.5px; }

/* popup (governorate card) */
.gcard { padding: 14px 16px 16px; }
.gcard__eyebrow { margin: 0; font-size: 11.5px; color: var(--cyan); font-weight: 700; }
.gcard h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.gcard__count { margin: 0; color: var(--muted); font-size: 13px; }
.gcard__count .num { font-family: var(--num); color: var(--text); font-weight: 700; }
.itw-popup--gov .maplibregl-popup-content { width: 230px; }
.itw-popup--gov .maplibregl-popup-tip { display: none; }

/* popup (prison card) */
.itw-popup .maplibregl-popup-content { padding: 0; border-radius: 16px; overflow: hidden; background: rgba(16, 10, 34, 0.94); border: 1px solid var(--line-2); box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(124, 58, 237, 0.25); color: var(--text); font-family: var(--ar); direction: rtl; width: 270px; max-width: 80vw; }
.itw-popup .maplibregl-popup-tip { border-top-color: rgba(167, 139, 250, 0.6) !important; border-bottom-color: rgba(167, 139, 250, 0.6) !important; }
.itw-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: rgba(167, 139, 250, 0.6) !important; }
.itw-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: rgba(167, 139, 250, 0.6) !important; }
.itw-popup .maplibregl-popup-close-button { left: 8px; right: auto; top: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(11, 6, 22, 0.7); color: #fff; font-size: 18px; line-height: 1; z-index: 2; }
.itw-popup .maplibregl-popup-close-button:hover { background: var(--crimson); }
.pcard__photo { height: 104px; background: linear-gradient(160deg, #2A1A5E, #0B0616 70%), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 6px, transparent 6px 22px); position: relative; }
.pcard__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard__photo span { position: absolute; bottom: 8px; right: 10px; font-size: 11px; color: var(--dim); }
.pcard__body { padding: 12px 14px 14px; }
.pcard__body h3 { font-size: 15.5px; font-weight: 800; margin: 0 0 2px; line-height: 1.35; }
.pcard__meta { color: var(--muted); font-size: 12px; }
.pcard__excerpt { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.pcard__metrics div { background: var(--glass); border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; text-align: center; }
.pcard__metrics strong { display: block; font-family: var(--num); font-size: 15px; font-weight: 700; direction: ltr; }
.pcard__metrics span { font-size: 10.5px; color: var(--muted); }
.pcard__metrics .is-ok { color: var(--cyan); }
.pcard__metrics .is-mid { color: var(--lav-2); }
.pcard__metrics .is-crit { color: var(--crimson); }
.pcard__link { display: inline-flex; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--lav-2); }
.pcard__link:hover { color: var(--text); }

/* spiderfy */
.spider-leg { position: absolute; left: 0; top: 0; height: 1.5px; background: rgba(196, 181, 253, 0.6); transform-origin: 0 50%; pointer-events: none; }
.spider-pin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85); background: var(--c, var(--lav)); box-shadow: 0 0 12px var(--c, var(--lav)); padding: 0; }
.spider-pin:hover { transform: scale(1.2); }

/* ---------- Sections ---------- */
.section { padding-block: 64px 0; }
.section__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.section__head p:not(.eyebrow) { color: var(--muted); max-width: 66ch; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stack { display: grid; gap: 12px; }

/* pressure gauge */
.pressure { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: center; }
.gauge { position: relative; display: grid; place-items: center; padding: 10px; }
.gauge svg { width: min(320px, 90%); height: auto; display: block; }
.gauge__value { position: absolute; text-align: center; }
.gauge__value strong { display: block; font-family: var(--num); font-size: clamp(42px, 5vw, 56px); font-weight: 700; line-height: 1; color: #fff; text-shadow: 0 0 30px rgba(244, 63, 94, 0.55); direction: ltr; }
.gauge__value span { font-size: 13px; font-weight: 700; color: var(--crimson); }
.pressure__note { display: inline-flex; margin-top: 4px; padding: 8px 14px; border: 1px solid rgba(244, 63, 94, 0.5); border-radius: 12px; background: rgba(244, 63, 94, 0.1); color: var(--crimson-soft); font-size: 13.5px; font-weight: 700; }
.pressure__totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

/* ranking */
.rank { display: grid; gap: 16px; }
.rank__row { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: end; }
.rank__row a { color: var(--text); font-weight: 700; font-size: 15.5px; }
.rank__row a:hover { color: var(--lav-2); }
.rank__row .num { font-size: 20px; font-weight: 700; }
.rank__bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.rank__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--purple), var(--crimson)); }
.rank__bar i.is-mid { background: linear-gradient(90deg, var(--purple), var(--lav-2)); }
.rank__bar i.is-ok { background: linear-gradient(90deg, #0EA5E9, var(--cyan)); }
.rank__row .is-crit { color: var(--crimson); }
.rank__row .is-mid { color: var(--lav-2); }
.rank__row .is-ok { color: var(--cyan); }

/* violations chart */
.vchart { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 14px; align-items: end; height: 300px; padding-top: 28px; }
.vchart__bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; }
.vchart__bar b { font-family: var(--num); font-size: 22px; font-weight: 700; }
.vchart__bar i { display: block; width: 100%; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, var(--lav), var(--purple)); min-height: 6px; }
.vchart__bar i.is-top { background: linear-gradient(180deg, var(--crimson), var(--purple)); box-shadow: 0 0 24px -6px var(--crimson); }
.vchart__bar i.is-low { background: linear-gradient(180deg, #38BDF8, #0EA5E9); }
.vchart__bar i.is-min { background: #3A3552; }
.vchart__bar span { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.4; min-height: 40px; }
.vchart__bar b.is-top { color: var(--crimson); }
.vchart__bar b.is-low { color: var(--cyan); }
.vchart__bar b.is-min { color: var(--muted); }

/* methodology */
.method { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 20px; }
.method__ledger { display: grid; place-items: center; text-align: center; border: 1px solid var(--line-2); border-radius: var(--radius); background: radial-gradient(60% 60% at 50% 50%, rgba(124, 58, 237, 0.35), transparent 70%), var(--glass); padding: 40px 24px; }
.method__ledger .eyebrow { color: var(--lav-2); }
.method__ledger strong { display: block; font-family: var(--num); font-size: clamp(56px, 7vw, 84px); font-weight: 700; line-height: 1; color: #fff; }
.method__ledger p { color: var(--lav-2); font-weight: 700; font-size: 17px; }
.method__ledger small { display: block; color: var(--muted); font-size: 13px; margin-top: 8px; }
.method__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.method__cards .card h3 { display: flex; align-items: center; gap: 8px; font-size: 16.5px; }
.method__cards .card h3 i { width: 10px; height: 10px; border-radius: 3px; background: var(--lav); flex: none; }
.method__cards .card:nth-child(2) h3 i { background: var(--cyan); }
.method__cards .card:nth-child(3) h3 i { background: var(--crimson); }

/* ---------- Generic page ---------- */
.page-head { padding-block: 48px 8px; }
.page-head .lede { margin-top: 10px; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 22px; margin: 34px 0 8px; }
.prose h3 { font-size: 18px; margin: 24px 0 6px; }
.prose p, .prose li { color: var(--muted); font-size: 16px; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-inline-start: 22px; list-style: disc; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.method-page { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.hero__grid { grid-template-columns: 1fr; }
	.atlas { min-height: 520px; }
	.pressure, .method, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px var(--gutter) 18px; background: rgba(11, 6, 22, 0.97); border-bottom: 1px solid var(--line); }
	.site-nav.is-open { display: flex; }
	.site-nav a:not(.btn) { padding: 12px 14px; font-size: 16px; }
	.site-nav a.is-current::after { inset: auto auto 6px 14px; width: 6px; height: 6px; border-radius: 50%; }
	.site-nav .btn { margin: 8px 0 0; }
	.pressure, .method, .grid-2, .grid-3, .grid-4, .method__cards, .method-page, .site-footer__inner { grid-template-columns: 1fr; }
	.atlas { min-height: 460px; }
	.atlas__label { font-size: 10px; }
	.vchart { height: 240px; gap: 8px; }
	.vchart__bar b { font-size: 18px; }
	.vchart__bar span { font-size: 11px; }
	.section { padding-block: 48px 0; }
}
@media (max-width: 520px) {
	.metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.metric strong { font-size: 24px; }
	.metric span { font-size: 11.5px; }
	.hero__side h1 { font-size: 28px; }
	.atlas { min-height: 420px; }
	.atlas__caption { font-size: 11.5px; }
	.atlas__tools .btn { padding: 6px 10px; font-size: 12px; }
	.vchart { height: 210px; gap: 5px; }
	.vchart__bar span { font-size: 9.5px; min-height: 44px; }
	.rank__row a { font-size: 14px; }
	.pressure__totals { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Institutions directory ---------- */
.back-link { display: inline-flex; gap: 6px; margin-top: 22px; color: var(--muted); font-size: 14px; font-weight: 600; }
.back-link:hover { color: var(--text); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: center; padding: 14px; }
.filters__select select { width: 100%; appearance: none; -webkit-appearance: none; border: 1px solid var(--line-2); border-radius: 14px; padding: 11px 14px; padding-inline-end: 38px; background: rgba(11, 6, 22, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A78BFA' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center; color: var(--text); font-size: 14.5px; }
.filters__select select:focus { border-color: var(--lav); outline: none; }
.inst-count { margin: 14px 0 10px; color: var(--muted); font-size: 13.5px; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(11, 6, 22, 0.6); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
.tbl th { background: linear-gradient(180deg, rgba(124, 58, 237, 0.28), rgba(124, 58, 237, 0.14)); color: var(--lav-2); text-align: right; padding: 4px 6px; white-space: nowrap; font-weight: 700; }
.tbl th button { border: 0; background: transparent; padding: 10px 8px; font-weight: 700; color: inherit; display: inline-flex; gap: 6px; align-items: center; border-radius: 8px; }
.tbl th button::after { content: "↕"; font-size: 11px; opacity: .45; }
.tbl th[aria-sort="ascending"] button::after { content: "↑"; opacity: 1; }
.tbl th[aria-sort="descending"] button::after { content: "↓"; opacity: 1; }
.tbl th button:hover { background: rgba(124, 58, 237, 0.2); }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover td { background: rgba(124, 58, 237, 0.06); }
.tbl td.num { font-size: 15px; }
.inst-table__title { color: var(--text); font-weight: 700; }
.inst-table__title:hover { color: var(--lav-2); }
.inst-table__open { white-space: nowrap; font-weight: 700; font-size: 13.5px; }
.tbl td:nth-child(2), .tbl td:nth-child(3) { white-space: nowrap; }
.inst-empty { padding: 20px; color: var(--muted); text-align: center; }

/* ---------- Prison profile ---------- */
.profile__hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; padding-block: 18px 8px; align-items: start; }
.profile__intro { display: grid; gap: 12px; }
.profile__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.profile__intro h1 { font-size: clamp(30px, 3.6vw, 42px); }
.profile__metrics { grid-template-columns: repeat(4, 1fr); }
.profile__bars h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.bars { display: grid; gap: 10px; }
.bars__row { display: grid; grid-template-columns: 110px 1fr 64px; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.bars__track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bars__track i { display: block; height: 100%; border-radius: 999px; }
.profile__facts h3 { font-size: 17px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.profile__photo { margin: 0 0 16px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.profile__photo img { display: block; width: 100%; height: 220px; object-fit: cover; }
.profile__photo figcaption { padding: 6px 10px; font-size: 12px; text-align: left; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.profile__cases { margin-top: 18px; text-align: center; }
.profile__cases h3 { color: var(--crimson); font-size: 14px; border: 0; padding: 0; margin: 0 0 4px; }
.profile__cases-count { font-size: 28px; font-weight: 700; color: var(--text); }
.profile__cases-count span { font-family: var(--ar); font-size: 16px; }
.jump { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; backdrop-filter: blur(10px); }
.jump a { padding: 6px 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.jump a:hover { background: var(--glass-2); color: var(--text); }
.section--tight { padding-block: 40px 0; }
.indicators { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.indicators .metric strong { color: var(--crimson); font-size: 26px; }
.indicators .metric span { font-size: 12.5px; }
.vcase h3 { font-size: 18px; }
.vcase__date { color: var(--lav); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.vcase__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--glass); }
.gallery img { display: block; width: 100%; height: 200px; object-fit: cover; }
.gallery figcaption { padding: 8px 12px; font-size: 12.5px; color: var(--muted); }
.timeline { display: grid; gap: 14px; position: relative; padding-inline-start: 18px; border-inline-start: 2px solid var(--line-2); }
.timeline li { display: grid; gap: 6px; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -25px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25); }
.timeline time { color: var(--lav); font-size: 13px; font-weight: 700; }
.timeline .card h3 { font-size: 17px; }
.sources { display: grid; gap: 10px; }
.sources a.card { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 18px; }
.sources a.card span { font-weight: 700; color: var(--text); }
.sources a.card small { grid-column: 1; color: var(--dim); font-size: 12px; direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources a.card b { grid-row: 1 / span 2; color: var(--lav); font-size: 18px; }
.sources a.card:hover { border-color: var(--lav); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.pager a.card { display: grid; gap: 4px; padding: 14px 18px; }
.pager a.card span { color: var(--muted); font-size: 12.5px; }
.pager a.card strong { color: var(--text); }
.pager a.card:last-child { text-align: left; }
.pager a.card:hover { border-color: var(--lav); }

/* ---------- Violation ---------- */
.vrecord { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 20px; align-items: start; }
.page-head--tight { padding-block: 12px 18px; }
.page-head--tight .vcase__tags { margin-top: 12px; }

/* ---------- About / Contact / Login / Dashboard ---------- */
.about .card h3 { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.list { display: grid; gap: 6px; padding-inline-start: 18px; list-style: disc; color: var(--muted); font-size: 15px; }
.note { margin-top: 16px; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); font-size: 13.5px; }
.contact { align-items: start; }
.form { display: grid; gap: 14px; }
.form__row { display: grid; gap: 6px; }
.form__row label { font-size: 13.5px; font-weight: 700; color: var(--lav-2); }
.form input:not([type="checkbox"]), .form textarea, .form select, #itw2-login input:not([type="checkbox"]) { width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; background: rgba(11, 6, 22, 0.7); color: var(--text); font-size: 15px; }
.form input:focus, .form textarea:focus, .form select:focus, #itw2-login input:focus { border-color: var(--lav); outline: none; }
.form textarea { resize: vertical; min-height: 140px; }
.form__hp { position: absolute; left: -9999px; top: -9999px; }
.notice { padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14.5px; }
.notice--ok { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.5); color: #C7F9E5; }
.notice--err { background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(244, 63, 94, 0.5); color: var(--crimson-soft); }
.login { display: grid; grid-template-columns: 1fr 0.8fr; gap: 20px; align-items: start; padding-block: 40px 0; }
.login__box h1 { font-size: 28px; margin: 4px 0 6px; }
.login__box .lede { margin-bottom: 18px; font-size: 15px; }
#itw2-login p { display: grid; gap: 6px; margin: 0 0 14px; }
#itw2-login label { font-size: 13.5px; font-weight: 700; color: var(--lav-2); }
#itw2-login .login-remember label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
#itw2-login .login-remember input { accent-color: var(--purple); width: 16px; height: 16px; }
#itw2-login .login-submit { margin-bottom: 0; }
#itw2-login .login-submit input[type="submit"] { width: 100%; border: 0; border-radius: var(--radius-sm); padding: 12px 18px; background: linear-gradient(135deg, var(--purple), var(--purple-deep)); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 10px 28px -10px var(--purple); }
.login__help { margin-top: 14px; font-size: 13.5px; }
.login__side { display: grid; gap: 12px; }
.dash__head { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }

@media (max-width: 1080px) {
	.filters { grid-template-columns: 1fr 1fr; }
	.filters__search { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
	.profile__hero, .vrecord, .login, .pager { grid-template-columns: 1fr; }
	.filters { grid-template-columns: 1fr; }
	.jump { position: static; }
	.tbl table { min-width: 0; }
	.tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.tbl tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px; border-top: 1px solid var(--line); }
	.tbl tbody tr:first-child { border-top: 0; }
	.tbl td { padding: 0; border: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
	.tbl td::before { content: attr(data-label); color: var(--dim); font-size: 12px; font-family: var(--ar); direction: rtl; }
	.tbl td[data-label=""]::before { content: none; }
	.tbl td:first-child, .tbl td:last-child { grid-column: 1 / -1; }
	.tbl td:first-child { font-size: 16px; }
	.tbl td:last-child { justify-content: flex-start; }
	.tbl td.num { direction: rtl; }
	.tbl td.num::before { direction: rtl; }
}
@media (max-width: 520px) {
	.profile__metrics { grid-template-columns: 1fr 1fr; }
	.bars__row { grid-template-columns: 86px 1fr 56px; font-size: 12px; }
	.tbl tbody tr { grid-template-columns: 1fr; }
}

/* ---------- Lists: violations / events / sources ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.vcase__prison { font-size: 13.5px; margin-bottom: 4px; }
.vcase__prison a { color: var(--cyan); font-weight: 700; }
.filters--two { grid-template-columns: 2fr 1fr auto; }
.filters--one { grid-template-columns: 1fr auto; }
.timeline--wide { margin-top: 10px; }
.timeline--wide .card p { margin-top: 4px; }
.source { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.source__main h3 { font-size: 18px; margin-bottom: 4px; }
.source__url a { font-size: 13px; color: var(--muted); word-break: break-all; direction: ltr; display: inline-block; text-align: left; }
.source__url a:hover { color: var(--lav-2); }
.source__side { display: grid; gap: 8px; justify-items: center; min-width: 150px; }
.source__side .metric { padding: 8px 12px; }
.source__side .metric strong { font-size: 22px; }
.source__side .metric span { font-size: 11.5px; }
.source__record { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.source__record strong { color: var(--text); }
.source__record:hover { border-color: var(--lav); }
.linklist { display: grid; gap: 8px; }
.linklist li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.linklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.linklist a { font-weight: 700; }
.linklist small { color: var(--dim); font-size: 12px; }
@media (max-width: 860px) {
	.filters--two, .filters--one { grid-template-columns: 1fr; }
	.source { grid-template-columns: 1fr; }
	.source__side { justify-items: start; grid-auto-flow: column; align-items: center; }
}

/* ---------- Indicators page ---------- */
.ind-tiles { grid-template-columns: repeat(3, 1fr); }
.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(150px, 1.1fr) 2fr auto; align-items: center; gap: 12px; font-size: 14px; }
.hbar__label { display: grid; gap: 0; color: var(--text); font-weight: 700; line-height: 1.4; }
.hbar__label a { color: var(--text); }
.hbar__label a:hover { color: var(--lav-2); }
.hbar__label small { color: var(--dim); font-size: 12px; font-weight: 600; }
.hbar__track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.hbar__track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--purple), var(--lav-2)); min-width: 4px; }
.hbar__track i.is-crit { background: linear-gradient(90deg, var(--purple), var(--crimson)); }
.hbar__track i.is-mid { background: linear-gradient(90deg, var(--purple), var(--lav-2)); }
.hbar__track i.is-ok { background: linear-gradient(90deg, #0EA5E9, var(--cyan)); }
.hbar__track i.is-none { background: #3A3552; }
.hbar__value { display: flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 64px; font-family: var(--num); font-weight: 700; font-size: 15px; }
.hbars--rich .hbar__value { min-width: 130px; }
.ind-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ind-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ind-row > div:first-child { display: grid; }
.ind-row strong { font-size: 15px; }
.ind-row small { color: var(--dim); font-size: 12px; }
.ind-row__nums { display: flex; align-items: center; gap: 14px; }
.ind-row__nums > span { display: grid; text-align: center; }
.ind-row__nums b { font-size: 17px; font-weight: 700; }
.ind-row__nums small { color: var(--dim); font-size: 11px; }
.rank--dense { gap: 12px; }
.rank--dense .rank__row a { font-size: 15px; }
.rank__meta { display: block; color: var(--dim); font-size: 12px; font-weight: 600; }
@media (max-width: 1080px) { .ind-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
	.hbar { grid-template-columns: 1fr auto; }
	.hbar__label { grid-row: 1; grid-column: 1; }
	.hbar__value { grid-row: 1; grid-column: 2; }
	.hbar__track { grid-row: 2; grid-column: 1 / -1; }
	.hbars--rich .hbar__value { min-width: 0; }
	.ind-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) { .ind-tiles { grid-template-columns: 1fr 1fr; } }

/* ---------- Site search ---------- */
.site-search { display: flex; align-items: center; margin-inline-start: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(11, 6, 22, 0.6); padding-inline-end: 4px; }
.site-search:focus-within { border-color: var(--lav); }
.site-search input { width: 130px; border: 0; background: transparent; padding: 6px 10px; font-size: 13.5px; outline: none; transition: width .2s ease; }
.site-search input:focus { width: 190px; }
.site-search input::placeholder { color: var(--dim); opacity: 1; }
.site-search button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; }
.site-search button:hover { background: var(--glass-2); }
.search--page { max-width: 640px; margin-top: 16px; }
.search--page .search__box { padding-inline-end: 6px; }
.search-hints { margin-top: 8px; }
.search-hints__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.search-count { margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px; background: var(--glass-2); color: var(--lav-2); font-size: 13px; vertical-align: middle; }
a.card { display: block; }
a.card:hover { border-color: var(--lav); }
a.card h3 { color: var(--text); }
@media (max-width: 860px) {
	.site-search { margin: 8px 0 0; padding: 4px; }
	.site-search input, .site-search input:focus { width: 100%; flex: 1; font-size: 15px; padding: 8px 10px; }
}

/* ---------- Brand ---------- */
.site-footer .brand { font-size: 18px; }
.site-footer .brand small { font-weight: 600; }
.login__brand { margin-bottom: 14px; }
.login__brand .brand__mark { width: 56px; height: 56px; border-radius: 14px; }

/* ---------- About ---------- */
.about__intro { margin-bottom: 24px; }
.about__intro p { font-size: 17px; }
.about__steps .card { position: relative; padding-top: 26px; }
.about__step { position: absolute; top: 14px; inset-inline-end: 18px; font-size: 13px; font-weight: 700; color: var(--lav); }
.about__steps .card h3 { font-size: 18px; }

/* ---------- Term archives ---------- */
.termlist { display: flex; flex-wrap: wrap; gap: 8px; }
.termlist .tag { padding: 6px 14px; font-size: 13.5px; }
.termlist .tag .num { margin-inline-start: 6px; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 12px; }
.termlist .tag.is-current { background: var(--purple); border-color: var(--purple); color: #fff; }
.termlist .tag.is-current .num { background: rgba(255, 255, 255, 0.2); }
.termlist .tag:hover { border-color: var(--lav); color: var(--text); }
.inst-table__term { color: var(--muted); }
.inst-table__term:hover { color: var(--lav-2); text-decoration: underline; text-underline-offset: 3px; }
a.tag:hover { border-color: var(--lav); color: var(--text); }

/* home: short methodology note (replaces the former section 05) */
.method-note { max-width: 860px; padding: 22px 26px; border: 1px solid var(--line); border-inline-start: 3px solid var(--lav); border-radius: 14px; background: var(--glass); }
.method-note h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.method-note p { margin: 0; color: var(--muted); line-height: 1.9; font-size: 14.5px; }

/* victim photo slot on documented cases */
.vcase__head { display: flex; gap: 14px; align-items: flex-start; }
.vcase__head > div { min-width: 0; }
.vphoto { flex: none; width: 64px; height: 64px; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: linear-gradient(160deg, #2A1A5E, #0B0616 80%); display: grid; place-items: center; }
.vphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vphoto__icon { position: relative; width: 26px; height: 30px; opacity: 0.45; }
.vphoto__icon::before { content: ""; position: absolute; top: 0; left: 50%; width: 13px; height: 13px; border-radius: 50%; background: var(--lav-2); transform: translateX(-50%); }
.vphoto__icon::after { content: ""; position: absolute; bottom: 0; left: 0; width: 26px; height: 14px; border-radius: 13px 13px 3px 3px; background: var(--lav-2); }
.vphoto--lg { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 16px; position: relative; }
.vphoto--lg .vphoto__icon { transform: scale(2); }
.vphoto--lg figcaption { position: absolute; bottom: 10px; right: 12px; font-size: 12px; color: var(--dim); }

/* indicators: capacities, detainee groups, victim groups */
.ind-row__nums { flex-wrap: wrap; justify-content: flex-end; }
.ind-row__nums > span { max-width: 92px; }
.ind-row__na { font-size: 12.5px !important; font-weight: 600 !important; color: var(--dim); line-height: 1.9; }
.ind-row--share { flex-wrap: wrap; }
.ind-row__bar { flex-basis: 100%; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.ind-row__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lav), var(--crimson)); }
.ind-groups { margin-bottom: 18px; }
.metric strong.metric__na { font-family: var(--ar); font-size: 18px; color: var(--dim); }
.inst-table__na { color: var(--dim); font-size: 12.5px; font-family: var(--ar); }
@media (max-width: 860px) { .ind-row--share .ind-row__bar { flex-basis: auto; width: 100%; height: 6px; flex-shrink: 0; } }

/* ---------- Language switcher (EN on Arabic pages, عربي on English pages) ---------- */
.lang-switch { display: flex; align-items: center; margin-inline-start: 6px; }
.site-nav .lang-switch a { padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--lav-2); }
.site-nav .lang-switch a[lang="en"] { font-family: var(--num); letter-spacing: .03em; }
.site-nav .lang-switch a:hover { background: var(--glass-2); color: var(--text); }
@media (max-width: 860px) {
	.lang-switch { align-self: flex-start; margin: 8px 0 0; }
	.site-nav .lang-switch a { padding: 6px 14px; font-size: 15px; }
}

/* ---------- English (LTR) layout ----------
 * The Arabic rules above use physical left/right for an RTL page; these mirror them when <html dir="ltr">.
 * Nothing here applies to the Arabic pages. */
html[dir="ltr"] body { direction: ltr; }
@media (min-width: 1200px) {
	html[dir="ltr"] .site-nav a, html[dir="ltr"] .brand { white-space: nowrap; }
}
@media (min-width: 861px) and (max-width: 1199px) {
	html[dir="ltr"] .brand { white-space: nowrap; font-size: 17px; }
	html[dir="ltr"] .brand small { display: none; }
}
/* English labels are longer: slightly tighter header so the nav stays on one line at desktop widths. */
@media (min-width: 861px) {
	html[dir="ltr"] .site-nav a:not(.btn) { padding-inline: 7px; font-size: 14px; }
	html[dir="ltr"] .site-header__inner { gap: 14px; }
	html[dir="ltr"] .site-search input { width: 96px; }
	html[dir="ltr"] .site-search input:focus { width: 150px; }
}
html[dir="ltr"] .skip-link { right: auto; left: 16px; }
html[dir="ltr"] .pill--none { direction: ltr; }
html[dir="ltr"] .atlas__caption { right: auto; left: 16px; }
html[dir="ltr"] .atlas__tools { left: auto; right: 14px; }
html[dir="ltr"] .atlas__status { right: auto; left: 16px; }
html[dir="ltr"] .atlas__credit { right: auto; left: 12px; }
html[dir="ltr"] .atlas .maplibregl-ctrl-top-right { top: 12px; right: 12px; }
html[dir="ltr"] .search__box { padding: 4px 14px 4px 6px; }
html[dir="ltr"] .search--page .search__box { padding-inline-end: 6px; }
html[dir="ltr"] .search__icon::after { left: auto; right: -6px; transform: rotate(-45deg); }
html[dir="ltr"] .search__list button { text-align: left; }
html[dir="ltr"] .itw-popup .maplibregl-popup-content { direction: ltr; }
html[dir="ltr"] .itw-popup .maplibregl-popup-close-button { left: auto; right: 8px; }
html[dir="ltr"] .pcard__photo span { right: auto; left: 10px; }
html[dir="ltr"] .filters__select select { background-position: right 14px center; }
html[dir="ltr"] .tbl th { text-align: left; white-space: normal; }
html[dir="ltr"] .tbl td:nth-child(3) { white-space: normal; min-width: 180px; }
html[dir="ltr"] .tbl th button { text-align: start; }
html[dir="ltr"] .profile__photo figcaption { text-align: right; }
html[dir="ltr"] .sources a.card small { text-align: left; }
html[dir="ltr"] .pager a.card:last-child { text-align: right; }
html[dir="ltr"] .source__url a { text-align: left; }
html[dir="ltr"] .vphoto--lg figcaption { right: auto; left: 12px; }
html[dir="ltr"] .tpa-untranslated { margin-bottom: 12px; }
@media (max-width: 860px) {
	html[dir="ltr"] .site-nav a.is-current::after { inset: auto 14px 6px auto; }
	html[dir="ltr"] .tbl td::before { direction: ltr; font-family: var(--ar); flex: none; }
	html[dir="ltr"] .tbl td, html[dir="ltr"] .tbl td:nth-child(3) { white-space: normal; min-width: 0; text-align: end; }
	html[dir="ltr"] .tbl td.num, html[dir="ltr"] .tbl td.num::before { direction: ltr; }
}
