/* Tsleem — guides & articles.
 *
 * THE SITE'S FIRST SHARED STYLESHEET, and the reason is arithmetic: every other page inlines its
 * own ~70-line copy of the same tokens, header, footer and type rules, which was fine for eight
 * pages and is not fine for twenty-two more. Everything here is language-neutral and
 * direction-neutral — logical properties throughout (inline-start/end, margin-inline), never left
 * or right — so one file serves /blog/ and /ar/blog/ alike.
 *
 * WHAT IS DELIBERATELY NOT HERE: @font-face. The two subsets are selected per language by their
 * unicode-range, and a `src: url(...)` inside a stylesheet resolves against the STYLESHEET, not
 * the document — so putting both here would make an English page download the Arabic subset for
 * its Latin characters, or the reverse, depending on declaration order. Each page therefore
 * carries its own three-line @font-face block, which also keeps today's one-font-per-page
 * behaviour exactly as it is.
 *
 * Tokens are copied verbatim from index.html.tpl. If a token changes there, change it here.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

:root{
  --navy:#233746; --navy-700:#1a2a35; --navy-900:#16222b;
  --orange:#FA4D09; --orange-600:#d93f05; --orange-700:#c23704;
  --ink:#1b2730; --muted:#5b6b78; --line:#e4e9ed; --line-soft:#eef2f5;
  --bg:#ffffff; --bg-soft:#f6f8fa;
  --r:16px; --r-sm:10px; --max:1120px; --measure:72ch;
  --sh-sm:0 1px 2px rgba(16,32,44,.06), 0 2px 8px rgba(16,32,44,.04);
  --sh-md:0 8px 28px rgba(16,32,44,.10);
}

html{ -webkit-text-size-adjust:100%; color-scheme:light; scroll-behavior:smooth }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto } }

body{
  font-family:'Cairo',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--ink); background:var(--bg); line-height:1.75; font-size:17px;
  -webkit-font-smoothing:antialiased;
}
a{ color:var(--orange-600); text-decoration:underline; text-underline-offset:2px }
a:hover{ color:var(--orange) }
img{ max-width:100%; height:auto }

.wrap{ max-width:var(--max); margin:0 auto; padding:0 24px }
.skip{ position:absolute; inset-inline-start:-9999px; top:0; background:#fff; color:var(--navy);
       padding:12px 18px; border-radius:0 0 var(--r-sm) 0; z-index:200 }
.skip:focus{ inset-inline-start:0 }

/* ---- Header ------------------------------------------------------------------------------ */
header{ border-bottom:1px solid var(--line); background:#fff; position:sticky; top:0; z-index:70 }
.nav{ display:flex; align-items:center; gap:22px; height:72px }
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--navy) }
.brand img{ height:38px; width:38px; display:block }
.brand__name{ font-weight:800; font-size:1.2rem; letter-spacing:-.01em }
.nav__links{ display:flex; gap:22px; margin-inline-start:auto; font-size:15px;
             color:var(--muted); font-weight:550 }
.nav__links a{ text-decoration:none; padding:6px 2px; white-space:nowrap; transition:color .15s }
.nav__links a:hover,.nav__links a[aria-current]{ color:var(--navy) }

/* The disclosure that replaces the nav when it is hidden. A <details>, so it needs no script to
   open; the page's own script only closes it after a jump, which <details> will not do alone. */
.nav__menu{ display:none; margin-inline-start:auto; position:relative }
.nav__menu>summary{ list-style:none; display:grid; place-items:center; width:42px; height:42px;
  border:1px solid var(--line); border-radius:10px; color:var(--navy); cursor:pointer; background:#fff }
.nav__menu>summary::-webkit-details-marker{ display:none }
.nav__menu>summary svg{ width:20px; height:20px }
.nav__menu[open]>summary{ border-color:var(--orange); color:var(--orange-700) }
.nav__panel{ position:absolute; inset-inline-end:0; top:calc(100% + 10px); z-index:80;
  min-width:224px; background:#fff; border:1px solid var(--line); border-radius:12px;
  box-shadow:var(--sh-md); padding:8px; display:grid }
.nav__panel a{ padding:11px 14px; border-radius:8px; color:var(--ink); font-weight:600;
               font-size:15px; text-decoration:none }
.nav__panel a:hover{ background:var(--bg-soft); color:var(--navy) }

.lang-t{ display:inline-flex; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff }
.lang-t a{ padding:10px 14px; font-size:13.5px; font-weight:680; color:var(--muted);
           line-height:1; text-decoration:none; transition:color .15s,background .15s }
.lang-t a.on{ background:var(--orange-700); color:#fff }
.lang-t a:not(.on):hover{ color:var(--navy) }

.btn{ display:inline-flex; align-items:center; gap:8px; border-radius:10px; font-weight:700;
      font-size:15px; padding:12px 20px; text-decoration:none; border:1px solid transparent;
      cursor:pointer; font-family:inherit; transition:background .15s,color .15s,border-color .15s }
.btn--primary{ background:var(--orange); color:#fff }
.btn--primary:hover{ background:var(--orange-600); color:#fff }
.btn--ghost{ background:#fff; color:var(--navy); border-color:var(--line) }
.btn--ghost:hover{ border-color:var(--navy); color:var(--navy) }
.btn--onDark{ background:var(--orange); color:#fff }
.btn--onDark:hover{ background:var(--orange-600); color:#fff }

/* ---- Article ----------------------------------------------------------------------------- */
main{ padding:0 0 76px }
.crumbs{ font-size:14px; color:var(--muted); padding:22px 0 0 }
.crumbs a{ color:var(--muted); text-decoration:none }
.crumbs a:hover{ color:var(--navy); text-decoration:underline }
.crumbs span{ margin-inline:8px; opacity:.5 }

.article{ max-width:var(--measure); margin:0 auto }
.article__head{ padding:18px 0 28px; border-bottom:1px solid var(--line); margin-bottom:34px }
.article h1{ font-size:clamp(27px,4.2vw,40px); line-height:1.22; color:var(--navy);
             letter-spacing:-.02em; margin-bottom:14px }
.article__meta{ color:var(--muted); font-size:14.5px }
.article__lede{ font-size:19px; color:var(--ink) }
.article h2{ font-size:clamp(21px,2.6vw,25px); color:var(--navy); letter-spacing:-.01em;
             margin:38px 0 12px; line-height:1.3 }
.article h3{ font-size:18px; color:var(--navy); margin:26px 0 8px }
.article p{ margin-bottom:16px }
.article ul,.article ol{ margin:0 0 16px; padding-inline-start:22px }
.article li{ margin-bottom:8px }

.faq-block{ margin-top:46px; border-top:1px solid var(--line); padding-top:30px }
.faq-block h2{ margin-top:0 }
.faq-block details{ border:1px solid var(--line); border-radius:var(--r-sm); padding:16px 18px;
                    margin-bottom:12px; background:#fff }
.faq-block summary{ cursor:pointer; font-weight:700; color:var(--navy); list-style:none }
.faq-block summary::-webkit-details-marker{ display:none }
.faq-block summary::after{ content:"+"; float:inline-end; color:var(--orange); font-weight:800 }
.faq-block details[open] summary::after{ content:"\2212" }
.faq-block .a{ margin:12px 0 0; color:var(--muted) }

.cta-box{ margin-top:44px; background:linear-gradient(180deg,var(--navy) 0%,var(--navy-900) 100%);
          color:#fff; border-radius:var(--r); padding:32px 30px }
.cta-box h2{ color:#fff; margin:0 0 10px; font-size:22px }
.cta-box p{ color:#c6d2db; margin-bottom:20px }

.related{ margin-top:40px; border-top:1px solid var(--line); padding-top:26px }
.related h2{ font-size:17px; margin:0 0 14px; color:var(--navy) }
.related ul{ list-style:none; padding:0; display:grid; gap:10px }
.related a{ font-weight:650 }

/* ---- Index ------------------------------------------------------------------------------- */
.index-head{ padding:46px 0 34px; text-align:center; max-width:68ch; margin:0 auto }
.index-head h1{ font-size:clamp(28px,4.4vw,42px); color:var(--navy); letter-spacing:-.02em;
                line-height:1.2; margin-bottom:14px }
.index-head p{ color:var(--muted); font-size:18px }
.cards{ display:grid; gap:22px; grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
        padding-bottom:20px }
.post{ border:1px solid var(--line); border-radius:var(--r); background:#fff; padding:28px 26px;
       box-shadow:var(--sh-sm); display:flex; flex-direction:column;
       transition:box-shadow .2s,transform .2s,border-color .2s }
.post:hover{ box-shadow:var(--sh-md); transform:translateY(-3px); border-color:#d5dde3 }
.post h2{ font-size:19px; line-height:1.35; color:var(--navy); margin-bottom:10px }
.post h2 a{ color:inherit; text-decoration:none }
.post h2 a:hover{ color:var(--orange-700) }
.post p{ color:var(--muted); font-size:15.5px; margin-bottom:18px }
.post__more{ margin-top:auto; font-weight:700; font-size:14.5px }

/* ---- Footer ------------------------------------------------------------------------------ */
footer{ border-top:1px solid var(--line); padding:30px 0; color:var(--muted); font-size:14px }
.foot{ display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between }
.foot-links{ margin-top:12px }
.foot-links a{ margin-inline-end:14px }
.foot-legal{ margin-top:14px; line-height:1.6 }
.ltr{ direction:ltr; unicode-bidi:isolate; display:inline-block }
.social{ display:flex; gap:10px; margin-top:16px }
.social a{ display:grid; place-items:center; width:36px; height:36px; border-radius:9px;
           border:1px solid var(--line); color:var(--muted); text-decoration:none;
           transition:color .15s,border-color .15s,background .15s }
.social a:hover{ color:var(--navy); border-color:#cfd8df; background:var(--bg-soft) }
.social svg{ width:18px; height:18px }

@media (max-width:1040px){
  .nav__links{ display:none }
  .nav__menu{ display:block }
}
@media (max-width:640px){
  body{ font-size:16.5px }
  .wrap{ padding:0 16px }
  .article__lede{ font-size:18px }
  .cta-box{ padding:26px 22px }
  .nav{ gap:10px; height:66px }
  .brand img{ height:32px; width:32px }
  .brand__name{ font-size:1.1rem }
  .lang-t a{ padding:9px 10px; font-size:12.5px }
}
