
  :root{
    --teal-900:#0d4a52;
    --teal-700:#136a76;
    --teal:#1c8794;
    --teal-400:#2fa9b6;
    --teal-200:#a9dde3;
    --teal-100:#e3f5f6;
    --navy-900:#201d40;
    --navy:#2e2a5c;
    --navy-600:#433d7a;
    --paper:#f7f9f9;
    --paper-2:#ffffff;
    --ink:#1a1c22;
    --ink-soft:#565b66;
    --line:#dbe6e7;
    --gold:#c9a34e;
    --direct: var(--teal);
    --attach: var(--navy);
    --radius:16px;
    --shadow: 0 10px 30px -12px rgba(20,40,45,.18);
  }
  *{box-sizing:border-box}
  html{scroll-behavior:smooth}
  body{
    margin:0;
    background:#0d2145;
    color:#e9efff;
    font-family:"IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size:16px;
    line-height:1.7;
    -webkit-font-smoothing:antialiased;
  }
  h1,h2,h3,h4,.display{font-family:"IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;}
  ::selection{background:#0d2145;}

  /* ---------- Utility ---------- */
  .wrap{max-width:1180px;margin:0 auto;padding:0 24px;}
  a{color:inherit}
  button{font-family:"IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;cursor:pointer;}

  /* ---------- Top progress / brand bar ---------- */
  .brandbar{
    position:sticky;top:0;z-index:70;
    background:linear-gradient(120deg, #0d2145 0%, #0d2145 60%, #0d2145 130%);
    border-bottom:1px solid rgba(255,255,255,.08);
    -webkit-tap-highlight-color:transparent;
  }
  .brandbar .wrap{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 24px;}
  .brand-mini{display:flex;align-items:center;gap:9px;min-width:0;}
  .brand-mini img{height:30px;display:block;flex:0 0 auto;}
  .brand-mini span{font-weight:800;color:#fff;font-size:14px;letter-spacing:.2px;white-space:nowrap;}
  .brand-mini small{display:block;color:var(--teal-200);font-size:10.5px;font-weight:400}

  /* ---- Tab bar : sticky right under the header ---- */
  .tabbar{
    position:sticky;z-index:60;
    background:#0c1228;
    border-bottom:1px solid rgba(99,221,255,.45);
    box-shadow:0 8px 18px -16px rgba(15,30,35,.35);
  }
  .tabbar .wrap{padding:0 24px;}
  .nav-scroller{
    display:flex;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;
    padding:10px 0;scroll-padding-inline:24px;
  }
  .nav-scroller::-webkit-scrollbar{display:none}
  .nav-pill{
    white-space:nowrap;flex:0 0 auto;
    font-size:13px;font-weight:700;color:#63ddff;
    background:#0d2145;border:1px solid transparent;
    padding:8px 15px 8px 12px;border-radius:999px;transition:.2s;text-decoration:none;
    display:inline-flex;align-items:center;gap:7px;min-height:38px;
  }
  .pill-emoji{font-size:16px;line-height:1;transform:translateY(-1px);}
  .nav-pill:hover{background:#0d2145;}
  .nav-pill.active{background:#0d2145;color:#fff;box-shadow:0 4px 10px -3px rgba(46,42,92,.5);}

  /* ---------- HERO / intro (matches cover of the guide) ---------- */
  .hero{
    position:relative;
    background:radial-gradient(ellipse 900px 500px at 20% -10%, rgba(255,255,255,.10), transparent 60%),
               linear-gradient(160deg, #0d2145 0%, #0d2145 46%, #0d2145 100%);
    color:#fff;
    overflow:hidden;
    padding:64px 0 84px;
  }
  .hero:before{
    content:"";position:absolute;inset:0;
    background-image:
      radial-gradient(circle at 85% 20%, rgba(47,169,182,.35), transparent 45%),
      radial-gradient(circle at 8% 85%, rgba(201,163,78,.18), transparent 40%);
    pointer-events:none;
  }
  .hero-grid{
    position:absolute;inset:0;opacity:.10;pointer-events:none;
    background-image:
      linear-gradient(#0c1228 1px, transparent 1px),
      linear-gradient(90deg, #0c1228 1px, transparent 1px);
    background-size:46px 46px;
    mask-image:radial-gradient(ellipse 70% 60% at 60% 30%, black, transparent);
  }
  .hero .wrap{position:relative;z-index:2;}
  .hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;flex-wrap:wrap;margin-bottom:46px;}
  .logo-badge{display:flex;align-items:center;gap:14px;}
  .logo-badge img{height:64px;filter:drop-shadow(0 8px 18px rgba(0,0,0,.25));}
  .logo-badge .lbl{font-size:13px;color:var(--teal-200);letter-spacing:2px;text-transform:uppercase;font-weight:700;}
  .stat-strip{display:flex;gap:26px;flex-wrap:wrap;}
  .stat-strip .stat{text-align:center;}
  .stat-strip .num{font-family:"IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;font-weight:900;font-size:30px;color:#fff;line-height:1;}
  .stat-strip .lab{font-size:12px;color:var(--teal-200);margin-top:4px;}

  .hero-badge{
    display:inline-flex;align-items:center;gap:8px;
    background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.25);
    padding:7px 16px;border-radius:999px;font-size:13px;font-weight:700;
    color:var(--teal-200);margin-bottom:22px;
  }
  .hero-badge .plat-list{display:flex;align-items:center;gap:8px;direction:ltr;}
  .hero-badge .sep{opacity:.5;}
  .hero h1{
    font-size:clamp(32px,5.2vw,58px);
    font-weight:900;
    margin:0 0 16px;
    line-height:1.18;
    max-width:820px;
  }
  .hero h1 em{
    font-style:normal;color:#f2c14e;
  }
  .hero p.lead{
    font-size:clamp(16px,1.6vw,19px);color:#dfeef0;max-width:660px;font-weight:400;
    margin:0 0 34px;
  }
  .platform-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:8px;}
  .platform-chip{
    background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.2);
    padding:8px 16px;border-radius:10px;font-size:13.5px;font-weight:700;
    display:flex;align-items:center;gap:8px;
  }
  .platform-chip .dot{width:7px;height:7px;border-radius:50%;background:#2f6df0;}

  /* how to card row inside hero */
  .howto{
    margin-top:48px;
    display:grid;grid-template-columns:repeat(4,1fr);gap:14px;
  }
  .howto .step{
    background:rgba(255,255,255,.07);
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;padding:18px 16px;
  }
  .howto .step .n{
    width:30px;height:30px;border-radius:9px;background:#2f6df0;color:#63ddff;
    display:flex;align-items:center;justify-content:center;font-weight:900;font-size:14px;margin-bottom:12px;
  }
  .howto .step p{margin:0;font-size:13.6px;color:#e7f2f2;font-weight:500;}

  /* ---------- Section: why / color legend (from book) ---------- */
  .section{padding:64px 0;}
  .section.tight{padding:44px 0;}
  .eyebrow{
    display:flex;align-items:center;gap:10px;
    font-size:12.5px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase;
    color:#63ddff;margin-bottom:12px;
  }
  .eyebrow:before{content:"";width:26px;height:2px;background:#c28a1a;display:block;}
  .section h2{font-size:clamp(24px,3vw,34px);font-weight:900;color:#63ddff;margin:0 0 14px;}
  .section .sub{color:#e9efff;font-size:16px;max-width:720px;margin:0 0 32px;}

  .intro-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:start;}
  @media (max-width:900px){.intro-grid{grid-template-columns:1fr;}}
  .intro-card{
    background:#0d2145;border:1px solid rgba(99,221,255,.45);border-radius:var(--radius);
    padding:28px 30px;box-shadow:var(--shadow);
  }
  .intro-card p{margin:0 0 14px;color:#e9efff;}
  .intro-card p:last-child{margin-bottom:0}
  .intro-card strong{color:#63ddff;}

  .upload-steps{list-style:none;margin:0;padding:0;counter-reset:st;}
  .upload-steps li{
    counter-increment:st;
    display:flex;gap:14px;align-items:flex-start;
    padding:14px 0;border-bottom:1px dashed rgba(99,221,255,.45);
  }
  .upload-steps li:last-child{border-bottom:none;}
  .upload-steps li:before{
    content:counter(st);
    flex:0 0 30px;height:30px;border-radius:9px;
    background:#0d2145;color:#fff;font-weight:800;font-size:13px;
    display:flex;align-items:center;justify-content:center;
  }
  .upload-steps li span{padding-top:5px;font-size:14.5px;color:#e9efff;}

  /* legend */
  .legend{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
  @media (max-width:640px){.legend{grid-template-columns:1fr;}}
  .legend-card{
    border-radius:var(--radius);padding:22px 22px 20px;
    border:1px solid rgba(99,221,255,.45);background:#0d2145;position:relative;overflow:hidden;
  }
  .legend-card:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:6px;}
  .legend-card.direct:before{background:var(--direct);}
  .legend-card.attach:before{background:var(--attach);}
  .legend-tag{
    display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:800;
    padding:5px 12px;border-radius:999px;margin-bottom:12px;
  }
  .legend-card.direct .legend-tag{background:#0d2145;color:#63ddff;}
  .legend-card.attach .legend-tag{background:#0b2038;color:#63ddff;}
  .legend-card h4{margin:0 0 8px;font-size:16.5px;color:#63ddff;}
  .legend-card p{margin:0;font-size:13.8px;color:#e9efff;}
  .legend-example{
    margin-top:12px;font-size:13px;background:#0d2145;border:1px dashed rgba(99,221,255,.45);
    border-radius:10px;padding:10px 12px;color:#e9efff;
  }

  /* ---------- Table of contents grid ---------- */
  .toc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;}
  .toc-card{
    display:flex;align-items:center;gap:14px;
    background:#0d2145;border:1px solid rgba(99,221,255,.45);border-radius:14px;
    padding:16px 18px;text-decoration:none;color:#e9efff;transition:.2s;
  }
  .toc-card:hover{border-color:rgba(99,221,255,.45);transform:translateY(-2px);box-shadow:var(--shadow);}
  .toc-num{
    flex:0 0 44px;height:44px;border-radius:12px;
    background:linear-gradient(155deg,#0d2145,#0d2145);
    color:#fff;font-weight:900;display:flex;align-items:center;justify-content:center;font-size:20px;
  }
  .toc-card .t{font-weight:800;font-size:14.6px;color:#63ddff;}
  .toc-card .c{font-size:12px;color:#e9efff;margin-top:2px;}

  /* ---------- Chapters ---------- */
  .chapter{
    scroll-margin-top:120px;
    padding:60px 0 10px;
    border-top:1px solid rgba(99,221,255,.45);
  }
  .chapter-head{display:flex;align-items:center;gap:18px;margin-bottom:36px;flex-wrap:wrap;}
  .chapter-badge{
    flex:0 0 auto;width:58px;height:58px;border-radius:16px;
    background:linear-gradient(155deg,#0d2145,#0d2145);
    color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
    box-shadow:0 8px 18px -6px rgba(30,50,60,.4);
  }
  .chapter-emoji{font-size:22px;line-height:1;}
  .chapter-num{font-size:10.5px;font-weight:800;opacity:.85;letter-spacing:.5px;}
  .chapter-head h2{margin:0;font-size:clamp(21px,2.6vw,28px);color:#63ddff;font-weight:900;}
  .chapter-head .count{font-size:13px;color:#e9efff;font-weight:600;}

  .cmd-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(400px,1fr));gap:22px;}

  .cmd-card{
    background:#0d2145;
    border:1px solid rgba(99,221,255,.45);
    border-radius:18px;
    overflow:hidden;
    display:flex;flex-direction:column;
    box-shadow:0 4px 18px -10px rgba(20,30,40,.12);
    transition:box-shadow .2s, transform .2s;
  }
  .cmd-card:hover{box-shadow:var(--shadow);transform:translateY(-2px);}
  .cmd-card.mode-direct{border-top:4px solid var(--direct);}
  .cmd-card.mode-attach{border-top:4px solid var(--attach);}

  .cmd-head{padding:20px 22px 0;}
  .cmd-id-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
  .cmd-id{font-family:"IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;font-weight:900;color:#e9efff;font-size:13px;}
  .mode-chip{
    font-size:11.5px;font-weight:800;padding:4px 11px;border-radius:999px;display:flex;align-items:center;gap:6px;
  }
  .mode-chip svg{width:12px;height:12px;}
  .mode-direct .mode-chip{background:#0d2145;color:#63ddff;}
  .mode-attach .mode-chip{background:#0b2038;color:#63ddff;}
  .cmd-title{font-size:18px;font-weight:800;color:#63ddff;margin:0 0 10px;line-height:1.4;}
  .cmd-meta{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;}
  .cmd-meta p{margin:0;font-size:13.3px;color:#e9efff;}
  .cmd-meta b{color:#63ddff;font-weight:700;}

  .cmd-body{
    margin:0 22px 16px;
    background:#0d2145;
    border:1px solid rgba(99,221,255,.45);
    border-radius:12px;
    padding:16px 16px;
    font-size:13.8px;
    color:#e9efff;
    white-space:pre-wrap;
    line-height:1.85;
    max-height:230px;
    overflow-y:auto;
    position:relative;
  }
  .cmd-body::-webkit-scrollbar{width:6px;}
  .cmd-body::-webkit-scrollbar-thumb{background:#0d2145;border-radius:6px;}

  .cmd-example{
    margin:0 22px 16px;font-size:12.8px;color:#e9efff;
    background:linear-gradient(90deg, #0d2145, transparent);
    border-inline-start:3px solid rgba(99,221,255,.45);
    padding:9px 12px;border-radius:6px;
  }
  .cmd-example b{color:#63ddff;}

  .cmd-foot{
    margin-top:auto;
    display:flex;gap:10px;
    padding:0 22px 22px;
  }
  .copy-btn{
    flex:1;
    display:flex;align-items:center;justify-content:center;gap:8px;
    background:#0d2145;color:#fff;border:none;border-radius:11px;
    padding:12px 14px;font-weight:800;font-size:14px;
    transition:background .2s, transform .12s;
  }
  .copy-btn:hover{background:#0d2145;}
  .copy-btn:active{transform:scale(.97);}
  .copy-btn.copied{background:#2f6df0;}
  .copy-btn svg{width:16px;height:16px;flex:0 0 auto;}

  /* ---------- Footer ---------- */
  footer{
    background:linear-gradient(155deg,#0d2145,#0d2145);
    color:#dfeaea;padding:56px 0 30px;margin-top:60px;
  }
  footer .wrap{display:flex;flex-direction:column;align-items:center;text-align:center;gap:18px;}
  footer img{height:52px;}
  footer h3{margin:0;color:#fff;font-size:22px;}
  footer p{margin:0;max-width:560px;color:#63ddff;font-size:14.5px;}
  .foot-tags{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:6px;}
  .foot-tags span{
    background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);
    padding:6px 14px;border-radius:999px;font-size:12.5px;font-weight:700;
  }
  .foot-line{width:100%;height:1px;background:rgba(255,255,255,.12);margin:22px 0 6px;}
  .foot-bottom{font-size:12.5px;color:#63ddff;}

  /* back to top */
  #backTop{
    position:fixed;bottom:26px;left:26px;z-index:50;
    width:48px;height:48px;border-radius:14px;
    background:#0d2145;color:#fff;border:none;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 10px 24px -8px rgba(0,0,0,.35);
    opacity:0;pointer-events:none;transition:.25s;
  }
  #backTop.show{opacity:1;pointer-events:auto;}
  #backTop:hover{background:#0d2145;}

  /* toast */
  #toast{
    position:fixed;bottom:26px;right:26px;z-index:80;
    background:#2f6df0;color:#fff;padding:13px 20px;border-radius:12px;
    font-weight:700;font-size:14px;box-shadow:0 12px 26px -8px rgba(0,0,0,.3);
    display:flex;align-items:center;gap:8px;
    transform:translateY(20px);opacity:0;transition:.28s;
  }
  #toast.show{transform:translateY(0);opacity:1;}

  @media (max-width:760px){
    .wrap{padding:0 16px;}
    .howto{grid-template-columns:1fr 1fr;gap:10px;}
    .howto .step{padding:14px 12px;}
    .legend{grid-template-columns:1fr;}
    .intro-grid{grid-template-columns:1fr;gap:20px;}
    .hero{padding:34px 0 52px;}
    .hero-top{margin-bottom:30px;gap:16px;}
    .logo-badge img{height:48px;}
    .stat-strip{gap:18px;width:100%;justify-content:space-between;}
    .stat-strip .num{font-size:24px;}
    .hero h1{font-size:28px;}
    .hero p.lead{font-size:15px;}
    .platform-chip{font-size:12.5px;padding:7px 12px;}
    .section{padding:44px 0;}
    .section.tight{padding:32px 0;}
    .cmd-grid{grid-template-columns:1fr;gap:16px;}
    .cmd-card{border-radius:16px;}
    .cmd-head{padding:18px 16px 0;}
    .cmd-body{margin:0 16px 14px;padding:14px 14px;font-size:14px;max-height:none;}
    .cmd-example{margin:0 16px 14px;font-size:13px;}
    .cmd-foot{padding:0 16px 18px;}
    .copy-btn{padding:14px 14px;font-size:14.5px;min-height:48px;}
    .chapter-head{gap:14px;margin-bottom:26px;}
    .chapter-badge{width:48px;height:48px;font-size:18px;border-radius:13px;}
    .toc-grid{grid-template-columns:1fr;}
    .toc-card{padding:14px 16px;}
    #backTop{bottom:18px;left:16px;width:44px;height:44px;}
    #toast{right:16px;bottom:18px;left:16px;justify-content:center;}
  }
  @media (max-width:420px){
    .brand-mini span{font-size:12.5px;}
    .brand-mini small{display:none;}
    .stat-strip{gap:12px;}
    .stat-strip .num{font-size:20px;}
    .nav-pill{font-size:12.3px;padding:8px 13px;min-height:36px;}
  }
  @media (prefers-reduced-motion: reduce){
    html{scroll-behavior:auto;}
    *{transition:none !important; animation:none !important;}
  }


/* قيم style المضمّنة سابقًا (منقولة لأن CSP تمنع style داخل الصفحة) */
[data-s="1"] { margin:0 0 14px;color:#63ddff;font-size:17px; }
[data-s="2"] { background:#0d2145;border-top:1px solid rgba(99,221,255,.45);border-bottom:1px solid rgba(99,221,255,.45); }
