/* ===== جريدة المسار — نظام التصميم ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;500;600;700;800&family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');

:root{
  --paper:#f6f1e6;
  --paper-2:#fffdf7;
  --ink:#17130f;
  --ink-soft:#3c352d;
  --ink-mute:#6d655a;
  --rule:#d9cfbc;
  --rule-strong:#b7a98e;
  --red:#96172c;
  --red-soft:#c0392f;
  --gold:#a97d20;
  --gold-soft:#e8cf9a;
  --navy:#14314d;
  --teal:#0d655c;
  --plum:#5b2a5e;
  --flash:#fff3c9;
  --flash-border:#e0b436;
  --radius:10px;
  --shadow:0 2px 0 rgba(23,19,15,.06), 0 10px 26px -18px rgba(23,19,15,.45);
  --font-head:'Noto Kufi Arabic', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-body:'Noto Naskh Arabic', 'Noto Sans Arabic', Georgia, serif;
  --font-ui:'Noto Sans Arabic', system-ui, sans-serif;
  --maxw:1180px;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--font-body); font-size:18px; line-height:1.9;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(169,125,32,.05), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(20,49,77,.05), transparent 46%);
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%; height:auto; display:block}
a{color:var(--navy); text-decoration:none; border-bottom:1px dotted var(--rule-strong)}
a:hover{color:var(--red); border-bottom-color:var(--red)}
h1,h2,h3,h4,.kicker,.masthead-title,.nav-link,.btn{font-family:var(--font-head)}
p{margin:0 0 1.05rem}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 20px}
.sheet{background:var(--paper-2); border:1px solid var(--rule); box-shadow:var(--shadow);
  border-radius:var(--radius); padding:26px clamp(16px,3vw,40px); margin:22px auto; position:relative}
.sheet::after{content:""; position:absolute; inset:6px; border:1px solid rgba(217,207,188,.6);
  border-radius:6px; pointer-events:none}

/* ===== الترويسة والنافبار ===== */
.topbar{background:var(--ink); color:#f3ece0; font-family:var(--font-ui); font-size:13px}
.topbar .wrap{display:flex; gap:14px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:7px 20px}
.topbar a{color:#f3ece0; border-bottom:none}
.topbar .t-item{display:inline-flex; align-items:center; gap:6px; opacity:.9}
.topbar .t-item i,.topbar .t-item svg{width:15px; height:15px}

.masthead{padding:18px 0 6px; text-align:center; position:relative}
.masthead::before,.masthead::after{content:""; display:block; height:3px; background:var(--ink); margin:0 auto 3px}
.masthead::after{height:1px; background:var(--rule-strong); margin-top:12px}
.mast-row{display:flex; align-items:center; justify-content:center; gap:clamp(10px,3vw,34px); flex-wrap:wrap}
.mast-logo{width:92px; filter:saturate(1.05)}
.mast-text{text-align:center}
.masthead-title{font-size:clamp(34px,6.4vw,68px); font-weight:800; line-height:1.08; margin:0; letter-spacing:-.5px}
.masthead-title .sub-word{color:var(--red); font-size:.62em; display:block; font-weight:600; margin-top:4px}
.masthead-sub{font-family:var(--font-ui); font-size:clamp(12px,1.6vw,15px); color:var(--ink-mute); letter-spacing:.4px; margin-top:6px}
.mast-meta{display:flex; justify-content:center; gap:10px 22px; flex-wrap:wrap; font-family:var(--font-ui);
  font-size:12.5px; color:var(--ink-soft); border-top:1px solid var(--rule); margin-top:12px; padding-top:9px}
.mast-meta span{display:inline-flex; align-items:center; gap:6px}
.mast-meta svg{width:14px;height:14px;color:var(--gold)}

.navbar{position:sticky; top:0; z-index:60; background:rgba(246,241,230,.86); backdrop-filter:blur(10px);
  border-top:1px solid var(--ink); border-bottom:1px solid var(--ink); margin-top:10px}
.nav-list{display:flex; gap:2px; list-style:none; margin:0; padding:0; overflow-x:auto; scrollbar-width:thin}
.nav-link{display:block; padding:11px 13px; font-size:14px; font-weight:500; color:var(--ink); white-space:nowrap;
  border-bottom:3px solid transparent; transition:background .2s ease, color .2s ease, border-color .2s ease}
.nav-link:hover{background:rgba(169,125,32,.13); color:var(--red)}
.nav-link[aria-current="page"]{border-bottom-color:var(--red); color:var(--red); background:rgba(150,23,44,.07)}
.nav-tools{display:flex; gap:8px; align-items:center; padding:0 4px}
.btn{font-family:var(--font-head); font-size:13px; font-weight:600; cursor:pointer; border:1px solid var(--ink);
  background:var(--ink); color:#f6f1e6; padding:8px 14px; border-radius:6px; display:inline-flex; gap:7px; align-items:center;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease}
.btn:hover{transform:translateY(-2px); box-shadow:0 8px 18px -12px rgba(23,19,15,.7)}
.btn.ghost{background:transparent; color:var(--ink)}
.btn.ghost:hover{background:rgba(23,19,15,.07)}
.btn svg{width:15px;height:15px}
.navbar .bar-inner{display:flex; align-items:center; justify-content:space-between; gap:10px}
.progress{height:3px; background:linear-gradient(90deg,var(--red),var(--gold)); width:0}

/* ===== شبكة الصفحة والمقالات ===== */
.page-head{border-bottom:3px double var(--rule-strong); padding-bottom:14px; margin-bottom:20px}
.page-head .kicker{display:inline-flex; align-items:center; gap:8px; font-family:var(--font-ui); font-size:12.5px;
  letter-spacing:1px; text-transform:uppercase; color:var(--red); font-weight:700}
.page-head h2{font-size:clamp(24px,3.6vw,38px); margin:8px 0 6px; line-height:1.25}
.page-head .dek{color:var(--ink-soft); font-size:17px; margin:0; max-width:70ch}

.cols{display:grid; gap:26px}
.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.span-2{grid-column:span 2}
.rule-v{border-inline-end:1px solid var(--rule); padding-inline-end:26px}
.rule-v-start{border-inline-start:1px solid var(--rule); padding-inline-start:26px}

h3.headline{font-size:clamp(19px,2.3vw,25px); line-height:1.4; margin:0 0 8px}
h4.subhead{font-size:18px; margin:22px 0 8px; color:var(--navy)}
h4.subhead::before{content:""; display:inline-block; width:9px; height:9px; background:var(--red); margin-inline-end:8px; transform:rotate(45deg)}
.lead{font-size:20px; line-height:1.85; color:var(--ink)}
.lead::first-letter{font-family:var(--font-head); font-size:3.1em; float:right; line-height:.85; padding-inline-start:12px;
  padding-top:6px; color:var(--red); font-weight:700}
.byline{font-family:var(--font-ui); font-size:12.5px; color:var(--ink-mute); letter-spacing:.3px; margin-bottom:10px;
  display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.byline .dot{width:5px;height:5px;background:var(--gold);border-radius:50%}
.note{font-size:14.5px; color:var(--ink-mute); font-family:var(--font-ui); line-height:1.7}
.divider{height:1px; background:var(--rule); margin:22px 0}
.divider.deco{height:14px; background:none; position:relative}
.divider.deco::before{content:"✦ ✦ ✦"; position:absolute; inset:0; text-align:center; color:var(--rule-strong); font-size:12px; letter-spacing:8px}

/* ===== مكوّنات: فلاشات، اقتباسات، جداول، بطاقات ===== */
.flash{background:var(--flash); border:1px solid var(--flash-border); border-radius:var(--radius); padding:14px 16px 14px 14px;
  position:relative; box-shadow:0 6px 18px -14px rgba(169,125,32,.9); transition:transform .2s ease, box-shadow .2s ease}
.flash:hover{transform:translateY(-3px); box-shadow:0 14px 26px -16px rgba(169,125,32,.95)}
.flash .f-head{display:flex; align-items:center; gap:9px; font-family:var(--font-head); font-weight:700; font-size:15px;
  color:#6b4d05; margin-bottom:6px}
.flash .f-head svg{width:19px;height:19px}
.flash p{margin:0; font-size:16px; line-height:1.75}
.flash .f-tag{position:absolute; inset-inline-start:-1px; top:-1px; background:var(--gold); color:#fff;
  font-family:var(--font-ui); font-size:11px; padding:3px 9px; border-radius:8px 0 8px 0}

.quote{border-top:3px solid var(--ink); border-bottom:1px solid var(--rule-strong); padding:16px 0 12px; margin:20px 0;
  text-align:center}
.quote blockquote{margin:0; font-family:var(--font-head); font-size:clamp(18px,2.2vw,23px); line-height:1.65; color:var(--navy)}
.quote cite{display:block; margin-top:10px; font-family:var(--font-ui); font-size:13px; color:var(--ink-mute); font-style:normal}

.callout{border-radius:var(--radius); padding:15px 17px; margin:18px 0; border:1px solid; font-size:16.5px; line-height:1.8}
.callout strong{font-family:var(--font-head); font-size:15.5px; display:block; margin-bottom:4px}
.callout.tip{background:#eef7f4; border-color:#a9d6cc; color:#0a4b45}
.callout.warn{background:#fdeeee; border-color:#e3b1b1; color:#7c1f1f}
.callout.info{background:#eef3f9; border-color:#b4c9df; color:#123a5e}
.callout.plain{background:rgba(23,19,15,.035); border-color:var(--rule)}

table{width:100%; border-collapse:collapse; font-family:var(--font-ui); font-size:14.5px; margin:14px 0; background:var(--paper-2)}
caption{caption-side:top; text-align:right; font-family:var(--font-head); font-weight:600; font-size:14.5px; padding-bottom:8px; color:var(--navy)}
th,td{border:1px solid var(--rule); padding:9px 11px; text-align:right; vertical-align:top; line-height:1.6}
thead th{background:var(--ink); color:#f6f1e6; font-weight:600; font-size:14px}
tbody tr:nth-child(even){background:rgba(169,125,32,.07)}
tbody tr:hover{background:rgba(20,49,77,.07)}
td.strong{font-weight:700; color:var(--navy); white-space:nowrap}

.cards{display:grid; gap:16px}
.card{background:var(--paper-2); border:1px solid var(--rule); border-inline-start:4px solid var(--teal);
  border-radius:var(--radius); padding:16px 18px; transition:transform .2s ease, box-shadow .2s ease}
.card:hover{transform:translateY(-3px); box-shadow:0 16px 30px -22px rgba(23,19,15,.7)}
.card h4{margin:0 0 6px; font-family:var(--font-head); font-size:17px; color:var(--navy)}
.card p{margin:0; font-size:16px; color:var(--ink-soft)}
.card .meta{font-family:var(--font-ui); font-size:12.5px; color:var(--ink-mute); margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.card.gov{border-inline-start-color:var(--navy)}
.card.pvt{border-inline-start-color:var(--plum)}
.card.med{border-inline-start-color:var(--red)}
.card.tech{border-inline-start-color:var(--teal)}

.badge{display:inline-flex; align-items:center; gap:5px; font-family:var(--font-ui); font-size:11.5px; font-weight:600;
  padding:3px 9px; border-radius:999px; background:rgba(20,49,77,.1); color:var(--navy); border:1px solid rgba(20,49,77,.18)}
.badge.red{background:rgba(150,23,44,.1); color:var(--red); border-color:rgba(150,23,44,.25)}
.badge.gold{background:rgba(169,125,32,.14); color:#6b4d05; border-color:rgba(169,125,32,.3)}
.badge.teal{background:rgba(13,101,92,.12); color:var(--teal); border-color:rgba(13,101,92,.25)}
.badge svg{width:13px;height:13px}

.tabs{display:flex; gap:8px; flex-wrap:wrap; border-bottom:2px solid var(--ink); margin-bottom:18px; padding-bottom:0}
.tab{font-family:var(--font-head); font-size:14.5px; font-weight:600; cursor:pointer; background:none; border:1px solid var(--rule);
  border-bottom:none; padding:10px 16px; border-radius:8px 8px 0 0; color:var(--ink-soft); margin-bottom:-2px;
  display:inline-flex; gap:7px; align-items:center; transition:background .2s ease, color .2s ease, transform .2s ease}
.tab:hover{background:rgba(169,125,32,.12); transform:translateY(-2px)}
.tab[aria-selected="true"]{background:var(--ink); color:#f6f1e6; border-color:var(--ink)}
.tab svg{width:16px;height:16px}
.tabpanel[hidden]{display:none}
.tabpanel{animation:fadeUp .45s ease both}

.acc{border:1px solid var(--rule); border-radius:var(--radius); overflow:hidden; background:var(--paper-2); margin-bottom:10px}
.acc-head{width:100%; text-align:right; background:rgba(23,19,15,.03); border:none; cursor:pointer; padding:13px 16px;
  font-family:var(--font-head); font-size:16px; font-weight:600; color:var(--navy); display:flex; justify-content:space-between;
  align-items:center; gap:12px; transition:background .2s ease}
.acc-head:hover{background:rgba(169,125,32,.13)}
.acc-head svg{width:18px;height:18px; color:var(--red); transition:transform .25s ease; flex:none}
.acc-head[aria-expanded="true"] svg{transform:rotate(180deg)}
.acc-body{padding:0 16px; max-height:0; overflow:hidden; transition:max-height .35s ease, padding .3s ease}
.acc-body.open{padding:4px 16px 14px; max-height:2000px}
.acc-body p:last-child{margin-bottom:0}

.timeline{list-style:none; margin:18px 0; padding:0; position:relative}
.timeline::before{content:""; position:absolute; inset-inline-start:9px; top:6px; bottom:6px; width:2px; background:var(--rule-strong)}
.timeline li{position:relative; padding:0 34px 16px 0; }
.timeline li::before{content:""; position:absolute; inset-inline-start:2px; top:8px; width:16px; height:16px; border-radius:50%;
  background:var(--paper-2); border:3px solid var(--red)}
.timeline .t-when{font-family:var(--font-head); font-weight:700; font-size:15px; color:var(--red)}
.timeline .t-what{font-size:16.5px; color:var(--ink-soft)}

/* ===== اللقاء والحوار ===== */
.qa{display:grid; gap:16px}
.qa-item{display:grid; grid-template-columns:46px 1fr; gap:14px; align-items:start}
.qa-item .avatar{width:46px;height:46px;border-radius:50%; background:var(--navy); color:#f6f1e6; display:grid; place-items:center;
  font-family:var(--font-head); font-weight:700; font-size:15px; border:2px solid var(--gold)}
.qa-item .q{font-family:var(--font-head); font-weight:700; font-size:16.5px; color:var(--navy); margin:0 0 5px}
.qa-item .a{background:rgba(20,49,77,.05); border-inline-start:3px solid var(--gold); border-radius:8px; padding:11px 14px;
  font-size:16.5px; margin:0; transition:background .2s ease}
.qa-item:hover .a{background:rgba(20,49,77,.09)}
.pull-figure{background:var(--ink); color:#f1e9db; border-radius:var(--radius); padding:18px 20px; margin:0 0 18px}
.pull-figure .pf-title{font-family:var(--font-head); font-size:17px; color:var(--gold-soft); margin-bottom:6px}
.pull-figure ul{margin:0; padding-inline-start:20px; font-size:16.5px; line-height:1.85}
.pull-figure ul li::marker{color:var(--gold)}

/* ===== صفحة الغلاف ===== */
.toc{list-style:none; margin:0; padding:0; counter-reset:toc}
.toc li{counter-increment:toc; border-bottom:1px dotted var(--rule-strong); padding:9px 0}
.toc li a{border-bottom:none; display:flex; gap:10px; align-items:baseline; font-size:17px}
.toc li a::before{content:counter(toc,decimal-leading-zero); font-family:var(--font-head); font-weight:700; color:var(--red); font-size:14px}
.toc li a .pg{margin-inline-start:auto; font-family:var(--font-ui); font-size:12.5px; color:var(--ink-mute)}
.toc li a:hover{color:var(--red)}

.stat-strip{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0}
.stat{background:rgba(20,49,77,.06); border:1px solid var(--rule); border-radius:var(--radius); padding:12px; text-align:center}
.stat b{display:block; font-family:var(--font-head); font-size:24px; color:var(--red); line-height:1.2}
.stat span{font-family:var(--font-ui); font-size:12.5px; color:var(--ink-soft)}

.footer{margin-top:26px; border-top:3px double var(--ink); background:rgba(23,19,15,.04); padding:20px 0 26px}
.footer .wrap{display:grid; gap:18px; grid-template-columns:1.4fr 1fr 1fr}
.footer h5{font-family:var(--font-head); font-size:15px; margin:0 0 8px; color:var(--navy)}
.footer p,.footer li{font-family:var(--font-ui); font-size:13.5px; line-height:1.8; color:var(--ink-soft); margin:0}
.footer ul{list-style:none; margin:0; padding:0}
.footer a{border-bottom:none}
.footer a:hover{text-decoration:underline}
.colophon{text-align:center; font-family:var(--font-ui); font-size:12.5px; color:var(--ink-mute);
  border-top:1px solid var(--rule); margin-top:18px; padding-top:12px}

@keyframes fadeUp{from{opacity:0; transform:translateY(14px)} to{opacity:1; transform:none}}
.fade-up{animation:fadeUp .55s ease both}
.fade-up.d1{animation-delay:.08s}.fade-up.d2{animation-delay:.16s}.fade-up.d3{animation-delay:.24s}
.to-top{position:fixed; inset-inline-end:18px; bottom:18px; z-index:70; border-radius:50%; width:44px; height:44px;
  display:grid; place-items:center; background:var(--ink); color:#f6f1e6; border:1px solid var(--gold); cursor:pointer;
  opacity:0; pointer-events:none; transition:opacity .3s ease, transform .3s ease}
.to-top.show{opacity:1; pointer-events:auto}
.to-top:hover{transform:translateY(-3px)}
@media (prefers-reduced-motion:reduce){*{animation:none !important; transition:none !important}}

/* ===== التجاوب والطباعة ===== */
@media (max-width:980px){
  .cols-3,.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer .wrap{grid-template-columns:1fr 1fr}
  .rule-v{border-inline-end:none; padding-inline-end:0}
  .rule-v-start{border-inline-start:none; padding-inline-start:0}
}
@media (max-width:720px){
  body{font-size:17px}
  .cols-2,.cols-3,.cols-4{grid-template-columns:1fr}
  .span-2{grid-column:auto}
  .stat-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer .wrap{grid-template-columns:1fr}
  .lead::first-letter{font-size:2.6em}
  .qa-item{grid-template-columns:1fr; gap:8px}
  .qa-item .avatar{width:38px;height:38px;font-size:13px}
  .mast-logo{width:70px}
}

@media print{
  @page{size:A4; margin:14mm 12mm}
  body{background:#fff; font-size:11.5pt; line-height:1.6}
  .topbar,.navbar,.to-top,.nav-tools,.no-print{display:none !important}
  .sheet{border:none; box-shadow:none; padding:0; margin:0 0 10mm; background:#fff}
  .sheet::after{display:none}
  .wrap{max-width:none; padding:0}
  .tabpanel[hidden]{display:block !important}
  .acc-body{max-height:none !important; padding:4px 16px 14px !important}
  .acc-head{pointer-events:none}
  a{color:#000; border-bottom:none}
  .cols-2,.cols-3,.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  h2,h3{break-after:avoid}
  .card,.flash,.callout,.acc{break-inside:avoid}
  table{break-inside:avoid}
  .page-break{break-after:page}
}

/* أداة مقياس الجاهزية */
.sc-item{display:flex; gap:9px; align-items:flex-start; font-family:var(--font-ui); font-size:15px; line-height:1.65;
  padding:6px 8px; border-radius:8px; cursor:pointer; transition:background .18s ease}
.sc-item:hover{background:rgba(23,19,15,.05)}
.sc-item input{accent-color:#0d655c; width:17px; height:17px; margin-top:4px; flex:none}
