/* NCSDI site styles. Logical properties throughout, so Arabic (rtl) and English (ltr) share one sheet. */

:root {
	--ink: #2A2420;
	--nili: #24435C;
	--nili-2: #2F5670;
	--clay: #A4472A;
	--green: #3F6B5A;
	--sec: #6B5F55;
	--ground: #F6F0E6;
	--surface: #EDE3D3;
	--line: #E2D6C2;
	--line-2: #CDBFA8;
	--sand: #E3C48A;
	--ochre: #D9A55B;
	--amber: #C9773F;
	--ok-bg: #E8EFE9;
	--warn-bg: #F6EBD5;
	--bad-bg: #F3E0D6;
	--bad: #8A3B2F;
	--text: 'Noto Kufi Arabic', 'Noto Sans', sans-serif;
	--head: 'Beiruti', sans-serif;
	--wrap: 1240px;
	--read: 720px;
	--r-btn: 10px;
	--r-card: 12px;
	--r-img: 14px;
	--r-big: 20px;
}
.lang-en { --text: 'Noto Sans', 'Noto Kufi Arabic', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -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(--ground); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.85; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--clay); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--nili); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--nili); line-height: 1.15; margin: 0; font-weight: 800; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip-link:focus { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--nili); color: #fff; padding: 10px 16px; border-radius: var(--r-btn); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-read { max-width: var(--read); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-tight { padding-block: clamp(32px, 4vw, 48px); }
.bg-white { background: #fff; }
.bg-surface { background: var(--surface); }
.bg-nili { background: var(--nili); color: #F6F0E6; }
.bg-nili h1, .bg-nili h2, .bg-nili h3 { color: #fff; }
.view h1, .view h2, .view h3, .view h4 { color: inherit; }
.bg-nili a:not(.btn) { color: var(--sand); }

/* ---------- arc strip and logo ---------- */
.arc-strip { display: inline-flex; gap: 3px; inline-size: 160px; }
.arc-strip span { flex: 1; block-size: 6px; border-radius: 1px; }
.ncsdi-logo { inline-size: 56px; block-size: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-btn); border: 1.5px solid var(--nili); background: var(--nili); color: #fff; font-family: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn small { font-size: 12px; font-weight: 400; opacity: .8; margin-inline-start: 4px; }
.btn-outline { background: #fff; color: var(--nili); }
.btn-outline:hover { background: var(--ground); color: var(--ink); }
.btn-clay { background: var(--clay); border-color: var(--clay); }
.btn-clay:hover { background: #8A3B2F; border-color: #8A3B2F; }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-light { background: var(--ground); border-color: var(--ground); color: var(--nili); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--nili); text-decoration: underline; padding-inline: 8px; }
.btn[aria-disabled="true"], .btn:disabled { background: var(--line); border-color: var(--line); color: var(--sec); cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- header ---------- */
.site-header { background: #fff; border-block-end: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .ncsdi-logo { inline-size: 54px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.main-nav a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; border-block-end: 2px solid transparent; }
.main-nav a:hover { color: var(--clay); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-menu-ancestor > a, .main-nav a[aria-current="page"] { color: var(--clay); border-block-end-color: var(--clay); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: 13px; }
.lang-switch a[lang="ar"] { font-family: 'Noto Kufi Arabic', sans-serif; }
.lang-switch a[lang="en"] { font-family: 'Noto Sans', sans-serif; }
.menu-toggle { display: none; min-height: 44px; min-width: 44px; border: 1.5px solid var(--line-2); border-radius: var(--r-btn); background: #fff; color: var(--nili); align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 1020px) {
	.menu-toggle { display: inline-flex; }
	.main-nav { position: absolute; inset-inline: 0; inset-block-start: 100%; background: #fff; border-block-end: 1px solid var(--line); display: none; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
	.main-nav a { padding: 12px 0; border-block-end: 1px solid var(--surface); font-size: 15px; }
	.header-tools .btn-clay { padding: 0 16px; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #F6F0E6; }
.site-footer .wrap { padding-block: 44px 28px; display: flex; flex-direction: column; gap: 28px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.footer-brand .ncsdi-logo { inline-size: 48px; }
.footer-brand b { font-family: var(--head); font-size: 24px; font-weight: 700; line-height: 1.2; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 28px 56px; font-size: 14px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: #F6F0E6; text-decoration: none; }
.site-footer a:hover { color: var(--sand); }
.footer-cols .social a { color: var(--sand); }
.footer-bottom { border-block-start: 1px solid #4A403A; padding-block-start: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12px; color: #D8CCBA; }
.footer-bottom a { color: #D8CCBA; text-decoration: underline; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }

/* ---------- headings and leads ---------- */
.kicker { font-size: 13px; font-weight: 600; color: var(--clay); margin: 0; }
.h-hero { font-size: clamp(44px, 6.4vw, 88px); line-height: 1.02; }
.h-page { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.06; }
.h-sec { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.1; }
.h-card { font-size: 26px; line-height: 1.2; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.95; max-width: 680px; }
.muted { color: var(--sec); }
.small { font-size: 13px; }
.page-hero { padding-block: clamp(40px, 6vw, 80px) 28px; display: flex; flex-direction: column; gap: 16px; }
.page-hero.has-border { border-block-end: 3px solid var(--nili); }

/* ---------- cards, grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-article { border: none; border-block-start: 3px solid var(--accent, var(--nili)); border-radius: 0; background: transparent; }
.card-article .card-link { display: flex; flex-direction: column; gap: 8px; padding-block: 16px 8px; text-decoration: none; color: var(--ink); }
.card-kicker { font-size: 12px; font-weight: 600; color: var(--accent, var(--clay)); display: flex; gap: 8px; align-items: center; }
.card-title { font-family: var(--head); font-size: 25px; font-weight: 700; line-height: 1.25; color: var(--nili); }
.card-text { font-size: 14px; line-height: 1.85; color: #4F453E; }
.card-meta { font-size: 12px; color: var(--sec); }
.card-link:hover .card-title { color: var(--clay); }
.lock-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); color: var(--nili); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.card-head { color: #fff; padding: 20px 22px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.card-head h3 { color: #fff; font-size: 26px; }
.card-head .num { font-size: 40px; font-weight: 700; line-height: 1; color: var(--sand); }

/* ---------- stats ---------- */
.stats { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.stat { border-inline-start: 3px solid var(--ochre); padding-inline-start: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat:nth-child(4n+2) { border-color: var(--amber); }
.stat:nth-child(4n+3) { border-color: var(--green); }
.stat:nth-child(4n+4) { border-color: var(--nili); }
.stat b { font-family: var(--text); font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; line-height: 1; color: var(--nili); }
.stat span { font-size: 14px; line-height: 1.7; color: #4F453E; }
.last-updated { font-size: 12px; color: var(--sec); margin-block-start: 12px; }

/* ---------- chips, tabs, filters ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: var(--ground); border-radius: 999px; padding: 4px 12px; color: var(--ink); text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 8px; border-block-end: 1.5px solid var(--line); }
.tabs a, .tabs button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border: none; background: none; color: #4F453E; font-size: 15px; font-weight: 600; text-decoration: none; margin-block-end: -1.5px; border-block-end: 3px solid transparent; cursor: pointer; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--clay); border-block-end-color: var(--clay); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a, .pills button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; color: var(--nili); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.pills [aria-current="page"], .pills [aria-pressed="true"] { background: var(--nili); border-color: var(--nili); color: #fff; }

/* ---------- breadcrumbs, pager ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--sec); }
.crumbs li + li::before { content: '/'; margin-inline-end: 8px; color: var(--line-2); }
.crumbs a { color: var(--sec); }
.pager ul { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--r-btn); border: 1.5px solid var(--line-2); background: #fff; color: var(--nili); text-decoration: none; font-weight: 600; }
.pager .current { background: var(--nili); border-color: var(--nili); color: #fff; }

/* ---------- reading pages ---------- */
.read-head { background: var(--ground); border-block-end: 1px solid var(--line); }
.read-head .wrap-read { padding-block: clamp(32px, 5vw, 64px) 32px; display: flex; flex-direction: column; gap: 16px; }
.read-head .lead { color: #4F453E; }
.byline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block-start: 6px; font-size: 13px; }
.byline .who { display: flex; align-items: center; gap: 12px; }
.avatar { inline-size: 44px; block-size: 44px; border-radius: 50%; background: var(--sand); color: var(--nili); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 20px; font-weight: 700; flex-shrink: 0; }
.prose { background: #fff; }
.prose .wrap-read { padding-block: 40px 56px; display: flex; flex-direction: column; gap: 22px; }
.entry-content > * { margin: 0; }
.entry-content { display: flex; flex-direction: column; gap: 22px; font-size: 18px; line-height: 2.05; }
.lang-en .entry-content { font-size: 18px; line-height: 1.8; }
.entry-content h2 { font-size: 32px; font-weight: 700; line-height: 1.25; margin-block-start: 14px; }
.entry-content h3 { font-size: 24px; font-weight: 700; color: var(--green); margin-block-start: 8px; }
.entry-content blockquote, .entry-content .wp-block-quote { margin: 6px 0; padding-inline-start: 22px; border-inline-start: 4px solid var(--ochre); font-family: var(--head); font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.5; color: var(--nili); }
.entry-content blockquote p { margin: 0; }
.entry-content blockquote cite { display: block; font-family: var(--text); font-size: 13px; font-weight: 400; color: var(--sec); margin-block-start: 8px; font-style: normal; }
.entry-content ul, .entry-content ol { padding-inline-start: 24px; display: flex; flex-direction: column; gap: 6px; }
.entry-content figure { margin: 0; }
.entry-content img { border-radius: var(--r-img); }
.entry-content figcaption { font-size: 13px; color: var(--sec); margin-block-start: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; }
.entry-content th { background: var(--nili); color: #fff; text-align: start; padding: 10px 12px; font-weight: 600; }
.entry-content td { border-block-start: 1px solid var(--line); padding: 9px 12px; vertical-align: top; }
.entry-content a { color: var(--clay); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding-block-start: 12px; border-block-start: 1px solid var(--line); }
.tags a { font-size: 12px; text-decoration: none; color: var(--nili); background: var(--surface); padding: 6px 12px; border-radius: 999px; }
.author-box { background: var(--nili); color: #F6F0E6; border-radius: 14px; padding: 22px 24px; display: flex; gap: 16px; align-items: center; }
.author-box b { font-family: var(--head); font-size: 22px; font-weight: 700; display: block; }
.author-box p { font-size: 15px; line-height: 1.8; color: #D6DEE6; }
.author-box .avatar { inline-size: 56px; block-size: 56px; font-size: 24px; }
.related { background: var(--ground); border-block-start: 1px solid var(--line); }

/* share */
.share { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--r-btn); border: 1.5px solid var(--line-2); background: #fff; color: var(--nili); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--nili); color: var(--nili); }

/* ---------- notices, boxes, forms ---------- */
.box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 3vw, 26px); display: flex; flex-direction: column; gap: 14px; }
.box-ground { background: var(--ground); border-color: var(--ground); }
.box-dashed { border: 1.5px dashed var(--line-2); background: transparent; }
.notice { border-radius: 14px; padding: 14px 18px; font-size: 14px; line-height: 1.8; }
.notice-ok { background: var(--ok-bg); border: 1.5px solid #9DB5A6; }
.notice-warn { background: var(--warn-bg); border: 1.5px solid var(--sand); }
.notice-bad { background: var(--bad-bg); border: 1.5px solid #D9A58F; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--nili); }
.field small { font-weight: 400; font-size: 12px; color: var(--sec); }
.input, .form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=number], .form input[type=date], .form select, .form textarea { inline-size: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-btn); border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); font-size: 15px; font-weight: 400; }
.form textarea { padding: 12px 14px; min-height: 110px; line-height: 1.8; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--nili); box-shadow: 0 0 0 3px rgba(36, 67, 92, .15); }
.form .row { display: flex; flex-wrap: wrap; gap: 14px; }
.form .row > * { flex: 1 1 220px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; color: var(--ink); line-height: 1.8; cursor: pointer; }
.check input { inline-size: 20px; block-size: 20px; margin-block-start: 4px; accent-color: var(--nili); flex-shrink: 0; }
.form-error { font-size: 13px; color: var(--bad); }
.hp-field { position: absolute; inset-inline-start: -9999px; }

/* gate (protected content) */
.gate { background: var(--surface); border-radius: 18px; padding: clamp(18px, 3vw, 26px); display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; }
.gate-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; }
.gate-text .kicker { display: flex; align-items: center; gap: 6px; }
.gate-form { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.gate-form input { direction: ltr; text-align: start; letter-spacing: .04em; }
.gate-open { background: var(--ok-bg); border-radius: 12px; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; }
.watermark { font-size: 12px; color: var(--sec); }

/* documents list */
.docs { display: flex; flex-direction: column; }
.doc { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; padding-block: 16px; border-block-start: 1px solid var(--line); }
.doc-title { display: flex; flex-direction: column; gap: 2px; }
.doc-title b { font-size: 16px; color: var(--nili); }
.doc-title span { font-size: 12px; font-weight: 600; color: var(--green); }
.doc-title span.pending { color: #8C6420; }

/* figures (images) */
.photo { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.photo img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-img); background: var(--surface); }
.photo figcaption { font-size: 12px; color: var(--sec); line-height: 1.7; }

/* journal */
.issue-cover { background: var(--nili); color: #fff; border-radius: 16px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 320px; }
.issue-cover .no { font-size: 56px; font-weight: 700; line-height: .9; color: var(--sand); }
.issue-cover .title { font-family: var(--head); font-size: 44px; font-weight: 800; line-height: 1.05; }
.issue-cover .theme { color: var(--sand); }
.paper-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.paper-list li { border-block-start: 1px solid var(--line); }
.paper-list a { display: flex; gap: 16px; padding-block: 16px; text-decoration: none; color: var(--ink); }
.paper-list .n { font-weight: 700; color: var(--ochre); min-inline-size: 30px; }
.paper-list .t { display: flex; flex-direction: column; gap: 2px; }
.paper-list .t b { font-family: var(--head); font-size: 22px; font-weight: 700; color: var(--nili); line-height: 1.3; }
.paper-list .t span { font-size: 13px; color: var(--sec); }

/* calls */
.call { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge-open { background: var(--clay); color: #fff; }
.badge-always { background: var(--ok-bg); color: var(--green); }
.badge-closed { background: var(--surface); color: var(--sec); }
.call dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; }
.call dt { color: var(--sec); }
.call dd { margin: 0; font-weight: 600; color: var(--nili); }

/* page content from the block editor */
.page-content { background: #fff; }
.page-content > .wrap { padding-block: 40px 64px; }
.page-content .entry-content { font-size: 17px; }
.alignwide { max-width: var(--wrap); }
.alignfull { inline-size: 100%; }

/* 404 and search */
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: var(--r-btn); border: 1.5px solid var(--line-2); }

@media print {
	.site-header, .site-footer, .share, .related, .menu-toggle { display: none !important; }
	body { background: #fff; }
}
