/* =========================================================
   معمل آلات التيار المستمر — نظام التصميم المشترك
   هوية الألوان نفسها المستخدمة داخل المحاكي (كحلي + ذهبي)
   ========================================================= */

:root{
  --bg:#0a0e1a; --bg-card:#111827; --bg-elevated:#1a2235;
  --ink:#f1f5f9; --ink-dim:#94a3b8; --border:#2d3748;
  --gold:#d4af37; --gold-ink:#1a1506;
  --wire-pos:#ec4899; --wire-neg:#3b82f6; --cyan:#22d3ee;
  --danger:#ef4444; --ok:#10b981;
  --radius:14px; --radius-sm:9px;
  --shadow:0 18px 44px rgba(0,0,0,.38);
  --maxw:1180px;
  color-scheme:dark;
}
:root[data-theme="light"]{
  --bg:#eef2f7; --bg-card:#ffffff; --bg-elevated:#f4f7fb;
  --ink:#0f172a; --ink-dim:#53657f; --border:#d7e0ec;
  --gold:#9a7a16; --gold-ink:#fff8e6;
  --shadow:0 14px 34px rgba(15,23,42,.1);
  color-scheme:light;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:'IBM Plex Sans Arabic','Segoe UI',sans-serif;
  direction:rtl; text-align:right; line-height:1.75;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%; display:block}
a{color:inherit}
.container{max-width:var(--maxw); margin:0 auto; padding:0 20px}

h1,h2,h3{font-family:'Changa','IBM Plex Sans Arabic',sans-serif; font-weight:700; margin:0; letter-spacing:.2px}

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:40;
  background:color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.site-header .bar{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink)}
.brand .mark{width:34px; height:34px; border-radius:9px; background:linear-gradient(145deg,var(--gold),#8a6d1f);
  display:flex; align-items:center; justify-content:center; font-size:16px; flex:none; box-shadow:0 6px 16px rgba(212,175,55,.35)}
.brand .word{font-family:'Changa',sans-serif; font-weight:700; font-size:16.5px}
.brand .word small{display:block; font-weight:400; font-size:11px; color:var(--ink-dim); font-family:'IBM Plex Sans Arabic',sans-serif}
.nav-actions{display:flex; align-items:center; gap:10px}
.theme-toggle{
  width:38px; height:38px; border-radius:50%; border:1px solid var(--border); background:var(--bg-card);
  color:var(--ink); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px;
}
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  padding:11px 20px; border-radius:10px; border:1px solid transparent; cursor:pointer;
  font-family:'IBM Plex Sans Arabic',sans-serif; font-weight:700; font-size:14.5px; text-decoration:none;
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn-gold{background:linear-gradient(135deg,var(--gold),#b8912a); color:var(--gold-ink); box-shadow:0 10px 26px rgba(212,175,55,.3)}
.btn-ghost{background:var(--bg-card); color:var(--ink); border-color:var(--border)}

/* ---------- sections ---------- */
section{padding:64px 0}
.eyebrow{display:none} /* avoid generic tracked-out label pattern */
.section-head{max-width:560px; margin-bottom:34px}
.section-head p{color:var(--ink-dim); font-size:15.5px}

/* ---------- footer ---------- */
footer{border-top:1px solid var(--border); margin-top:20px}
footer .f-row{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px;
  padding:16px 20px; font-size:11.5px; color:var(--ink-dim); text-align:center;
}
footer .f-sep{opacity:.45}
footer a{text-decoration:none; font-weight:700; color:var(--ink-dim)}
footer a:hover{color:var(--gold)}
footer details{border-top:1px solid var(--border)}
footer summary{
  list-style:none; cursor:pointer; text-align:center; padding:10px 20px;
  font-size:11.5px; color:var(--ink-dim); user-select:none;
}
footer summary::-webkit-details-marker{display:none}
footer summary:hover{color:var(--gold)}
footer summary .chev{display:inline-block; transition:transform .2s ease; margin-inline-end:4px}
footer details[open] summary .chev{transform:rotate(180deg)}
footer .more-links{
  display:flex; flex-wrap:wrap; justify-content:center; gap:4px 18px;
  padding:0 20px 18px; font-size:12.5px;
}
footer .more-links a{color:var(--ink-dim); font-weight:600}
footer .more-links a:hover{color:var(--gold)}

/* ---------- utility card / panel ---------- */
.panel{background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:22px}
.pcb{background:#0a0e1a; border:1px solid #243049; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow)}

@media (max-width:760px){
  section{padding:46px 0}
}

/* ---------------- inner pages ---------------- */
.page-hero{padding:48px 0 8px}
.page-hero .crumb{font-size:12.5px; color:var(--ink-dim); margin-bottom:14px}
.page-hero .crumb a{color:var(--ink-dim); text-decoration:none}
.page-hero .crumb a:hover{color:var(--gold)}
.page-hero h1{font-size:clamp(26px,3.6vw,38px); line-height:1.3}
.page-hero p.lede{color:var(--ink-dim); font-size:16px; max-width:62ch; margin:16px 0 0}

.prose{max-width:720px}
.prose p{color:var(--ink-dim); font-size:15.5px; margin:0 0 16px}
.prose h2{font-size:21px; margin:36px 0 12px}
.prose h3{font-size:16.5px; margin:22px 0 8px}
.prose ul{margin:0 0 16px; padding-inline-start:20px; color:var(--ink-dim); font-size:15px; line-height:2}
.prose li{margin-bottom:2px}
.prose .note{background:var(--bg-card); border:1px solid var(--border); border-inline-start:3px solid var(--gold);
  border-radius:var(--radius-sm); padding:14px 16px; font-size:14px; color:var(--ink-dim); margin:20px 0}

.info-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:28px 0}
.info-grid .panel h3{font-size:14.5px; margin-bottom:6px}
.info-grid .panel p{margin:0; font-size:13px; color:var(--ink-dim)}

.guide-step{display:grid; grid-template-columns:.9fr 1.1fr; gap:28px; align-items:center; padding:30px 0; border-bottom:1px solid var(--border)}
.guide-step:last-child{border-bottom:none}
.guide-step.rev{grid-template-columns:1.1fr .9fr}
.guide-step .shot{border-radius:var(--radius); overflow:hidden; border:1px solid #243049; background:#0a0e1a; box-shadow:var(--shadow)}
.guide-step .shot img{width:100%}
.guide-step .num{display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%;
  background:var(--gold); color:var(--gold-ink); font-family:'Changa',sans-serif; font-weight:700; font-size:13.5px; margin-bottom:12px}
.guide-step h3{font-size:19px; margin-bottom:8px}
.guide-step p{color:var(--ink-dim); font-size:14.5px; margin:0 0 10px}
.guide-step ul{margin:0; padding-inline-start:18px; color:var(--ink-dim); font-size:13.8px; line-height:1.95}

.role-tag{display:inline-block; background:var(--bg-elevated); border:1px solid var(--border); border-radius:20px;
  padding:4px 14px; font-size:12.5px; color:var(--ink-dim); margin-bottom:14px}

@media (max-width:760px){
  .guide-step, .guide-step.rev{grid-template-columns:1fr; gap:16px}
  .info-grid{grid-template-columns:1fr 1fr}
}
