:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --ink: #152033;
  --muted: #566274;
  --line: #dbe1e8;
  --navy: #101827;
  --navy-2: #18243a;
  --gold: #c49a36;
  --gold-light: #e1bd59;
  --gold-soft: #fbf4df;
  --info: #eaf3fb;
  --warn: #fff4df;
  --shadow: 0 18px 54px rgba(21, 32, 51, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Tahoma, Arial, sans-serif; font-size: 16px; line-height: 1.85; }
body[data-theme="dark"] { color-scheme: dark; --bg:#0c1220; --surface:#121b2c; --surface-2:#19253a; --ink:#eef1f6; --muted:#a6b0c2; --line:#2a3850; --gold-soft:#2d2819; --info:#18293b; --warn:#342b1a; --shadow:0 18px 54px rgba(0,0,0,.24); }
a { color: inherit; }
button, input { font: inherit; }
.skip-link { position:absolute; top:-80px; right:16px; z-index:20; padding:8px 14px; background:var(--surface); border-radius:9px; }
.skip-link:focus { top:12px; }
.guide-header { position:sticky; top:0; z-index:10; display:flex; align-items:center; justify-content:space-between; gap:22px; min-height:76px; padding:10px max(22px, calc((100vw - 1180px)/2)); background:color-mix(in srgb, var(--surface) 93%, transparent); border-bottom:1px solid var(--line); backdrop-filter:blur(14px); }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; min-width:max-content; }
.brand img { border-radius:12px; }
.brand span { display:grid; line-height:1.5; }
.brand strong { font-size:15px; }
.brand small { color:var(--muted); font-size:11px; }
.header-links { display:flex; gap:20px; align-items:center; }
.header-links a { color:var(--muted); font-size:13px; text-decoration:none; }
.header-links a:hover, .guide-footer a:hover { color:var(--gold); }
.header-actions { display:flex; align-items:center; gap:10px; }
.quiet-button { border:0; background:transparent; color:var(--muted); cursor:pointer; padding:8px; font-size:12px; }
.button { display:inline-flex; justify-content:center; align-items:center; gap:10px; min-height:44px; border:1px solid transparent; border-radius:12px; padding:8px 18px; text-decoration:none; font-weight:800; font-size:13px; cursor:pointer; }
.button-primary { color:#201806; background:linear-gradient(135deg,var(--gold-light),var(--gold)); box-shadow:0 8px 20px rgba(196,154,54,.17); }
.button-outline { color:var(--ink); background:var(--surface); border-color:var(--line); }
.page-shell { max-width:1180px; padding:28px 22px 70px; margin:auto; }
.hero { position:relative; overflow:hidden; display:grid; grid-template-columns:1.5fr .8fr; align-items:center; min-height:350px; padding:48px clamp(24px,5vw,68px); color:#fff; background:radial-gradient(circle at 12% 25%,rgba(212,175,55,.18),transparent 28%), linear-gradient(125deg,#101827,#1b2940 65%,#202b3e); border:1px solid rgba(196,154,54,.36); border-radius:24px; box-shadow:var(--shadow); }
.hero::after { content:""; position:absolute; inset:14px; border:1px solid rgba(212,175,55,.13); border-radius:17px; pointer-events:none; }
.hero-copy { position:relative; z-index:1; max-width:690px; }
.eyebrow { margin:0 0 5px; color:var(--gold); font-size:12px; font-weight:800; letter-spacing:.03em; }
.hero .eyebrow { color:var(--gold-light); }
h1,h2,h3,p { margin-top:0; }
.hero h1 { margin:8px 0 12px; font-size:clamp(30px,4.8vw,52px); line-height:1.35; }
.hero h1 span { color:var(--gold-light); }
.hero-lead { max-width:660px; color:#d9dfeb; font-size:16px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.hero-mark { display:grid; justify-items:center; gap:12px; color:var(--gold-light); position:relative; z-index:1; }
.hero-mark span { display:grid; place-items:center; width:150px; height:150px; border:1px solid rgba(225,189,89,.48); border-radius:50%; box-shadow:inset 0 0 0 12px rgba(225,189,89,.05); font-size:78px; }
.hero-mark i { width:130px; height:1px; background:linear-gradient(90deg,transparent,var(--gold),transparent); }
.hero-mark b { font-size:14px; }
.guide-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; color:#c2ccdb; font-size:11px; }
.guide-meta span { border:1px solid rgba(255,255,255,.15); background:rgba(255,255,255,.05); border-radius:999px; padding:3px 10px; }
.truth-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:18px 0 34px; }
.truth-strip article,.info-card,.module-card,.map-grid article { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:18px; }
.truth-strip strong { color:var(--navy-2); font-size:14px; }
body[data-theme="dark"] .truth-strip strong { color:var(--gold-light); }
.truth-strip p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.chapter,.contents-panel { scroll-margin-top:92px; }
.chapter { margin:34px 0; padding:clamp(22px,4vw,40px); background:var(--surface); border:1px solid var(--line); border-radius:21px; box-shadow:0 9px 30px rgba(21,32,51,.035); }
.quick-start { border-top:4px solid var(--gold); }
.section-heading { display:flex; align-items:center; gap:15px; margin-bottom:22px; }
.section-number { display:grid; place-items:center; width:50px; height:50px; flex:none; color:#261d08; background:linear-gradient(145deg,var(--gold-light),var(--gold)); border-radius:15px; font-weight:900; font-size:15px; }
.section-heading h2,.contents-title h2 { margin:0; font-size:clamp(22px,3vw,30px); line-height:1.4; }
.section-heading .eyebrow { margin-bottom:0; }
.steps { list-style:none; counter-reset:step; display:grid; grid-template-columns:repeat(5,1fr); gap:10px; padding:0; margin:20px 0; }
.steps li { counter-increment:step; position:relative; min-height:142px; padding:43px 13px 14px; background:var(--surface-2); border:1px solid var(--line); border-radius:14px; }
.steps li::before { content:counter(step,decimal-leading-zero); position:absolute; top:10px; right:12px; color:#211807; background:var(--gold-light); border-radius:9px; padding:1px 8px; font-weight:900; font-size:12px; }
.steps b,.steps span { display:block; }
.steps b { margin-bottom:5px; font-size:13px; }
.steps span { color:var(--muted); font-size:11px; line-height:1.8; }
.notice { margin:18px 0; padding:14px 17px; border-radius:13px; border-right:4px solid var(--gold); font-size:13px; }
.notice p { margin:4px 0 0; }
.notice-warn { background:var(--warn); }
.notice-info { background:var(--info); border-right-color:#5385ad; }
.contents-panel { padding:28px; background:var(--surface); border:1px solid var(--line); border-radius:21px; box-shadow:var(--shadow); }
.contents-title { display:flex; justify-content:space-between; align-items:end; gap:18px; margin-bottom:18px; }
.contents-title h2 { font-size:23px; }
.search-box { display:flex; align-items:center; gap:8px; width:min(430px,52%); min-height:46px; padding:0 12px; color:var(--muted); background:var(--bg); border:1px solid var(--line); border-radius:12px; }
.search-box span { font-size:23px; }
.search-box input { width:100%; border:0; outline:0; color:var(--ink); background:transparent; font-size:13px; }
.search-box kbd { white-space:nowrap; padding:2px 7px; border:1px solid var(--line); border-radius:6px; font-size:10px; }
.contents-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.contents-grid a { padding:9px 11px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; text-decoration:none; color:var(--muted); font-size:11px; transition:.18s; }
.contents-grid a:hover { color:var(--ink); border-color:var(--gold); transform:translateY(-1px); }
.search-status { min-height:1em; margin:9px 0 0; color:var(--muted); font-size:11px; }
.platform-cards,.two-column { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.platform-icon { font-size:28px; }
.info-card h3,.module-card h3,.map-grid h3 { margin:5px 0; font-size:16px; }
.info-card p,.module-card p,.map-grid p { color:var(--muted); font-size:13px; margin-bottom:8px; }
.info-card a { color:var(--gold); font-size:12px; font-weight:800; }
.tab-cards { display:grid; grid-template-columns:repeat(5,1fr); gap:9px; margin:20px 0; }
.tab-cards article { min-height:138px; padding:14px; background:var(--navy); border:1px solid rgba(196,154,54,.3); border-radius:15px; color:#f8f5ec; }
.tab-cards article span { color:var(--gold-light); font-size:25px; }
.tab-cards h3 { margin:4px 0; font-size:14px; }
.tab-cards p { margin:0; color:#c3cbda; font-size:11px; line-height:1.8; }
.guide-figure { width:min(300px,100%); margin:22px auto 0; padding:9px; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; }
.guide-figure img { display:block; width:100%; height:auto; border-radius:9px; }
.guide-figure figcaption { padding:8px 4px 2px; color:var(--muted); font-size:10px; line-height:1.7; }
.guide-figure-wide { width:min(360px,100%); }
.numbered-list { padding-right:23px; margin:14px 0; }
.numbered-list li { padding:4px 4px; margin:3px 0; }
.numbered-list b { color:var(--navy-2); }
body[data-theme="dark"] .numbered-list b { color:var(--gold-light); }
.tip-line { padding:13px 16px; margin:18px 0; background:var(--gold-soft); border-radius:12px; font-size:13px; }
.tip-line b { color:var(--gold); }
.module-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:18px 0; }
.module-grid-three { grid-template-columns:repeat(3,1fr); }
.module-card { padding:15px; }
.module-card h3 { font-size:13px; }
.module-card p { margin:0; font-size:11px; }
.guide-details { margin:9px 0; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; }
.guide-details summary { padding:12px 15px; cursor:pointer; font-weight:800; font-size:13px; }
.guide-details summary::marker { color:var(--gold); }
.guide-details > div { padding:0 15px 14px; color:var(--muted); font-size:12px; }
.guide-details > div p { margin:0; }
.guide-details ol { padding-right:20px; }
.backup-route { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px; padding:14px; margin:20px 0; color:var(--navy); background:var(--gold-soft); border:1px solid color-mix(in srgb,var(--gold) 35%,var(--line)); border-radius:14px; font-size:12px; font-weight:800; text-align:center; }
.backup-route i { color:var(--gold); font-style:normal; }
.chapter > h3 { margin:26px 0 8px; font-size:17px; }
.simple-checks p { margin:4px 0 !important; }
.faq-list { margin-top:16px; }
.support-card { display:flex; align-items:center; gap:13px; margin-top:20px; padding:17px; color:#fff; background:var(--navy); border:1px solid rgba(196,154,54,.38); border-radius:15px; text-decoration:none; }
.support-card > span { font-size:28px; }
.support-card div { display:grid; flex:1; }
.support-card strong { color:var(--gold-light); }
.support-card small { color:#c2ccdb; font-size:11px; }
.support-card > b { color:#fff; font-size:12px; }
.map-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px; }
.map-grid h3 { color:var(--gold); }
.map-grid p { margin:0; font-size:11px; }
.feature-catalog { margin-top:24px; }
.feature-catalog > h3 { margin:0 0 4px; font-size:18px; }
.feature-catalog > p { color:var(--muted); font-size:12px; }
.feature-catalog ul { margin:0; padding-right:20px; }
.feature-catalog li { padding:2px 0; }
.final-card { display:flex; align-items:center; gap:17px; margin-top:34px; padding:24px; color:#fff; background:linear-gradient(115deg,#131d30,#25314a); border:1px solid rgba(196,154,54,.4); border-radius:20px; }
.final-icon { display:grid; place-items:center; width:48px; height:48px; flex:none; color:#211807; background:var(--gold-light); border-radius:50%; font-size:24px; font-weight:900; }
.final-card div { flex:1; }
.final-card h2 { margin:0 0 3px; color:#fff; font-size:18px; }
.final-card p:last-child { margin:0; color:#c2ccdb; font-size:12px; }
.guide-footer { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:20px max(22px, calc((100vw - 1180px)/2)); border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.guide-footer a { color:var(--ink); text-decoration:none; font-weight:800; }
.back-top { position:fixed; left:18px; bottom:18px; display:none; width:42px; height:42px; color:#211807; background:var(--gold-light); border:0; border-radius:50%; box-shadow:var(--shadow); cursor:pointer; font-size:20px; }
.back-top.visible { display:block; }
.no-search-match { display:none !important; }
@media (max-width:900px) { .header-links { display:none; } .contents-grid { grid-template-columns:repeat(3,1fr); } .module-grid { grid-template-columns:repeat(2,1fr); } .steps { grid-template-columns:repeat(3,1fr); } .tab-cards { grid-template-columns:repeat(3,1fr); } .map-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:620px) {
  body { font-size:15px; }
  .guide-header { min-height:64px; padding:8px 12px; gap:8px; }
  .brand { gap:7px; min-width:0; }
  .brand img { width:34px; height:34px; }
  .brand strong { font-size:12px; }
  .brand small { font-size:9px; }
  .header-actions { gap:2px; }
  .quiet-button { padding:6px 5px; font-size:10px; }
  .header-actions .button { min-height:37px; padding:6px 10px; font-size:11px; }
  .page-shell { padding:14px 12px 44px; }
  .hero { grid-template-columns:1fr; min-height:0; padding:30px 20px; border-radius:18px; }
  .hero h1 { font-size:29px; }
  .hero-lead { font-size:14px; }
  .hero-mark { display:none; }
  .guide-meta { gap:5px; }
  .guide-meta span { font-size:9px; }
  .truth-strip { grid-template-columns:1fr; gap:7px; margin:12px 0 24px; }
  .truth-strip article { padding:12px 14px; }
  .chapter { margin:20px 0; padding:19px 15px; border-radius:16px; }
  .section-heading { gap:10px; margin-bottom:17px; }
  .section-number { width:41px; height:41px; border-radius:12px; }
  .section-heading h2 { font-size:21px; }
  .contents-panel { padding:18px 14px; border-radius:16px; }
  .contents-title { display:block; }
  .contents-title h2 { font-size:20px; }
  .search-box { width:100%; margin-top:13px; }
  .contents-grid { grid-template-columns:repeat(2,1fr); gap:6px; }
  .contents-grid a { font-size:10px; padding:8px; }
  .steps { grid-template-columns:1fr; gap:8px; }
  .steps li { min-height:0; padding:39px 13px 12px; }
  .steps span { font-size:11px; }
  .platform-cards,.two-column { grid-template-columns:1fr; }
  .tab-cards { grid-template-columns:repeat(2,1fr); }
  .tab-cards article { min-height:125px; }
  .module-grid,.module-grid-three { grid-template-columns:1fr; gap:8px; }
  .module-card { padding:13px; }
  .module-card h3 { font-size:13px; }
  .module-card p { font-size:12px; }
  .map-grid { grid-template-columns:1fr; }
  .backup-route { gap:5px; font-size:10px; }
  .support-card { flex-wrap:wrap; }
  .support-card > b { width:100%; padding-right:40px; }
  .final-card { align-items:flex-start; flex-wrap:wrap; padding:17px; }
  .final-card div { min-width:calc(100% - 70px); }
  .final-card h2 { font-size:16px; }
  .guide-footer { align-items:flex-start; flex-direction:column; padding:17px 14px; }
}
@media print {
  :root,body[data-theme="dark"] { color-scheme:light; --bg:#fff; --surface:#fff; --surface-2:#f4f5f7; --ink:#172033; --muted:#4d596a; --line:#d9dee6; --gold:#a8801e; --gold-light:#d7b451; --gold-soft:#faf4e3; --info:#edf4f8; --warn:#fff7e8; --navy:#101827; --navy-2:#18243a; }
  @page { size:A4; margin:15mm 14mm 17mm; @bottom-right { content:"ديوان العقود الملكي  •  صفحة " counter(page); color:#687286; font:8pt Tahoma,Arial,sans-serif; } }
  html { scroll-behavior:auto; }
  body { background:#fff; font-size:10pt; line-height:1.7; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .guide-header { position:static; min-height:0; padding:0 0 10px; background:#fff; border-bottom:1px solid #d9dee6; backdrop-filter:none; }
  .header-links,.header-actions,.back-top,.search-box,.search-status,.skip-link { display:none !important; }
  .page-shell { max-width:none; padding:12px 0 0; }
  .hero { min-height:0; padding:25px; border-radius:14px; box-shadow:none; break-inside:avoid; }
  .hero h1 { font-size:30pt; }
  .hero-lead { font-size:11pt; }
  .hero-mark span { width:100px; height:100px; font-size:54px; }
  .truth-strip { gap:7px; margin:12px 0 18px; }
  .truth-strip article { padding:10px; }
  .truth-strip strong { font-size:10pt; }
  .truth-strip p { font-size:8pt; }
  .contents-panel { padding:16px; box-shadow:none; break-inside:avoid; }
  .contents-title h2 { font-size:17pt; }
  .contents-grid { grid-template-columns:repeat(3,1fr); }
  .contents-grid a { font-size:8pt; padding:6px; }
  .chapter { margin:0; padding:7mm 0; border:0; border-radius:0; box-shadow:none; break-before:auto; break-inside:auto; }
  #contracts.chapter,#cases.chapter,#office-work.chapter,#backup.chapter,#troubleshoot.chapter { break-before:page; }
  #navigation .guide-figure,#library .guide-figure { display:none !important; }
  .section-heading { break-after:avoid; }
  .quick-start { margin-top:8mm; padding-top:0; break-before:auto; }
  .section-heading h2 { font-size:19pt; }
  .steps { grid-template-columns:repeat(3,1fr); }
  .steps li { min-height:0; padding-bottom:9px; }
  .steps span { font-size:8pt; }
  .platform-cards,.two-column { grid-template-columns:repeat(2,1fr); }
  .tab-cards { grid-template-columns:repeat(5,1fr); }
  .tab-cards article { min-height:0; padding:9px; }
  .tab-cards p { font-size:8pt; }
  .module-grid { grid-template-columns:repeat(3,1fr); gap:6px; }
  .module-grid-three { grid-template-columns:repeat(3,1fr); }
  .module-card,.info-card,.map-grid article { padding:9px; break-inside:avoid; }
  .module-card h3,.info-card h3,.map-grid h3 { font-size:10pt; }
  .module-card p,.info-card p,.map-grid p { font-size:8pt; }
  .guide-figure { width:235px; margin:13px auto; break-inside:avoid; }
  .guide-figure-wide { width:260px; }
  details.guide-details { break-inside:avoid; }
  details.guide-details > *:not(summary) { display:block !important; }
  .guide-details summary { padding:7px 10px; }
  .guide-details > div { padding:0 10px 9px; }
  .map-grid { grid-template-columns:repeat(2,1fr); }
  .final-card { margin-top:8mm; break-before:auto; }
  .guide-footer { padding:10px 0 0; font-size:8pt; }
  a { text-decoration:none; }
}
