/* ============================================================
   منصة ظِلّ — Shade Platform · shared stylesheet
   ============================================================ */

:root {
  --deep: #082718;
  --forest: #1B3526;
  --forest-soft: #2E4A38;
  --lime: #A5BE00;
  --lime-dark: #7E9100;
  --sand: #E7E8DA;
  --mint: #EBF2ED;
  --mint-deep: #DCE8DF;
  --white: #FFFFFF;
  --ink: #14241B;
  --ink-2: #44544A;
  --ink-3: #6C7A70;
  --line: #D7DFD9;
  --card: #FFFFFF;
  --bg: #F5F7F4;

  /* priority ramp (score bands: urgent → target met) */
  --p1: #D27066;
  --p2: #EDA260;
  --p3: #F5D552;
  --p4: #A0BB73;
  --p5: #5B6E63;

  --up: #2E7D32;
  --down: #C0392B;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 3px rgba(8, 39, 24, .07), 0 6px 20px rgba(8, 39, 24, .06);
  --shadow-lg: 0 8px 40px rgba(8, 39, 24, .18);
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
table { border-collapse: collapse; }

.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: embed; }

/* ---------- header ---------- */
.site-header {
  background: var(--deep);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1100;
  border-bottom: 3px solid var(--lime);
}
.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  text-decoration: none;
  color: #fff;
}
.brand .brand-pair { display: inline-flex; align-items: center; gap: 10px; }
.brand .brand-icon { height: 42px; width: auto; display: block; }
.brand .brand-wordmark { height: 35px; width: auto; display: block; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand .brand-sub { font-size: 11.5px; color: #B9C9BD; }

.main-nav { display: flex; gap: 4px; margin-inline-start: 12px; }
.main-nav a {
  color: #D7E2D9;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-nav a.active { background: rgba(165,190,0,.16); color: var(--lime); }

.header-meta {
  margin-inline-start: auto;
  font-size: 12px;
  color: #AFC0B4;
  text-align: start;
  white-space: nowrap;
}
.header-meta strong { color: #E4EDE5; font-weight: 500; }
.header-meta .stamp-note { display: block; font-size: 10px; color: #8FA396; margin-top: 1px; }
@media (max-width: 1220px) {
  .header-meta .stamp-note { display: none; }
}

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 7px 12px;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--deep);
  color: #C2D0C5;
  margin-top: 48px;
  padding: 36px 24px 28px;
  font-size: 13.5px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-inner img { height: 64px; margin: 0 auto 14px; opacity: .95; }
.footer-credit { max-width: 720px; margin: 0 auto 14px; line-height: 1.9; }
.footer-small {
  font-size: 11.5px;
  color: #8FA396;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 14px;
  margin-top: 6px;
  line-height: 1.9;
}
.footer-small a { color: #A9BCAE; }

/* ---------- generic ---------- */
.container { max-width: 1360px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--forest);
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 16px;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--mint); border-color: var(--mint-deep); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--deep);
  font-weight: 700;
}
.btn-primary:hover { background: #B4CC14; border-color: #B4CC14; }
.btn-dark { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn-dark:hover { background: var(--forest-soft); border-color: var(--forest-soft); }
.btn svg { flex: none; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- KPI row ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px 12px;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--lime);
  opacity: .85;
}
.kpi .kpi-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.kpi .kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--deep);
  line-height: 1.3;
  margin-top: 2px;
  /* .num flips the div to LTR for digit order; keep the line on the card's
     right edge like the label and note */
  text-align: right;
}
.kpi .kpi-value .unit { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-inline-start: 4px; }
.kpi .kpi-note { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

/* ---------- priority badge ---------- */
.rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 12.5px;
  color: #fff;
}
.rank-chip.q3 { color: #5C4A00; }

/* ---------- scrollbars (webkit) ---------- */
.scrolly::-webkit-scrollbar { width: 9px; height: 9px; }
.scrolly::-webkit-scrollbar-thumb { background: #C3CFC6; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
.scrolly::-webkit-scrollbar-track { background: transparent; }

/* ---------- responsive header ---------- */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  .header-meta {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    margin-inline-start: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.6;
    text-align: center;
    font-size: 10.5px;
    padding: 5px 0 2px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .header-meta br { display: none; }
  .header-meta strong { margin-inline-start: 6px; }
  .header-meta .stamp-note { display: block; font-size: 9.5px; margin-top: 1px; }
}
@media (max-width: 640px) {
  .header-inner { padding: 8px 16px; flex-wrap: wrap; }
  .brand { min-height: 42px; gap: 9px; }
  .brand .brand-pair { gap: 8px; }
  .brand .brand-icon { height: 30px; }
  .brand .brand-wordmark { height: 25px; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0 10px;
    margin: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .container { padding: 0 14px; }
}
