/* ════════════════════════════════════════════════
   IslamophobiaWatch v3 — Shared Styles
   Aesthetic: Archival gravitas, testimonial authority
   Fonts: Playfair Display (display) + Literata (body) + Amiri (Arabic)
   ════════════════════════════════════════════════ */
@import url('/fonts/fonts.css');

:root {
  --ink:    #06070c;
  --ink2:   #0c0e18;
  --ink3:   #131622;
  --gold:   #c8952a;
  --gold2:  #e8b84b;
  --red:    #9e2020;
  --teal:   #1a7a8a;
  --sage:   #4a7a5a;
  --paper:  #e6dfd3;
  --paper2: #b8b0a4;
  --muted:  #8e8e9a;
  --border: rgba(200,149,42,0.15);
  --border2:rgba(200,149,42,0.08);
  --ff-h:   'Playfair Display', Georgia, serif;
  --ff-body:'Literata', Georgia, serif;
  --ff-m:   'Literata', Georgia, serif;
  --ff-ar:  'Amiri', serif;
  --ease:   cubic-bezier(0.25,1,0.5,1);
  --ease2:  cubic-bezier(0.16,1,0.3,1);
}

/* ── Dark theme — selects / dropdowns ─────────── */
select,
select option {
  background: var(--ink2) !important;
  color: var(--paper) !important;
  border-color: var(--border) !important;
}
select:focus { border-color: var(--gold) !important; }

/* ── LIGHT THEME ──────────────────────────────── */
[data-theme="light"] {
  --ink:    #f5f2ed;
  --ink2:   #eae7e0;
  --ink3:   #e0dcd5;
  --gold:   #a07020;
  --gold2:  #8a5e16;
  --red:    #9e2020;
  --teal:   #157080;
  --sage:   #3d6a4c;
  --paper:  #1e1e28;
  --paper2: #44444c;
  --muted:  #5c5c68;
  --border: rgba(0,0,0,0.10);
  --border2:rgba(0,0,0,0.06);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:15px; }

html { overflow-x: hidden; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ff-body);
  line-height: 1.85;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background .35s ease, color .35s ease;
}
body[lang="ar"] { font-family:var(--ff-ar); direction:rtl; }

/* Grain texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.028'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 999;
  mix-blend-mode: overlay;
}
[data-theme="light"] body::before { opacity: 0; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
[data-theme="light"] ::-webkit-scrollbar-track { background:#eae7e0; }

/* ── NAVIGATION ───────────────────────────────── */
.topnav {
  position: fixed; top:0; left:0; right:0; z-index:1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  height: 58px;
  background: rgba(6,7,12,0.97);
  border-bottom: 1px solid var(--border);
  transition: height .3s var(--ease), padding .3s var(--ease), background .35s ease;
  overflow: hidden;
}
.topnav.shrink { height:48px; }

.nav-logo {
  font-family: var(--ff-h);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: var(--muted); font-size:11px; font-family:var(--ff-m); margin-left:3px; vertical-align:middle; }

.nav-links {
  display: flex; align-items: center; gap: 2px;
  list-style: none;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 1px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); background:rgba(200,149,42,0.07); }

/* Turkish: longer words still need slightly tighter padding than the shared baseline */
:lang(tr) .nav-links a { padding: 5px 6px; }

/* Arabic: keep nav bar in LTR order — RTL on <html> would flip logo/buttons */
[dir="rtl"] .topnav { direction: ltr; }
[dir="rtl"] .nav-links a { letter-spacing: 0; }

.nav-right { display:flex; align-items:center; gap:5px; flex-shrink:0; }

.lang-bar { display:flex; gap:2px; }
.lb {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 3px 6px;
  font-family: var(--ff-m);
  font-size: 10px;
  cursor: pointer;
  border-radius: 1px;
  transition: all .2s;
  letter-spacing: .05em;
}
.lb.on, .lb:hover { background:var(--gold); color:#fff; border-color:var(--gold); }
[data-theme="light"] .lb.on, [data-theme="light"] .lb:hover { color:#fff; background:#7a5518; border-color:#7a5518; }

.live-pill {
  display: inline-flex; align-items:center; gap:4px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #22c55e;
}
.live-dot { width:5px; height:5px; background:#22c55e; border-radius:50%; animation:blink 1.5s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:.2;} }

/* ── LAYOUT ───────────────────────────────────── */
.page-body { padding-top: 58px; }
.wrap { max-width: 1400px; margin:0 auto; padding: 0 52px; }
.wrap-narrow { max-width: 960px; margin:0 auto; padding: 0 52px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.divl { height:1px; background:linear-gradient(90deg,transparent,var(--border),transparent); }

/* ── TYPOGRAPHY ───────────────────────────────── */
.sec-label {
  font-family: var(--ff-m);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sec-label::before { content:''; width:24px; height:1px; background:var(--gold); }

.sec-title {
  font-family: var(--ff-h);
  font-size: clamp(28px,4vw,52px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.sec-title em { font-style:italic; color:var(--gold); }

.sec-sub {
  color: var(--paper2);
  font-size: 14px;
  max-width: 62ch;
  line-height: 1.9;
}

/* ── CARDS ────────────────────────────────────── */
.card {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.card::before { display: none; }
.card-p { padding: 28px; }

.card-sm {
  background: rgba(255,255,255,.014);
  border: 1px solid var(--border2);
  border-radius: 2px;
  padding: 18px 22px;
  transition: all .3s var(--ease);
}
.card-sm:hover {
  border-color: rgba(200,149,42,.4);
  background: rgba(200,149,42,.03);
}

/* ── BUTTONS ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items:center; gap:7px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  padding: 10px 22px;
  font-family: var(--ff-m);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: .10em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .22s;
  white-space: nowrap;
}
.btn:hover { background:var(--gold2); box-shadow:0 4px 16px rgba(200,149,42,.15); }
.btn:disabled { opacity:.4; cursor:not-allowed; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-outline:hover { background:rgba(200,149,42,.07); color:var(--gold); border-color:var(--gold); }

.pill-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 14px;
  font-family: var(--ff-m);
  font-size: 12px;
  cursor: pointer;
  border-radius: 20px;
  transition: all .2s;
  letter-spacing: .06em;
}
.pill-btn.on, .pill-btn:hover { background:rgba(200,149,42,.1); color:var(--gold); border-color:var(--gold); }

.tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 14px;
  font-family: var(--ff-m);
  font-size: 12px;
  cursor: pointer;
  border-radius: 1px;
  transition: all .2s;
  letter-spacing: .08em;
}
.tab-btn.on, .tab-btn:hover { background:rgba(200,149,42,.1); color:var(--gold); border-color:var(--gold); }

/* ── STATUS ───────────────────────────────────── */
.status-row {
  display: flex; align-items:center; gap:18px; flex-wrap:wrap;
  padding: 10px 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
}
.src-dot { width:6px; height:6px; border-radius:50%; background:var(--muted); display:inline-block; }
.src-dot.on  { background:#22c55e; animation:blink 1.5s infinite; }
.src-dot.off { background:#ef4444; }

/* ── NEWS CARDS ───────────────────────────────── */
.news-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(380px,1fr)); gap:22px; }
@media (max-width: 480px) { .news-grid { grid-template-columns:1fr; } }

.nc {
  background: rgba(255,255,255,.018);
  border: 1px solid var(--border2);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  transition: all .3s var(--ease);
  overflow: hidden;
}
.nc:hover { border-color:rgba(200,149,42,.4); background:rgba(200,149,42,.025); box-shadow: 0 4px 16px rgba(0,0,0,.12); }

.nc-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: rgba(200,149,42,.04);
  position: relative;
  flex-shrink: 0;
}
.nc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.nc:hover .nc-img-wrap img { transform: scale(1.04); }
.nc-img-wrap .nc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(6,7,12,.85);
  border: none;
}
.nc-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, rgba(200,149,42,.06) 0%, rgba(200,149,42,.12) 50%, rgba(6,7,12,.3) 100%);
}
.nc-img-fallback-wrap {
  width: 100%;
  height: 100%;
}
.nc-img-placeholder span:first-child {
  font-size: 42px;
  color: rgba(200,149,42,.25);
  line-height: 1;
}
.nc-source-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
}
.nc-source-logo-fallback {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(200,149,42,.08);
  box-shadow: inset 0 0 0 1px rgba(200,149,42,.12);
}
.nc-source-logo-fallback span {
  font-size: 42px;
  color: rgba(200,149,42,.25);
  line-height: 1;
}
.nc-ph-source {
  font-family: var(--ff-m);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(200,149,42,.3);
}

.nc-body { padding: 20px 22px 18px; display:flex; flex-direction:column; flex:1; }

/* Intelligence strip — [CATEGORY] [COUNTRY] [PRIORITY] */
.nc-intel-strip { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.nc-intel-cat { font-family:var(--ff-m); font-size:11px; letter-spacing:.15em; text-transform:uppercase; padding:2px 8px; border-radius:2px; border:1px solid; white-space:nowrap; font-weight:600; }
.nc-intel-country { font-size:12px; color:var(--gold); font-weight:600; white-space:nowrap; }
.nc-intel-group { font-size:12px; color:#ef4444; font-weight:600; white-space:nowrap; padding:1px 6px; border:1px solid rgba(239,68,68,.35); border-radius:2px; }
.nc-intel-pri { font-family:var(--ff-m); font-size:11px; letter-spacing:.1em; text-transform:uppercase; padding:2px 6px; border-radius:2px; font-weight:700; }
.nc-intel-pri.pri-high { background:rgba(239,68,68,.15); color:#ef4444; }
.nc-intel-pri.pri-med { background:rgba(245,158,11,.12); color:#f59e0b; }
.nc-intel-date { font-size:12px; color:var(--muted); margin-left:auto; }

/* Legacy compat */
.nc-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:8px; }
.nc-badge { font-family:var(--ff-m); font-size:11px; letter-spacing:.18em; text-transform:uppercase; padding:3px 9px; border-radius:16px; border:1px solid currentColor; white-space:nowrap; flex-shrink:0; }
.nc-meta { text-align:right; flex-shrink:0; }
.nc-date  { font-size:12px; color:var(--muted); display:block; }
.nc-src   { font-family:var(--ff-m); font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); display:block; margin-top:1px; }
.nc-region{ font-family:var(--ff-m); font-size:11px; padding:1px 7px; border-radius:10px; background:rgba(255,255,255,.04); color:var(--muted); display:inline-block; margin-top:2px; }


.nc-title { font-family:var(--ff-h); font-size:18px; font-weight:700; line-height:1.4; margin-bottom:10px; color:var(--paper); }
.nc-summary { font-family:var(--ff-body); font-size:14px; line-height:1.85; color:var(--paper2); flex:1; }
.nc-origin { font-size:11px; color:var(--muted); margin-bottom:8px; }
.nc-origin strong { color:var(--gold); font-weight:600; }

/* Source proof links */
.nc-sources { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.nc-sources a {
  font-family:var(--ff-m);
  font-size:12px;
  color:var(--gold);
  text-decoration:none;
  padding:3px 10px;
  border-radius:12px;
  background:rgba(200,149,42,.08);
  border:1px solid rgba(200,149,42,.15);
  transition: all .2s;
  white-space:nowrap;
}
.nc-sources a:hover { background:rgba(200,149,42,.18); color:var(--paper); }
.nc-sources a::before { content:''; display:inline-block; width:4px; height:4px; border-radius:50%; background:currentColor; margin-right:6px; vertical-align:middle; }

.nc-footer { display:flex; align-items:center; justify-content:space-between; margin-top:14px; padding-top:12px; border-top:1px solid rgba(255,255,255,.05); gap:8px; }
.nc-verified { font-family:var(--ff-m); display:inline-flex; align-items:center; gap:5px; font-size:11px; color:var(--sage); letter-spacing:.1em; text-transform:uppercase; }
.nc-ai       { font-family:var(--ff-m); display:inline-flex; align-items:center; gap:5px; font-size:11px; color:var(--teal); letter-spacing:.1em; text-transform:uppercase; }
.nc-ai-dot   { width:5px; height:5px; background:var(--teal); border-radius:50%; animation:blink 2s infinite; }

.nc-link, .nc-dossier-btn {
  font-family:var(--ff-m);
  font-size: 12px; color:var(--gold); text-decoration:none;
  letter-spacing: .08em;
  display: inline-flex; align-items:center; gap:4px;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(200,149,42,.08);
  transition: all .2s;
  border: none; cursor: pointer;
}
.nc-link:hover, .nc-dossier-btn:hover { color:var(--paper); background:rgba(200,149,42,.18); }
.nc-link::after { content:'↗'; }

/* Verified badge */
.v-badge {
  display: inline-flex; align-items:center; gap:4px;
  font-size: 11px; letter-spacing:.15em; text-transform:uppercase;
  color: var(--sage);
  border: 1px solid rgba(74,122,90,.3);
  border-radius: 10px;
  padding: 2px 7px;
}

/* ── SKELETON LOADER ──────────────────────────── */
.skel {
  background: linear-gradient(90deg,rgba(255,255,255,.04) 25%,rgba(255,255,255,.08) 50%,rgba(255,255,255,.04) 75%);
  background-size: 200% 100%;
  animation: shim 1.5s infinite;
  border-radius: 2px;
}
@keyframes shim { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

/* ── PAGINATION ───────────────────────────────── */
.pag { display:flex; align-items:center; gap:6px; margin-top:28px; justify-content:center; flex-wrap:wrap; }
.pg-b {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 13px;
  font-family: var(--ff-m);
  font-size: 12px;
  cursor: pointer;
  border-radius: 1px;
  transition: all .2s;
}
.pg-b:hover,.pg-b.on { background:rgba(200,149,42,.1); color:var(--gold); border-color:var(--gold); }
.pg-b:disabled { opacity:.3; cursor:not-allowed; }
.pg-info { font-size:12px; color:var(--muted); padding:0 6px; }

/* ── SOURCE GRID ──────────────────────────────── */
.src-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(188px,1fr)); gap:10px; }
.src-item {
  display: flex; align-items:center; gap:10px;
  padding: 8px 12px;
  background: rgba(255,255,255,.018);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 2px;
}
.src-flag { font-size:16px; flex-shrink:0; }
.src-info { flex:1; min-width:0; }
.src-name   { font-size:11px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.src-region { font-size:11px; color:var(--muted); letter-spacing:.1em; }
.src-color  { width:5px; height:5px; border-radius:50%; flex-shrink:0; }

/* ── KPI STRIP ────────────────────────────────── */
.kpi-strip { display:flex; gap:52px; flex-wrap:wrap; }
.kpi-n { font-family:var(--ff-h); font-size:38px; font-weight:700; color:var(--gold); display:block; line-height:1; }
.kpi-l { font-size:12px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); margin-top:5px; }

/* ── FOOTER ───────────────────────────────────── */
footer {
  padding: 42px 52px 32px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction:column; align-items:center; text-align:center; gap:14px;
}
.ft-logo { font-family:var(--ff-h); font-size:22px; font-weight:700; color:var(--gold); }
.ft-nav { display:flex; gap:6px; flex-wrap:wrap; justify-content:center; }
.ft-nav a { font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); text-decoration:none; padding:2px 10px; border:1px solid var(--border); border-radius:10px; transition:color .2s; }
.ft-nav a:hover { color:var(--gold); }
.ft-disc { font-size:13px; color:var(--muted); max-width:65ch; line-height:1.8; }
.ft-legal { display:flex; gap:16px; flex-wrap:wrap; justify-content:center; margin-top:4px; }
.ft-legal a { font-size:12px; color:var(--muted); text-decoration:none; transition:color .2s; }
.ft-legal a:hover { color:var(--gold); text-decoration:underline; }
.ft-credit { font-size:12px; color:var(--muted); letter-spacing:.12em; opacity:.6; }

/* ── ANIMATION UTILITY ────────────────────────── */
.fup { opacity:0; transform:translateY(26px); }
/* If a parser-blocking script or browser extension delays DOMContentLoaded,
   never leave real content invisible forever. Normal JS reveal removes this
   fallback by adding .fin before the four-second deadline. */
@keyframes iwFailSafeReveal { to { opacity:1; transform:translateY(0); } }
.fup:not(.fin) { animation:iwFailSafeReveal .01s linear 4s forwards; }
.fin { opacity:1 !important; transform:translateY(0) !important; transition:opacity .7s var(--ease), transform .7s var(--ease); }

/* ── HAMBURGER / MOBILE NAV ───────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px; height: 16px;
  background: transparent;
  border: none; cursor: pointer; padding: 0; flex-shrink: 0;
}
.hamburger-btn span {
  display: block; width: 100%; height: 2px;
  background: var(--gold); border-radius: 1px;
  transition: all .25s ease;
}
.hamburger-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-panel {
  display: none;
  position: fixed; top: 58px; left: 0; right: 0; z-index: 999;
  background: rgba(6,7,12,0.98);
  border-bottom: 1px solid var(--border);
  padding: 4px 20px 20px;
  flex-direction: column;
}
.mobile-nav-panel.open { display: flex; }
.mobile-nav-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mobile-nav-panel ul li a {
  display: block; padding: 13px 0;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.05); transition: color .2s;
}
.mobile-nav-panel ul li:last-child a { border-bottom: none; }
.mobile-nav-panel ul li a:hover,
.mobile-nav-panel ul li a.active { color: var(--gold); }
.mobile-nav-lang {
  display: flex; gap: 8px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.05);
}
[data-theme="light"] .mobile-nav-panel { background: rgba(248,246,240,0.98); }

/* ── RESPONSIVE ───────────────────────────────── */
@media(max-width:1300px) {
  .nav-links a { font-size: 10px; padding: 4px 7px; letter-spacing: .06em; }
  .nav-right { gap: 5px; }
  .live-pill { display: none; }
}

@media(max-width:1100px) {
  .topnav { padding: 0 16px; }
  .nav-links a { font-size: 9px; padding: 4px 5px; letter-spacing: .04em; }
  .lang-bar { display: none; }
  .nav-logo { font-size: 13px; }
  .nav-logo span { display: none; }
}

@media(max-width:900px) {
  .hamburger-btn { display: flex; }
  .nav-links { display: none; }
}

@media(max-width:768px) {
  .topnav { padding: 0 16px; }
  .wrap, .wrap-narrow { padding: 0 16px; }
  .section { padding: 52px 0; }
  .section-sm { padding: 36px 0; }
  .kpi-strip { gap: 20px; flex-wrap: wrap; }
  .kpi-n { font-size: 26px; }
  .news-grid { grid-template-columns: 1fr; }
  .sec-title { font-size: clamp(22px, 7vw, 32px); }
  .src-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  footer { padding: 28px 16px; }
  .ft-nav { gap: 4px; }
  .card-p { padding: 20px; }
  .status-row { padding: 10px 12px; gap: 12px; }
}

@media(max-width:480px) {
  .topnav { padding: 0 12px; }
  .wrap, .wrap-narrow { padding: 0 12px; }
  .section { padding: 36px 0; }
  .kpi-strip { gap: 16px; }
  .kpi-n { font-size: 22px; }
  .sec-title { font-size: clamp(20px, 8vw, 26px); }
  .btn { padding: 9px 14px; font-size: 10px; }
  .card-p { padding: 14px; }
  .news-grid { gap: 14px; }
  .pag { gap: 4px; }
  .pg-b { padding: 6px 10px; }
}

/* ── CHART OVERRIDES ──────────────────────────── */
.chart-wrap { position:relative; }
.chart-ctrl { display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; align-items:center; }
.time-toggle { display:inline-flex; gap:0; border:1px solid rgba(200,149,42,.25); border-radius:2px; overflow:hidden; }
.tt-btn { font-family:var(--ff-m); font-size:12px; padding:8px 20px; border:none; cursor:pointer; background:transparent; color:var(--paper); transition:all .2s; letter-spacing:.04em; border-right:1px solid rgba(200,149,42,.15); }
.tt-btn:last-child { border-right:none; }
.tt-btn:hover { background:rgba(200,149,42,.1); }
.tt-btn.active { background:var(--gold); color:#111; font-weight:600; }
.chart-scroll { overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; padding-bottom:8px; }
.chart-scroll::-webkit-scrollbar { height:6px; }
.chart-scroll::-webkit-scrollbar-track { background:rgba(200,149,42,.06); border-radius:3px; }
.chart-scroll::-webkit-scrollbar-thumb { background:rgba(200,149,42,.3); border-radius:3px; }
.chart-scroll::-webkit-scrollbar-thumb:hover { background:rgba(200,149,42,.5); }

/* ── CATEGORY COLORS ──────────────────────────── */
.c-hate-crime    { color:#ef4444; }
.c-media         { color:#f59e0b; }
.c-political     { color:#8b5cf6; }
.c-discrimination{ color:#c8952a; }
.c-online        { color:#06b6d4; }
.c-institutional { color:#22c55e; }

.bg-hate-crime    { background:#ef4444; }
.bg-media         { background:#f59e0b; }
.bg-political     { background:#8b5cf6; }
.bg-discrimination{ background:#c8952a; }
.bg-online        { background:#06b6d4; }
.bg-institutional { background:#22c55e; }

/* ── THEME TOGGLE ────────────────────────────── */
.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  border-radius: 50%;
  transition: all .25s ease;
  padding: 0;
}
.theme-btn:hover { border-color:var(--gold); color:var(--gold); background:rgba(200,149,42,.08); }

/* ── Theme toggle button ─────────────────────────── */
.nav-search-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-search-icon:visited { color: var(--gold); }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: all .25s ease;
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover { border-color:var(--gold); color:var(--gold); background:rgba(200,149,42,.06); }

/* ── LIGHT THEME — comprehensive overrides ──── */
[data-theme="light"] .topnav {
  background: rgba(245,242,237,0.97);
  border-bottom-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .topnav.shrink {
  background: rgba(245,242,237,0.98);
}
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
  background: rgba(160,112,32,0.08);
}
[data-theme="light"] .theme-toggle { border-color:rgba(0,0,0,.15); color:#666; }
[data-theme="light"] .theme-toggle:hover { border-color:var(--gold); color:var(--gold); }

[data-theme="light"] .card {
  background: rgba(0,0,0,.018);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .card-sm {
  background: rgba(0,0,0,.015);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .card-sm:hover {
  background: rgba(160,112,32,.04);
  border-color: rgba(160,112,32,.3);
}

[data-theme="light"] .nc {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
[data-theme="light"] .nc:hover {
  border-color: rgba(160,112,32,.35);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
[data-theme="light"] .nc-title { color: #1a1a2e; }
[data-theme="light"] .nc-summary { color: #444; }
[data-theme="light"] .nc-date { color: #777; }
[data-theme="light"] .nc-src { color: #888; }
[data-theme="light"] .nc-footer { border-top-color: rgba(0,0,0,.07); }
[data-theme="light"] .nc-img-wrap { background: rgba(0,0,0,.03); }
[data-theme="light"] .nc-img-wrap .nc-badge { background: rgba(255,255,255,.85); }
[data-theme="light"] .nc-img-placeholder { background: linear-gradient(145deg, rgba(160,112,32,.04) 0%, rgba(160,112,32,.08) 50%, rgba(0,0,0,.03) 100%); }

/* ── RTL (Arabic) news card layout ─────────────── */
[dir="rtl"] .nc-title,
[dir="rtl"] .nc-summary { text-align: right; direction: rtl; }
[dir="rtl"] .nc-top { flex-direction: row-reverse; }
[dir="rtl"] .nc-meta { text-align: left; }
[dir="rtl"] .nc-footer { flex-direction: row-reverse; }
[dir="rtl"] .nc-intel-row { flex-direction: row-reverse; }
[data-theme="light"] .nc-img-placeholder span:first-child { color: rgba(160,112,32,.2); }
[data-theme="light"] .nc-ph-source { color: rgba(160,112,32,.25); }
[data-theme="light"] .nc-sources a { background:rgba(160,112,32,.06); border-color:rgba(160,112,32,.15); color:#8a5e16; }
[data-theme="light"] .nc-sources a:hover { background:rgba(160,112,32,.14); color:#1a1a2e; }
[data-theme="light"] .nc-link, [data-theme="light"] .nc-dossier-btn { background:rgba(160,112,32,.06); color:#8a5e16; }
[data-theme="light"] .nc-link:hover, [data-theme="light"] .nc-dossier-btn:hover { background:rgba(160,112,32,.14); color:#1a1a2e; }
[data-theme="light"] .nc-region { background:rgba(0,0,0,.05); color:#777; }

[data-theme="light"] .status-row {
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
}

[data-theme="light"] .btn { color: #fff; background: #7a5518; }
[data-theme="light"] .btn:hover { color: #fff; background: #5c3f10; }
[data-theme="light"] .btn-outline { color: #555; background: transparent; border-color: rgba(0,0,0,.15); }
[data-theme="light"] .btn-outline:hover { color: #7a5518; border-color: #7a5518; background: rgba(160,112,32,.05); }

[data-theme="light"] .skel {
  background: linear-gradient(90deg,rgba(0,0,0,.04) 25%,rgba(0,0,0,.07) 50%,rgba(0,0,0,.04) 75%);
  background-size: 200% 100%;
}

[data-theme="light"] .divl {
  background: linear-gradient(90deg,transparent,rgba(0,0,0,.08),transparent);
}

[data-theme="light"] footer {
  border-top-color: rgba(0,0,0,.06);
}

[data-theme="light"] .live-pill {
  background: rgba(34,197,94,0.06);
  border-color: rgba(34,197,94,0.2);
}

[data-theme="light"] .map-container { background:#ccc8de !important; transition:background .35s; }
[data-theme="light"] .map-tip { background:rgba(245,242,237,.98); border-color:rgba(0,0,0,.15); }
[data-theme="light"] .rg-card { background:#fff; border-color:rgba(0,0,0,.08); }
[data-theme="light"] .rg-card:hover { border-color:var(--gold); background:rgba(160,112,32,.04); }
[data-theme="light"] .tl-content { background:#fff; border-color:rgba(0,0,0,.08); }
[data-theme="light"] .tl-content:hover { border-color:var(--gold); }
[data-theme="light"] .ev-card { background:#fff; border-color:rgba(0,0,0,.08); }
[data-theme="light"] .cat-card { background:#fff; border-color:rgba(0,0,0,.08); }
[data-theme="light"] .src-item { background:rgba(0,0,0,.02); border-color:rgba(0,0,0,.07); }
[data-theme="light"] .src-entry { background:#fff; border-color:rgba(0,0,0,.07); }
[data-theme="light"] .src-entry:hover { background:rgba(160,112,32,.03); }
[data-theme="light"] .meth-box { background:rgba(160,112,32,.05); border-color:rgba(160,112,32,.2); }
[data-theme="light"] .warning-box { background:rgba(239,68,68,.03); border-color:rgba(239,68,68,.2); }
[data-theme="light"] .data-note,[data-theme="light"] .data-note-sm { background:rgba(160,112,32,.04); border-color:rgba(160,112,32,.15); }
[data-theme="light"] table td,[data-theme="light"] table th { border-color:rgba(0,0,0,.06) !important; }
[data-theme="light"] table tr:nth-child(even) td { background:rgba(0,0,0,.018); }
[data-theme="light"] .pg-b { border-color:rgba(0,0,0,.1); color:#555; }
[data-theme="light"] .analyze-wrap,[data-theme="light"] .trans-bar { background:rgba(160,112,32,.05); border-color:rgba(160,112,32,.2); }

/* Light theme — forms, inputs, and general text */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  color: #1a1a2e !important;
  background: rgba(0,0,0,.03) !important;
  border-color: rgba(0,0,0,.12) !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: #999 !important; }
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus { border-color: #7a5518 !important; }
[data-theme="light"] label { color: #555 !important; }
[data-theme="light"] .sec-sub { color: var(--paper2); }
[data-theme="light"] .sec-label { color: #7a5518; }
[data-theme="light"] .filter-btn { background: #7a5518; color: #fff; }
[data-theme="light"] .filter-btn:hover { background: #5c3f10; }
[data-theme="light"] .filter-reset { color: #555; border-color: rgba(0,0,0,.12); }
[data-theme="light"] .filter-reset:hover { color: #7a5518; border-color: #7a5518; }
[data-theme="light"] .inc-stat { background: rgba(160,112,32,.05); border-color: rgba(160,112,32,.12); }
[data-theme="light"] .inc-table th { color: #7a5518; border-bottom-color: rgba(160,112,32,.2); }
[data-theme="light"] .inc-table td { color: #333; border-bottom-color: rgba(0,0,0,.06); }
[data-theme="light"] .chart-card { background: rgba(0,0,0,.02); border-color: rgba(0,0,0,.06); }
[data-theme="light"] .chart-card h3 { color: #333; }
[data-theme="light"] .time-toggle { border-color: rgba(160,112,32,.25); }
[data-theme="light"] .tt-btn { color: #333; border-right-color: rgba(160,112,32,.15); }
[data-theme="light"] .tt-btn:hover { background: rgba(160,112,32,.08); }
[data-theme="light"] .tt-btn.active { background: #7a5518; color: #fff; }
[data-theme="light"] .result-count { color: #777; }
[data-theme="light"] .faq-q { color: #1a1a2e; }
[data-theme="light"] .faq-a { color: #444; }
[data-theme="light"] strong { color: #1a1a2e; }
[data-theme="light"] .kpi-num, [data-theme="light"] .inc-stat .num { color: #7a5518; }

/* ── Section Navigation Sidebar ── */
.section-nav-wrap {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  align-items: stretch;
  transition: transform .3s ease;
}
.section-nav-wrap.collapsed { transform: translateY(-50%) translateX(100%); }
.section-nav-wrap.collapsed .sn-toggle { transform: translateX(-100%); opacity: 1; }
[dir="rtl"] .section-nav-wrap.collapsed { transform: translateY(-50%) translateX(-100%); }
[dir="rtl"] .section-nav-wrap.collapsed .sn-toggle { transform: translateX(100%); }

.sn-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-100%, -50%);
  width: 28px;
  height: 48px;
  background: var(--ink);
  border: 1px solid rgba(200,149,42,.15);
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: var(--gold);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  padding: 0;
}
.sn-toggle:hover { background: rgba(200,149,42,.12); }

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--ink);
  border-left: 1px solid rgba(200,149,42,.12);
  border-top: 1px solid rgba(200,149,42,.08);
  border-bottom: 1px solid rgba(200,149,42,.08);
  border-radius: 8px 0 0 8px;
  padding: 12px 0;
  width: 200px;
}
.sn-link {
  font-size: 11px;
  font-family: var(--ff-body), serif;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 16px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-wrap: break-word;
  transition: all .2s ease;
  line-height: 1.45;
}
/* RTL (Arabic) adjustments */
[dir="rtl"] .section-nav { border-left: none; border-right: 1px solid rgba(200,149,42,.12); border-radius: 0 8px 8px 0; }
[dir="rtl"] .section-nav-wrap { right: auto; left: 0; }
[dir="rtl"] .sn-link { text-align: right; padding: 7px 16px; direction: rtl; }
[dir="rtl"] .sn-link.active { background: rgba(200,149,42,.08); }
[dir="rtl"] .sn-toggle { left: auto; right: 0; transform: translate(100%, -50%); border-radius: 0 6px 6px 0; border-left: none; border-right: 1px solid rgba(200,149,42,.15); }
.sn-link:hover {
  color: var(--paper);
  background: rgba(200,149,42,.06);
}
.sn-link.active {
  color: var(--gold);
  font-weight: 600;
  background: rgba(200,149,42,.08);
}
[data-theme="light"] .section-nav {
  background: rgba(255,255,255,.95);
  border-left-color: rgba(160,112,32,.15);
}
[data-theme="light"] .sn-toggle {
  background: rgba(255,255,255,.95);
  border-color: rgba(160,112,32,.2);
}
[data-theme="light"] .sn-link:hover { background: rgba(160,112,32,.06); }
[data-theme="light"] .sn-link.active { background: rgba(160,112,32,.08); }

/* Data disclaimer, confidence, and source tier — both themes */
.data-disclaimer-bar { font-family: var(--ff-m); }
[data-theme="light"] .data-disclaimer-bar { background: rgba(0,0,0,.02); border-color: rgba(0,0,0,.06); color: #777; }
.conf-high { color: #22c55e; }
.conf-med { color: #eab308; }
.conf-low { color: #ef4444; }
[data-theme="light"] .conf-high { color: #16a34a; }
[data-theme="light"] .conf-med { color: #a16207; }
[data-theme="light"] .conf-low { color: #dc2626; }

/* Pill-btn light theme */
[data-theme="light"] .pill-btn { border-color: rgba(0,0,0,.12); color: #666; }
[data-theme="light"] .pill-btn.on, [data-theme="light"] .pill-btn:hover { background: rgba(122,85,24,.08); color: #7a5518; border-color: #7a5518; }

[data-theme="light"] .nc-origin strong { color: #7a5518; }
[data-theme="light"] .nc-origin { color: #777; }

@media (max-width: 1280px) { .section-nav-wrap { display: none; } }

@media (max-width: 768px) {
  .chat-fab:not(.open) {
    background: var(--gold, #c8952a) !important;
    font-size: 0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.25) !important;
  }
  .chat-fab:not(.open)::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  .chat-fab.open {
    font-size: 20px !important;
  }
}
