/* The blog: the home page's theme (HOMEPAGE.md), set for long reading. */
:root{
  --ink:#0b3d33; --brand:#136f5c; --mint:#dff3ec; --cream:#f7f4ee; --sand:#e9e2d6;
  --text:#1c2320; --muted:#5b6660; --wa:#25d366;
  --r:24px; --font-ar:'IBM Plex Sans Arabic',system-ui,sans-serif; --font-en:'Inter',system-ui,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{background:var(--cream);color:var(--text);font-family:var(--font-ar);line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
@supports (overflow:clip){body{overflow-x:clip}}
html[dir=ltr] body{font-family:var(--font-en)}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
::selection{background:var(--mint)}

/* header (as on the home page) */
.top{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:24px;height:68px;padding:0 max(16px,calc((100vw - 1200px)/2 + 16px));background:rgba(247,244,238,.94);border-bottom:1px solid rgba(233,226,214,.7);backdrop-filter:saturate(1.4) blur(10px)}
.logo{display:inline-flex;align-items:center;gap:10px}.logoimg{width:34px;height:34px;object-fit:contain;border-radius:9px}
.wordmark{font-family:var(--font-en);font-weight:800;font-size:19px;letter-spacing:-.02em;color:var(--ink);white-space:nowrap}.wordmark b{color:var(--brand)}
.nav{display:flex;gap:26px;margin-inline-start:auto;font-weight:500;color:var(--muted);font-size:15px}
.nav a:hover,.nav a.on{color:var(--ink)}.nav a.on{font-weight:700}
.actions{display:flex;align-items:center;gap:10px}
.lang{font-weight:600;color:var(--muted);padding:8px 10px;border-radius:999px;font-size:14px}.lang:hover{background:var(--mint);color:var(--ink)}
.pill{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;height:44px;padding:0 20px;border-radius:999px;font-weight:600;font-size:15px;white-space:nowrap;transition:background .15s,border-color .15s}
.pill.solid{background:var(--ink);color:#fff}.pill.solid:hover{background:var(--brand)}
.pill.ghost{border:1.5px solid rgba(11,61,51,.25);color:var(--ink);background:rgba(255,255,255,.6)}.pill.ghost:hover{border-color:var(--ink)}
@media(max-width:900px){.nav{display:none}.actions{margin-inline-start:auto;gap:6px}.top{height:60px;gap:8px;padding:0 12px}.wordmark{font-size:16px}.top .pill{height:36px;padding:0 12px;font-size:13px}.lang{padding:6px;font-size:13px}}
@media(max-width:420px){.wordmark{display:none}.logoimg{width:32px;height:32px}.top .pill{height:34px;padding:0 10px}}

/* page */
.wrap{max-width:1100px;margin:0 auto;padding:0 20px}
.crumbs{display:flex;flex-wrap:wrap;gap:8px;font-size:13.5px;color:var(--muted);padding:26px 0 0;max-width:760px;margin:0 auto}
.crumbs a:hover{color:var(--ink)}
.post{max-width:760px;margin:0 auto}
.post-head{padding:22px 0 26px}
.kicker{display:inline-block;font-size:13px;font-weight:700;color:var(--brand);letter-spacing:.02em}
.post h1{font-size:clamp(30px,5vw,46px);line-height:1.15;color:var(--ink);letter-spacing:-.02em;margin:10px 0 16px;font-weight:700}
html[dir=ltr] .post h1{font-weight:800}
.dek{font-size:clamp(17px,2.2vw,20px);color:var(--muted);line-height:1.6}
.meta{display:flex;align-items:center;gap:12px;margin-top:22px;font-size:14px;color:var(--muted);line-height:1.45}
.meta b a{color:var(--ink)}
.av{flex:none;width:42px;height:42px;border-radius:13px;background:var(--ink);color:#fff;font:800 14px var(--font-en);display:grid;place-items:center}
.av.lg{width:56px;height:56px;border-radius:17px;font-size:17px}
.cover{margin:0 0 30px}
.cover img{border-radius:18px;border:1px solid var(--sand);box-shadow:0 20px 50px -28px rgba(11,61,51,.45);background:#fff}
.cover img[height="1688"]{max-height:560px;width:auto;margin:0 auto}
.cover figcaption,.prose figcaption{font-size:13px;color:var(--muted);text-align:center;margin-top:10px}

.toc{background:#fff;border:1px solid var(--sand);border-radius:18px;padding:16px 20px;margin-bottom:34px}
.toc summary{cursor:pointer;font-weight:700;color:var(--ink);list-style:none;display:flex;justify-content:space-between}
.toc summary::-webkit-details-marker{display:none}
.toc summary::after{content:"–";color:var(--brand);font:600 20px/1 var(--font-en)}.toc:not([open]) summary::after{content:"+"}
.toc ol{margin:12px 0 2px;padding-inline-start:22px;display:grid;gap:7px;font-size:15px}
.toc a{color:var(--muted)}.toc a:hover{color:var(--ink);text-decoration:underline}

/* the article itself */
.prose{font-size:18px;line-height:1.8;color:#26302c}
html[dir=rtl] .prose{font-size:18.5px;line-height:1.95}
.prose > *+*{margin-top:1.05em}
.prose h2{font-size:clamp(23px,3.2vw,30px);line-height:1.3;color:var(--ink);margin-top:2.1em;letter-spacing:-.01em;scroll-margin-top:84px}
.prose h3{font-size:20px;line-height:1.4;color:var(--ink);margin-top:1.6em}
.prose h2+p,.prose h3+p{margin-top:.6em}
.prose a{color:var(--brand);text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:3px}
.prose a:hover{color:var(--ink)}
.prose strong{color:var(--ink)}
.prose ul,.prose ol{padding-inline-start:1.3em;display:grid;gap:.55em}
.prose li::marker{color:var(--brand);font-weight:700}
.prose figure{margin:2em 0}
.prose figure img{border-radius:18px;border:1px solid var(--sand);background:#fff;box-shadow:0 20px 50px -28px rgba(11,61,51,.4)}
.prose figure img[height="1688"]{max-height:620px;width:auto;margin:0 auto}
.answer{background:var(--mint);border-radius:18px;padding:20px 22px;border-inline-start:4px solid var(--brand)}
.answer p{font-size:17.5px;line-height:1.75}
.tbl{overflow-x:auto;border-radius:16px;border:1px solid var(--sand);background:#fff;-webkit-overflow-scrolling:touch}
.tbl table{border-collapse:collapse;width:100%;min-width:620px;font-size:15px;line-height:1.5}
.tbl th,.tbl td{padding:12px 14px;text-align:start;vertical-align:top;border-bottom:1px solid var(--sand)}
.tbl thead th{background:#fbf9f5;color:var(--ink);font-size:14px}
.tbl tbody th{color:var(--ink);font-weight:700;width:22%}
.tbl tr:last-child>*{border-bottom:0}

.cta{display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--ink);color:#fff;border-radius:var(--r);padding:26px 28px;margin:2.2em 0}
.cta h3{font-size:21px;line-height:1.35;color:#fff;margin:0}
.cta p{color:rgba(255,255,255,.78);font-size:15.5px;margin-top:6px!important;line-height:1.6}
.cta-b{display:flex;gap:10px;flex-wrap:wrap}
.cta .pill.solid{background:#fff;color:var(--ink)}.cta .pill.solid:hover{background:var(--mint)}
.cta .pill.ghost{color:#fff;border-color:rgba(255,255,255,.4);background:transparent}.cta .pill.ghost:hover{border-color:#fff}
.prose .cta a{text-decoration:none}

.faq-sec{margin-top:3em}
.faq-sec h2{font-size:clamp(23px,3.2vw,30px);color:var(--ink);margin-bottom:16px}
.faq{background:#fff;border-radius:16px;border:1px solid rgba(233,226,214,.9);padding:0 20px;margin-bottom:10px}
.faq summary{list-style:none;cursor:pointer;padding:17px 0;font-weight:700;color:var(--ink);display:flex;justify-content:space-between;gap:14px;font-size:16.5px;line-height:1.5}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";flex:none;font:600 22px/1.1 var(--font-en);color:var(--brand)}
.faq[open] summary::after{content:"–"}
.faq div{padding:0 0 18px;color:var(--muted);font-size:16px;line-height:1.75}

.author{display:flex;gap:16px;align-items:flex-start;background:#fff;border:1px solid var(--sand);border-radius:var(--r);padding:22px;margin-top:10px}
.author b{display:block;font-family:var(--font-en);color:var(--ink);font-size:17px}
.author span:not(.av){display:block;font-size:13.5px;font-weight:600;color:var(--brand)}
.author p{font-size:15px;color:var(--muted);margin:6px 0 8px;line-height:1.6}
.author a{font:600 13px var(--font-en);color:var(--muted)}.author a:hover{color:var(--ink)}
.langnote{margin-top:18px;font-size:14.5px;color:var(--muted)}.langnote span{display:block;font-size:13px;margin-bottom:2px}.langnote a{color:var(--brand);font-weight:600}

/* cards (index and "read next") */
.blog-head{max-width:760px;padding:56px 0 30px}
.blog-head h1{font-size:clamp(34px,6vw,52px);color:var(--ink);letter-spacing:-.02em;line-height:1.1}
.blog-head p{font-size:18px;color:var(--muted);margin-top:12px;line-height:1.65}
.related{max-width:1100px;margin:60px auto 0}
.related h2{font-size:24px;color:var(--ink);margin-bottom:16px}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
.card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--sand);border-radius:var(--r);overflow:hidden;transition:transform .2s,box-shadow .2s}
.card:hover{transform:translateY(-3px);box-shadow:0 24px 50px -30px rgba(11,61,51,.5)}
.card img{aspect-ratio:1200/630;object-fit:cover;width:100%;border-bottom:1px solid var(--sand)}
.card div{padding:20px 22px 22px;display:flex;flex-direction:column;gap:8px;flex:1}
.card h3{font-size:20px;line-height:1.35;color:var(--ink)}
.card p{font-size:15px;color:var(--muted);line-height:1.6;flex:1}
.card .more{font-weight:700;color:var(--brand);font-size:14.5px}
.cards.big{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}

/* footer */
.foot{margin-top:80px;padding:34px max(20px,calc((100vw - 1100px)/2)) calc(26px + env(safe-area-inset-bottom));border-top:1px solid var(--sand);color:var(--muted);font-size:14px}
.frow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}
.frow nav{display:flex;flex-wrap:wrap;gap:8px 20px}.frow nav a:hover{color:var(--ink)}
.foot .legal{margin-top:20px;font-size:12.5px;line-height:1.6}

@media(max-width:700px){
  .wrap{padding:0 16px}
  .crumbs{padding-top:18px}
  .post-head{padding:16px 0 20px}
  .prose{font-size:17px;line-height:1.75}
  html[dir=rtl] .prose{font-size:17.5px;line-height:1.9}
  .cta{flex-direction:column;align-items:stretch;padding:22px 20px}
  .cta-b{flex-direction:column}.cta-b .pill{width:100%}
  .cards,.cards.big{grid-template-columns:1fr}
  .author{padding:18px;gap:14px}.av.lg{width:46px;height:46px;font-size:15px;border-radius:14px}
  .blog-head{padding:34px 0 22px}
  .tbl{margin-inline:-16px;border-radius:0;border-inline:0}
}
