/* حقيبة تم — أنماط النواة (بادئة .co-) — بلا ألوان حرفية: كل شيء من theme.css */
html,body{height:100%}
body{overflow-x:hidden}
.co-ic{flex:none;display:block}
#co-app{min-height:100dvh;display:flex;flex-direction:column}

/* ---- الشريط العلوي ---- */
#co-bar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:4px;min-height:56px;padding:env(safe-area-inset-top,0) 8px 0;background:var(--surface);border-bottom:1px solid var(--line);box-shadow:inset 0 3px 0 var(--flame)}
#co-title{flex:1;margin:0;font-size:1.1rem;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 6px 0}
#co-bar-actions{display:flex;align-items:center;padding-top:3px}
.co-ibtn{width:var(--tap);height:var(--tap);min-width:var(--tap);display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:50%;background:transparent;color:var(--ink);cursor:pointer;padding:0}
.co-ibtn:hover{background:var(--sunk)}
.co-ibtn.on{color:var(--flame)}
.co-ibtn.on svg{fill:var(--flame)}

/* ---- المحتوى ---- */
#co-view{flex:1;min-width:0;padding-bottom:calc(76px + env(safe-area-inset-bottom,0px));outline:0}
body.co-bare #co-view{padding-bottom:0}
body.co-bare #co-tabs{display:none}
.co-page{max-width:880px;margin:0 auto;padding:12px 16px 24px;display:flex;flex-direction:column;gap:14px}
.co-page h2{font-size:1.05rem;margin:0 0 8px}
.co-h{margin:0 0 10px;font-size:1.1rem}
.co-h1{margin:4px 0 0;font-size:1.4rem}
.co-note{font-size:.88rem;margin:0}
.co-center{justify-content:center}
.co-boot{padding-top:30vh}
.co-ph{padding-top:12vh}
.co-sec{display:flex;flex-direction:column}
.co-sechead{justify-content:space-between}
.co-sechead h2{margin:0}
.co-actions{margin-top:14px}
.co-stack{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.co-stack .btn{width:100%}
.co-hero{display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center}
.co-hero strong{font-size:1.15rem}
.co-searchfake{display:flex;align-items:center;gap:10px;min-height:var(--tap);padding:0 14px;border:1px solid var(--line);border-radius:99px;background:var(--surface);color:var(--muted);cursor:pointer;text-align:start}

/* ---- التبويبات السفلية ---- */
#co-tabs{position:fixed;inset-inline:0;bottom:0;z-index:30;display:flex;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom,0px)}
.co-tab{flex:1;min-width:0;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--muted);text-decoration:none;font-size:.74rem;font-weight:600}
.co-tab[aria-current]{color:var(--brand)}
.co-tab[aria-current] svg{stroke-width:2.2}
@media (min-width:900px){
  #co-tabs{inset-inline-end:auto;top:0;width:92px;flex-direction:column;justify-content:flex-start;gap:4px;border-top:0;border-inline-end:1px solid var(--line);padding-top:12px}
  .co-tab{flex:none;min-height:68px}
  #co-app{margin-inline-start:92px}
  #co-view{padding-bottom:24px}
  body.co-bare #co-app{margin-inline-start:0}
}

/* ---- ملفات ---- */
.co-file{align-items:center}
.co-file .title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.co-file .sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.co-thumb{position:relative;flex:none;width:48px;height:60px;border-radius:6px;background:var(--sunk);border:1px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;overflow:hidden;color:var(--muted)}
.co-thumb.has-img{background:var(--surface)}
.co-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.co-ext{font-size:.6rem;letter-spacing:.04em}
.co-t-pdf{color:var(--bad)}.co-t-doc,.co-t-docx{color:var(--c2)}.co-t-ppt,.co-t-pptx{color:var(--c1)}.co-t-xls,.co-t-xlsx{color:var(--ok)}
.co-snip{font-size:.86rem;color:var(--muted);margin-top:2px}
mark{background:var(--warn-soft);color:inherit;border-radius:3px;padding:0 2px}
.co-ficon{color:var(--muted)}
.co-listbox{min-width:0}

/* ---- المواد ---- */
.co-semhead{justify-content:space-between;flex-wrap:nowrap}
.co-semsel{flex:1;min-width:0;min-height:var(--tap);padding:0 10px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface)}
.co-courses{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:var(--gap)}
.co-course{position:relative;display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:start;min-height:112px;padding-top:18px;cursor:pointer;overflow:hidden}
.co-cbar{position:absolute;inset-inline:0;top:0;height:6px;background:var(--cc,var(--c1))}
.co-chead .co-cbar{inset-inline:auto;inset-inline-start:0;top:0;bottom:0;width:6px;height:auto}
.co-chead{position:relative;display:flex;align-items:center;gap:10px;padding-inline-start:20px;overflow:hidden}
.co-cname{font-weight:700;font-size:1rem}
.co-ctitle{font-weight:700;font-size:1.1rem}
.co-ccount{font-size:.82rem;color:var(--muted);margin-top:auto}
.co-add{align-items:center;justify-content:center;color:var(--muted);border-style:dashed}
.co-folders{gap:6px}
.co-help{align-self:flex-start}

/* ---- أدوات ---- */
.co-tool{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:start;min-height:120px;cursor:pointer}
.co-tic{color:var(--brand)}

/* ---- نماذج ---- */
.co-colors{display:flex;flex-wrap:wrap;gap:8px}
.co-color{position:relative;cursor:pointer}
.co-color input{position:absolute;opacity:0;inset:0}
.co-color span{display:block;width:40px;height:40px;border-radius:50%;border:3px solid var(--surface)}
.co-color input:checked+span{outline:3px solid var(--ink)}
.co-color input:focus-visible+span{outline:3px solid var(--flame)}
.co-radio-chip{position:relative;min-height:40px;padding:0 14px}
.co-radio-chip input{position:absolute;opacity:0;inset:0;cursor:pointer}
.co-radio-chip:has(input:checked){background:var(--brand-soft);color:var(--brand);border-color:var(--brand)}
.co-radio-chip:has(input:focus-visible){outline:2px solid var(--flame)}
.co-progress{width:100%;height:10px}
.co-names{margin:0 0 8px;font-size:.88rem}
.co-pick .row{cursor:pointer}
.co-pick input[type=checkbox],.co-pick input[type=radio]{width:20px;height:20px;flex:none}

/* ---- طبقات وتنبيهات ---- */
.co-sheet{max-width:640px;margin-inline:auto;overscroll-behavior:contain}
.co-sheet.co-wide{max-width:720px}
.co-danger{color:var(--bad)}
#co-toasts{position:fixed;inset-inline:12px;bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:70;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
body.co-bare #co-toasts{bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.co-toast{pointer-events:auto;display:flex;align-items:center;gap:12px;max-width:560px;padding:12px 16px;border-radius:10px;background:var(--ink);color:var(--bg);box-shadow:var(--shadow);font-size:.94rem}
.co-toast-error{background:var(--bad);color:var(--on-brand)}
.co-toast-ok{background:var(--ok);color:var(--on-brand)}
.co-toast-act{background:transparent;border:0;color:inherit;font-weight:700;text-decoration:underline;cursor:pointer;min-height:36px}
.co-banners{display:flex;flex-direction:column;gap:10px}
.co-banner{display:flex;align-items:center;gap:12px}
.co-banner .grow{flex:1;min-width:0}
.co-drop{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;background:var(--brand-soft);opacity:.96;font-size:1.3rem;font-weight:700;color:var(--brand);border:4px dashed var(--brand);pointer-events:none}

/* ---- العارض والأداة ---- */
.co-viewer,.co-toolbox{min-height:calc(100dvh - 60px);position:relative}
.co-modbox{min-width:0}

/* ---- الإعداد الأول ---- */
.co-onb{gap:10px}
.co-steps{font-size:.84rem}
.co-picklist{display:flex;flex-direction:column;gap:10px}
.co-picklist .list{max-height:52vh;overflow:auto}
.co-stagerow .chip{min-height:44px}
.co-free{align-self:flex-start}
.co-onb-actions{margin-top:6px}
.co-settings .card+.card{margin-top:0}
.co-inst{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
@media (max-width:380px){.co-courses{grid-template-columns:1fr 1fr}}
.co-route{display:contents}

/* ---- تحسينات بعد المراجعة المرئية ---- */
.co-file .sub{white-space:normal;line-height:1.35}
a.btn,a.row{text-decoration:none;color:inherit}
a.btn-primary{color:var(--on-brand)}
.co-help{color:var(--brand)}
a.btn-primary.co-help{color:var(--on-brand)}

/* ── تنزيل التطبيق (5 ت1 2026): زر الشريط العلوي + بطاقة الرئيسية + صفحة #/install ── */
.co-dl{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:99px;border:0;background:var(--brand);color:var(--on-brand);font-weight:700;font-size:.88rem;cursor:pointer;white-space:nowrap}
.co-dl svg{width:18px;height:18px}
.co-dlcard{border-color:var(--flame)}
.co-dlcard img{border-radius:12px;flex:none}
.co-install{display:flex;flex-direction:column;gap:16px}
.co-ihero{display:flex;gap:14px;align-items:center}
.co-ihero h2{margin:0 0 4px;font-size:1.3rem}
.co-ihero p{margin:0}
.co-iicon{border-radius:18px;flex:none;box-shadow:var(--shadow)}
.co-ifacts{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.co-ifacts li{display:flex;flex-direction:column;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:10px;font-size:.8rem;min-width:0}
.co-ifacts strong{font-size:.95rem;color:var(--brand)}
.co-ibig{width:100%;min-height:56px;font-size:1.1rem}
.co-inote{margin:-8px 0 0;font-size:.88rem;text-align:center}
.co-isec h3,.co-iblock h4{margin:0 0 8px}
.co-isteps{margin:0;padding-inline-start:1.4em;display:flex;flex-direction:column;gap:10px;line-height:1.8}
.co-isteps li::marker{color:var(--brand);font-weight:700}
.co-key{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 6px;margin:0 2px;border:1px solid var(--line);border-radius:6px;background:var(--sunk);font-weight:700;vertical-align:middle}
.co-key svg{width:16px;height:16px}
.co-icopy{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.co-icopy code{font-size:.8rem;color:var(--muted);overflow-wrap:anywhere}
.co-iother summary{cursor:pointer;font-weight:600;padding:8px 0}
.co-iblock{padding:10px 0;border-top:1px solid var(--line)}
.co-idone{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
@media (max-width:330px){.co-ifacts{grid-template-columns:1fr}}
@media (max-width:330px){.co-dl span{display:none}}
