/* =========================================================
   تمكّن — هوية الثقة | Design tokens + base components
   يُستورد هذا الملف في الموقع الفعلي كما هو، ثم تُستخدم الأصناف أدناه.
   الخط: IBM Plex Sans Arabic (رخصة SIL OFL — مجاني للاستخدام التجاري)
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap" rel="stylesheet">
   ========================================================= */

:root {
  /* ---- الألوان: ٦٠٪ ---- */
  --tm-white: #FFFFFF;          /* الخلفية الأساسية */
  --tm-surface: #F8FAFC;        /* الأقسام والبطاقات الثانوية */
  --tm-canvas: #F4F6F8;         /* خلفية البوابة (تحت الزجاج) */
  --tm-photo-bg: #F3F3F4;       /* خلفية إطارات الصور (تطابق خلفية الصور) */
  --tm-line: #E2E8F0;
  --tm-line-soft: #EEF2F6;

  /* ---- ٣٠٪ ---- */
  --tm-ink: #0F172A;            /* العناوين، الأزرار الرئيسية، التذييل */
  --tm-ink-2: #1E293B;
  --tm-emerald: #0D5341;        /* التصنيفات والوسوم */
  --tm-emerald-tint: #ECF5F2;

  /* ---- ١٠٪ ---- */
  --tm-teal: #0FA89A;           /* فيروزي الشعار: التقدم والإبراز (ليس للنص الصغير) */
  --tm-teal-ink: #0B7A6F;       /* فيروزي آمن للنصوص */
  --tm-teal-tint: #E6F6F4;
  --tm-lime: #84CC16;           /* نقطة التركيز: مربع السهم، العدّاد، النجوم — لا يُستخدم نصًا على الأبيض */
  --tm-lime-ink: #3F6212;
  --tm-lime-tint: #F2F9E6;

  /* ---- النصوص ---- */
  --tm-text: #0F172A;
  --tm-text-2: #334155;
  --tm-body: #475569;
  --tm-muted: #64748B;

  /* ---- حالات الإجابة والتغذية الراجعة ---- */
  --tm-correct: #047857;  --tm-correct-bg: #ECFDF5;  --tm-correct-line: #A7F3D0;
  --tm-wrong: #B42318;    --tm-wrong-bg: #FEF2F2;    --tm-wrong-line: #FECACA;
  --tm-warn: #92400E;     --tm-warn-bg: #FEF3C7;     --tm-warn-bar: #D97706;

  /* ---- الشكل ---- */
  --tm-r-sm: 10px;  --tm-r: 14px;  --tm-r-lg: 22px;  --tm-r-xl: 28px;
  --tm-shadow: 0 4px 6px -1px rgba(0,0,0,.05);
  --tm-shadow-lift: 0 12px 24px -6px rgba(15,23,42,.12);
  --tm-glass: rgba(255,255,255,.70);
  --tm-glass-line: rgba(255,255,255,.60);
  --tm-blur: blur(12px);

  /* ---- الحركة ---- */
  --tm-ease: cubic-bezier(.4,0,.2,1);
  --tm-dur: .3s;

  --tm-font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

html { direction: rtl; }
body { margin: 0; font-family: var(--tm-font); color: var(--tm-text); background: var(--tm-white); -webkit-font-smoothing: antialiased; }

/* ---------- الطباعة ---------- */
.tm-h1 { font-size: clamp(26px, 6vw, 34px); font-weight: 700; line-height: 1.5; }
.tm-h2 { font-size: 20px; font-weight: 700; line-height: 1.5; }
.tm-h3 { font-size: 15px; font-weight: 600; }
.tm-body { font-size: 15px; line-height: 1.9; color: var(--tm-body); }
.tm-small { font-size: 12px; color: var(--tm-muted); }
.tm-kicker { font-size: 12px; font-weight: 600; color: var(--tm-emerald); }

/* ---------- الأزرار ---------- */
.tm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px; border: 0; border-radius: var(--tm-r); font: 600 16px/1 var(--tm-font); cursor: pointer; text-decoration: none; transition: all var(--tm-dur) var(--tm-ease); }
.tm-btn-primary { background: var(--tm-ink); color: #fff; justify-content: space-between; padding: 0 20px 0 8px; min-height: 60px; }
.tm-btn-primary .tm-arrow { width: 44px; height: 44px; border-radius: 11px; background: var(--tm-lime); display: grid; place-items: center; }
.tm-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(15,23,42,.45); }
.tm-btn-lime { background: var(--tm-lime); color: var(--tm-ink); }
.tm-btn-outline { background: #fff; color: var(--tm-ink); border: 1.5px solid var(--tm-ink); }
.tm-btn:disabled { background: var(--tm-line); color: var(--tm-muted); cursor: not-allowed; transform: none; box-shadow: none; }
.tm-btn:focus-visible, .tm-card:focus-visible { outline: 3px solid var(--tm-teal); outline-offset: 2px; }

/* ---------- الأسطح ---------- */
.tm-card { background: #fff; border: 1px solid var(--tm-line-soft); border-radius: var(--tm-r); box-shadow: var(--tm-shadow); transition: all var(--tm-dur) var(--tm-ease); }
a.tm-card:hover, button.tm-card:hover { transform: translateY(-4px); box-shadow: var(--tm-shadow-lift); }
.tm-glass { background: var(--tm-glass); -webkit-backdrop-filter: var(--tm-blur); backdrop-filter: var(--tm-blur); border: 1px solid var(--tm-glass-line); }
.tm-dark { background: var(--tm-ink); color: #fff; }
.tm-grid-bg { background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 28px 28px; }
.tm-tag { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--tm-emerald); border-radius: 6px; padding: 4px 8px; }
.tm-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--tm-emerald); background: var(--tm-emerald-tint); border-radius: 999px; padding: 6px 12px; }
.tm-photo { background: var(--tm-photo-bg); overflow: hidden; }
.tm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- التبويبات (segmented) ---------- */
.tm-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; }
.tm-tab { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--tm-body); font: 500 13px var(--tm-font); cursor: pointer; transition: all var(--tm-dur) var(--tm-ease); }
.tm-tab[aria-selected="true"] { background: var(--tm-ink); color: #fff; font-weight: 600; }

/* ---------- خيارات الأسئلة ---------- */
.tm-option { border: 1px solid var(--tm-line); border-radius: 16px; background: #fff; box-shadow: var(--tm-shadow); min-height: 72px; cursor: pointer; transition: all var(--tm-dur) var(--tm-ease); }
.tm-option .tm-letter { width: 32px; height: 32px; border-radius: 9px; background: #F1F5F9; color: var(--tm-body); font-weight: 600; display: grid; place-items: center; }
.tm-option[aria-checked="true"] { border: 2px solid var(--tm-ink); box-shadow: 0 10px 20px -8px rgba(15,23,42,.25); }
.tm-option[aria-checked="true"] .tm-letter { background: var(--tm-ink); color: var(--tm-lime); }

/* ---------- التغذية الراجعة ---------- */
.tm-fb-wrong   { border: 1px solid var(--tm-wrong-line);   background: var(--tm-wrong-bg);   color: var(--tm-wrong);   border-radius: 12px; padding: 10px 12px; }
.tm-fb-correct { border: 1px solid var(--tm-correct-line); background: var(--tm-correct-bg); color: var(--tm-correct); border-radius: 12px; padding: 10px 12px; }
.tm-fb-why     { background: var(--tm-surface); border-radius: 12px; padding: 12px; color: var(--tm-text-2); }
.tm-fb-tip     { background: var(--tm-lime-tint); color: var(--tm-lime-ink); border-radius: 12px; padding: 10px 12px; }

/* ---------- الحركة ---------- */
@keyframes tm-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.tm-reveal { opacity: 0; }
.tm-reveal.is-visible { animation: tm-rise .6s var(--tm-ease) forwards; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tm-reveal { opacity: 1; }
}

/* =========================================================
   تمكّن — أنماط الموقع (مبنية على المتغيرات أعلاه)
   الملف أعلاه (brand/tokens.css) منسوخ كما هو دون تعديل.
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; overflow-x: hidden; line-height: 1.7; transition: background-color var(--tm-dur) var(--tm-ease); }
body[data-bg="white"] { background: var(--tm-white); }
body[data-bg="canvas"] { background: var(--tm-canvas); }
body[data-bg="surface"] { background: var(--tm-surface); }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--tm-teal-ink); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--tm-teal); outline-offset: 2px; border-radius: 10px; }
.center { text-align: center; justify-content: center; }

/* أيقونات خطية */
.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic-lime { color: var(--tm-lime); } .ic-ink { color: var(--tm-ink); } .ic-em { color: var(--tm-emerald); }
.ic-teal { color: var(--tm-teal-ink); } .ic-warn { color: var(--tm-warn-bar); }

/* ---------- الهيكل ---------- */
.tm-app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
body.has-nav .tm-app { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
.screen { display: none; position: relative; overflow-x: clip; min-height: 100vh; }
.screen.active { display: block; }
.page { position: relative; z-index: 1; padding: 16px 16px 28px; }
.page.narrow { max-width: 380px; margin: 0 auto; padding-top: 32px; }
.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; animation: tm-drift 14s ease-in-out infinite; }
.blob-a { width: 360px; height: 360px; top: -110px; right: -120px; background: radial-gradient(circle, rgba(15,168,154,.30), rgba(15,168,154,0) 66%); }
.blob-b { width: 300px; height: 300px; top: 520px; left: -140px; background: radial-gradient(circle, rgba(132,204,22,.20), rgba(132,204,22,0) 66%); animation-delay: -7s; }
.blob-c { width: 340px; height: 340px; top: -120px; left: -110px; background: radial-gradient(circle, rgba(15,168,154,.24), rgba(15,168,154,0) 66%); }
.blob-d { width: 340px; height: 340px; top: -110px; right: -120px; background: radial-gradient(circle, rgba(132,204,22,.22), rgba(132,204,22,0) 66%); }
@keyframes tm-drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-16px,12px); } }

/* الشريط العلوي الزجاجي */
.tm-topbar { position: sticky; top: max(12px, env(safe-area-inset-top, 0px)); z-index: 30; margin: 12px 12px 0; height: 64px; padding: 0 10px; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: var(--tm-shadow); background: rgba(255,255,255,.65); }
.tb-title { font-size: 15px; font-weight: 600; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-mark { width: 44px; height: 38px; object-fit: contain; flex-shrink: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--tm-line); background: #fff; display: grid; place-items: center; flex-shrink: 0; color: var(--tm-ink); transition: all var(--tm-dur) var(--tm-ease); }
.icon-btn:hover { border-color: var(--tm-ink); }
.plain-head, .quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 52px; margin: 16px 16px 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.who-t small { font-size: 12px; color: var(--tm-muted); }
.who-t strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--tm-emerald); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 600; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }

/* الأزرار المساعدة */
.tm-btn { width: 100%; }
.tm-btn-primary span:first-child { flex: 1; text-align: right; }
.tm-btn-dark { background: var(--tm-ink); color: #fff; min-height: 54px; }
.tm-btn-dark:hover { transform: translateY(-2px); box-shadow: var(--tm-shadow-lift); }
.tm-btn-outline:hover { background: var(--tm-surface); }
.tm-btn.sm { min-height: 44px; font-size: 13px; width: auto; padding: 0 14px; }
.tm-btn.wide { margin-top: 14px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; background: transparent; font-size: 13px; font-weight: 500; color: var(--tm-body); border-radius: 10px; }
.link-btn:hover { color: var(--tm-ink); }
.link-btn.center { display: flex; margin: 10px auto 0; }
.link-btn .ic { width: 17px; height: 17px; }

/* ---------- ١. الواجهة الهادئة ---------- */
#s-landing { overflow: hidden; }
.home { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding: max(28px, env(safe-area-inset-top, 0px)) 24px max(20px, env(safe-area-inset-bottom, 0px)); text-align: center; }
.home-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; top: 40px; left: 50%; margin-left: -260px; background: radial-gradient(circle, rgba(15,168,154,.10), rgba(15,168,154,0) 62%); pointer-events: none; }
.home-logo { position: relative; height: 104px; width: auto; }
.home-art { position: relative; margin-top: 22px; width: 330px; max-width: 100%; height: 292px; }
.home-ring { position: absolute; top: 4px; left: 50%; width: 270px; height: 270px; margin-left: -135px; animation: tm-spin 40s linear infinite; }
.home-arch { position: absolute; top: 18px; left: 50%; margin-left: -100px; width: 200px; height: 262px; border-radius: 100px 100px 28px 28px; box-shadow: 0 30px 60px -28px rgba(15,23,42,.35); }
.home-arch img { object-position: 50% 20%; }
.home-bubble { position: absolute; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 16px 30px -14px rgba(15,23,42,.35); animation: tm-float 6s ease-in-out infinite; }
.home-bubble.b1 { top: 34px; right: 0; width: 92px; height: 92px; }
.home-bubble.b1 img { object-position: 50% 12%; }
.home-bubble.b2 { bottom: 30px; left: 0; width: 100px; height: 100px; animation-delay: -3s; }
.home-bubble.b2 img { object-position: 50% 10%; }
.home-spark { position: absolute; fill: var(--tm-teal); stroke: none; animation: tm-twinkle 3.4s ease-in-out infinite; }
.home-spark.s1 { top: 4px; left: 44px; width: 22px; height: 22px; }
.home-spark.s2 { bottom: 12px; right: 40px; width: 14px; height: 14px; fill: var(--tm-lime); animation-delay: -1.7s; }
.home-copy { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
.home-title { margin: 26px 0 0; font-size: clamp(26px, 7.2vw, 34px); font-weight: 700; line-height: 1.55; text-wrap: balance; }
.home-title span { color: var(--tm-teal-ink); }
.home-desc { margin: 10px 0 0; font-size: 15px; line-height: 1.9; color: var(--tm-body); max-width: 330px; }
.home-cta { margin-top: 24px; border-radius: 16px; font-size: 17px; padding: 0 22px 0 8px; }
.home-foot { position: relative; margin-top: auto; padding-top: 14px; width: 100%; border-top: 1px solid var(--tm-line-soft); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.home-copy { margin-bottom: 28px; }
.home-foot .l1 { font-size: 12px; font-weight: 600; color: var(--tm-ink); }
.home-foot .l2 { font-size: 11px; color: var(--tm-body); }
.home-foot .l3 { font-size: 11px; color: var(--tm-muted); }
@keyframes tm-spin { to { transform: rotate(360deg); } }
@keyframes tm-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes tm-twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: .85; } 50% { transform: scale(1.25) rotate(18deg); opacity: 1; } }
.fx { opacity: 0; animation: tm-rise .9s var(--tm-ease) forwards; }
.f1 { animation-delay: .05s; } .f2 { animation-delay: .25s; } .f3 { animation-delay: .45s; } .f4 { animation-delay: .65s; } .f5 { animation-delay: .85s; } .f6 { animation-delay: 1.05s; }

/* ---------- ٢. نموذج الدخول ---------- */
.entry-intro { padding: 8px 4px 14px; }
.entry-intro p { margin: 4px 0 0; font-size: 14px; color: var(--tm-body); }
.form-card { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; border-radius: var(--tm-r-lg); }
.form-card h1 { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tm-text-2); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--tm-line); border-radius: 12px; background: var(--tm-surface); font-size: 15px; font-weight: 400; color: var(--tm-text); transition: border-color var(--tm-dur) var(--tm-ease), background var(--tm-dur) var(--tm-ease); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; background-size: 18px; padding-left: 40px; }
.field textarea { min-height: 96px; line-height: 1.7; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--tm-ink); background: #fff; box-shadow: 0 0 0 3px rgba(15,168,154,.18); }
.field.invalid input, .field.invalid select { border-color: var(--tm-wrong); background: var(--tm-wrong-bg); }
.form-error { margin: 0; font-size: 13px; font-weight: 600; color: var(--tm-wrong); background: var(--tm-wrong-bg); border: 1px solid var(--tm-wrong-line); border-radius: 10px; padding: 8px 12px; }

/* ---------- ٣. البوابة ---------- */
.portal-q { margin: 4px 4px 0; font-size: 24px; font-weight: 700; line-height: 1.5; }
.doors { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.door { width: 100%; min-height: 164px; border-radius: var(--tm-r-lg); box-shadow: var(--tm-shadow); display: flex; overflow: hidden; padding: 0; text-align: right; color: var(--tm-ink); transition: all var(--tm-dur) var(--tm-ease); }
.door:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -14px rgba(15,23,42,.25); }
.door:hover .door-ph img { transform: scale(1.04); }
.door-t { position: relative; flex: 1; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.door-k { font-size: 12px; font-weight: 600; color: var(--tm-emerald); }
.door-t strong { font-size: 19px; font-weight: 700; line-height: 1.4; }
.door-d { font-size: 13px; line-height: 1.7; color: var(--tm-body); }
.door-go { margin-top: auto; align-self: flex-start; width: 36px; height: 36px; border-radius: 10px; background: var(--tm-ink); display: grid; place-items: center; }
.door-go .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.door-ph { position: relative; width: 128px; flex-shrink: 0; }
.door-ph img { transition: transform .5s var(--tm-ease); }
.door-dark { min-height: 176px; background-color: var(--tm-ink); color: #fff; border: 0; box-shadow: 0 18px 34px -16px rgba(15,23,42,.5); background-size: 22px 22px; }
.door-dark .door-k { color: var(--tm-lime); }
.door-dark strong { color: #fff; }
.door-dark .door-d { color: #CBD5E1; }
.door-cta { margin-top: auto; align-self: flex-start; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--tm-lime); color: var(--tm-ink); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.door-cta .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.mini-links { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.mini { min-height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--tm-ink); text-decoration: none; transition: all var(--tm-dur) var(--tm-ease); }
.mini:hover { transform: translateY(-2px); }
.disclaimer { margin: 14px 6px 0; font-size: 11px; line-height: 1.8; color: var(--tm-muted); text-align: center; }

/* ---------- ٤. التسجيل والمواعيد ---------- */
.hero-dark { position: relative; border-radius: var(--tm-r-lg); background: var(--tm-ink); color: #fff; overflow: hidden; display: flex; min-height: 150px; }
.hd-t { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hd-t strong { font-size: 17px; font-weight: 700; line-height: 1.6; }
.hd-t > span { font-size: 12px; line-height: 1.8; color: #CBD5E1; }
.lime-btn { margin-top: auto; align-self: flex-start; min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--tm-lime); color: var(--tm-ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: all var(--tm-dur) var(--tm-ease); }
.lime-btn:hover { transform: translateY(-2px); }
.lime-btn .ic { width: 16px; height: 16px; }
.hd-ph { width: 110px; flex-shrink: 0; }
.tabs-bar { position: sticky; top: calc(max(12px, env(safe-area-inset-top, 0px)) + 72px); z-index: 20; margin-top: 16px; box-shadow: var(--tm-shadow); }
.tm-tab { padding: 0 4px; line-height: 1.3; }
.pane { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; animation: tm-rise .4s var(--tm-ease) both; }
.pane-intro { margin: 0 4px; font-size: 13px; line-height: 1.8; color: var(--tm-body); }
.sec-t { margin: 10px 4px 0; font-size: 15px; font-weight: 600; scroll-margin-top: 150px; }
.acc { overflow: hidden; border-radius: 16px; }
.acc-h { width: 100%; min-height: 64px; border: 0; background: transparent; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: right; color: var(--tm-ink); }
.acc-n { width: 36px; height: 36px; border-radius: 10px; background: var(--tm-emerald-tint); color: var(--tm-emerald); font-size: 15px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; transition: all var(--tm-dur) var(--tm-ease); }
.acc.is-open .acc-n { background: var(--tm-ink); color: var(--tm-lime); }
.acc-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-t strong { font-size: 14px; font-weight: 600; line-height: 1.6; }
.acc-t small { font-size: 11px; color: var(--tm-muted); }
.acc-c { width: 18px; height: 18px; color: var(--tm-muted); transition: transform var(--tm-dur) var(--tm-ease); }
.acc.is-open .acc-c { transform: rotate(180deg); }
.steps { display: none; counter-reset: s; list-style: none; margin: 0; padding: 0 14px 14px; flex-direction: column; gap: 8px; }
.acc.is-open .steps { display: flex; animation: tm-rise .4s var(--tm-ease) both; }
.steps li { counter-increment: s; position: relative; padding-right: 32px; font-size: 13px; line-height: 1.85; color: var(--tm-text-2); }
.steps li::before { content: counter(s, arabic-indic); position: absolute; right: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #F1F5F9; color: var(--tm-emerald); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ui { display: inline-block; background: var(--tm-emerald-tint); color: var(--tm-emerald); border-radius: 6px; padding: 0 6px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.tip { margin-top: 6px; background: var(--tm-lime-tint); color: var(--tm-lime-ink); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.pay-opts { display: grid; gap: 6px; margin-top: 6px; }
.pay-opts > div { background: var(--tm-surface); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.list { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; }
.list-row { min-height: 56px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; color: var(--tm-ink); text-decoration: none; border-bottom: 1px solid #F1F5F9; transition: background var(--tm-dur) var(--tm-ease); }
.list-row:last-child, .list > :last-child { border-bottom: 0; }
.list-row:hover { background: var(--tm-surface); }
.list-row .ic { width: 18px; height: 18px; }
.lr-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lr-t b { font-size: 13px; font-weight: 500; line-height: 1.6; }
.lr-t small { font-size: 11px; color: var(--tm-muted); line-height: 1.6; }
.lr-go { font-size: 12px; font-weight: 600; color: var(--tm-teal-ink); flex-shrink: 0; }
.ready { padding: 14px; display: flex; flex-direction: column; gap: 8px; border-radius: 16px; }
.ready-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--tm-body); }
.ready-row strong { color: var(--tm-ink); font-weight: 600; }
.bar { height: 8px; border-radius: 999px; background: var(--tm-line-soft); overflow: hidden; }
.bar-fill { width: 0; height: 100%; border-radius: 999px; background: var(--tm-teal); transition: width .4s var(--tm-ease); }
.checks { display: flex; flex-direction: column; gap: 10px; }
.check { width: 100%; min-height: 72px; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: right; color: var(--tm-ink); font-size: 13px; line-height: 1.8; }
.check:hover { transform: translateY(-2px); }
.cbox { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #CBD5E1; display: grid; place-items: center; flex-shrink: 0; transition: all var(--tm-dur) var(--tm-ease); }
.cbox .ic { width: 18px; height: 18px; stroke-width: 2.4; opacity: 0; }
.check[aria-checked="true"] .cbox { background: var(--tm-ink); border-color: var(--tm-ink); }
.check[aria-checked="true"] .cbox .ic { opacity: 1; }
.check[aria-checked="true"] > span:last-child { color: var(--tm-body); }
.next-date { display: flex; gap: 10px; align-items: flex-start; background: var(--tm-ink); color: #fff; border-radius: 16px; padding: 14px; font-size: 13px; line-height: 1.8; }
.next-date .ic { margin-top: 3px; }
.next-date b { color: var(--tm-lime); font-weight: 600; }
.kv { padding: 6px 16px; border-radius: 16px; display: flex; flex-direction: column; }
.kv > div { padding: 12px 0; border-bottom: 1px solid #F1F5F9; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--tm-muted); flex-shrink: 0; }
.kv strong { font-weight: 600; text-align: left; }
.timeline { padding: 16px; border-radius: 16px; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tm-ink); border: 3px solid var(--tm-line); margin-top: 5px; }
.tl-line { width: 2px; flex: 1; background: var(--tm-line); }
.tl-item:last-child .tl-line { display: none; }
.tl-body { padding-bottom: 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-item:last-child .tl-body { padding-bottom: 0; }
.tl-title { font-size: 14px; font-weight: 600; line-height: 1.6; }
.tl-date { font-size: 12.5px; color: var(--tm-body); line-height: 1.7; }
.tl-badge { align-self: flex-start; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--tm-muted); background: var(--tm-surface); border-radius: 6px; padding: 2px 8px; }
.tl-item.past .tl-dot { background: #CBD5E1; }
.tl-item.past .tl-title, .tl-item.past .tl-date { color: var(--tm-muted); }
.tl-item.next .tl-dot, .tl-item.today .tl-dot { background: var(--tm-teal); border-color: var(--tm-teal-tint); }
.tl-item.next .tl-badge, .tl-item.today .tl-badge { color: var(--tm-lime-ink); background: var(--tm-lime-tint); }
.event { border-radius: 18px; overflow: hidden; }
.event-top { padding: 18px; display: flex; flex-direction: column; gap: 6px; background-size: 22px 22px; }
.ev-pill { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--tm-lime); }
.event-top strong { font-size: 17px; line-height: 1.6; }
.ev-en { font-size: 12px; color: #CBD5E1; text-align: right; }
.event-body { padding: 16px; }
.event-body > p:first-child { margin: 0 0 12px; font-size: 13px; line-height: 1.9; color: var(--tm-body); }
.ev-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.ev-meta > div { background: var(--tm-surface); border-radius: 12px; padding: 9px 8px; text-align: center; display: flex; flex-direction: column; }
.ev-meta span { font-size: 11px; color: var(--tm-muted); }
.ev-meta strong { font-size: 12px; font-weight: 600; line-height: 1.5; }
.ev-cal-t { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin: 16px 0 8px; }
.ev-cal-t .ic { width: 18px; height: 18px; }
.cal-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.cal-btn { min-height: 48px; border-radius: 12px; border: 1px solid var(--tm-line); background: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tm-ink); text-decoration: none; }
.cal-btn:hover { border-color: var(--tm-ink); }
.cal-btn .ic { width: 18px; height: 18px; }
.qa { border-bottom: 1px solid #F1F5F9; }
.qa summary { list-style: none; min-height: 56px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; line-height: 1.6; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ic { width: 18px; height: 18px; }
.qa .qa-c { margin-right: auto; color: var(--tm-muted); transition: transform var(--tm-dur) var(--tm-ease); }
.qa[open] .qa-c { transform: rotate(180deg); }
.qa p { margin: 0; padding: 0 42px 14px 14px; font-size: 13px; line-height: 1.85; color: var(--tm-text-2); }
.help-ref { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; padding: 16px; border-radius: 18px; background: var(--tm-teal-tint); border: 1px solid rgba(15,168,154,.35); color: var(--tm-ink); text-decoration: none; scroll-margin-top: 150px; transition: all var(--tm-dur) var(--tm-ease); }
.help-ref:hover { transform: translateY(-4px); box-shadow: var(--tm-shadow-lift); }
.hr-ic { width: 46px; height: 46px; border-radius: 14px; background: #fff; color: var(--tm-teal-ink); display: grid; place-items: center; box-shadow: var(--tm-shadow); }
.hr-ic .ic { width: 24px; height: 24px; }
.hr-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hr-t strong { font-size: 14px; font-weight: 600; line-height: 1.6; }
.hr-t small { font-size: 12px; color: var(--tm-body); line-height: 1.7; }
.hr-go { grid-column: 1 / -1; min-height: 46px; border-radius: 12px; background: var(--tm-ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; }
.hr-go .ic { width: 16px; height: 16px; color: var(--tm-lime); }
.support { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; }
.sp-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--tm-emerald-tint); color: var(--tm-emerald); display: grid; place-items: center; flex-shrink: 0; }
.sp-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sp-t strong { font-size: 13.5px; font-weight: 600; line-height: 1.6; }
.sp-t small { font-size: 12px; color: var(--tm-muted); line-height: 1.6; }
.sp-call { min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--tm-ink); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 1px; display: grid; place-items: center; text-decoration: none; }

/* ---------- ٥. التدريب ---------- */
.lib-hero { display: flex; min-height: 150px; overflow: hidden; border-radius: var(--tm-r-lg); }
.lh-ph { width: 116px; flex-shrink: 0; }
.lh-t { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.lh-t strong { font-size: 20px; font-weight: 700; line-height: 1.5; }
.lh-t > span:last-child { font-size: 13px; line-height: 1.8; color: var(--tm-body); }
.lib-group { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; animation: tm-rise .4s var(--tm-ease) both; }
.lvl-grades { margin: 6px 4px 0; font-size: 12px; color: var(--tm-muted); }
.grp { margin: 12px 4px 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--tm-emerald); }
.grp::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tm-lime); }
.res { min-height: 76px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; color: var(--tm-ink); text-decoration: none; border-radius: 16px; }
.res:hover { transform: translateY(-4px); box-shadow: var(--tm-shadow-lift); }
.res-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--tm-emerald-tint); color: var(--tm-emerald); display: grid; place-items: center; flex-shrink: 0; }
.res-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.res-t b { font-size: 14px; font-weight: 600; line-height: 1.6; }
.res-t small { font-size: 12px; color: var(--tm-muted); }
.res-go { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--tm-teal-ink); background: var(--tm-teal-tint); border-radius: 8px; padding: 6px 10px; white-space: nowrap; }

/* ---------- عن المبادرة ---------- */
.about-hero { padding: 22px; text-align: center; border-radius: var(--tm-r-lg); }
.about-hero img { height: 140px; width: auto; margin: 0 auto; }
.about-hero p { margin: 12px 0 0; font-size: 16px; font-weight: 600; color: var(--tm-teal-ink); }
.about-sec { margin-top: 12px; padding: 18px 16px; border-radius: 18px; scroll-margin-top: 90px; }
.about-sec h2 { margin: 0 0 8px; }
.about-sec p { margin: 0 0 10px; font-size: 14px; line-height: 1.9; color: var(--tm-body); }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.pillars > div { background: var(--tm-surface); border-radius: 12px; padding: 10px 8px; text-align: center; font-size: 12px; color: var(--tm-body); line-height: 1.6; }
.pillars b { display: block; color: var(--tm-ink); font-size: 13px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 8px 30px 8px 0; font-size: 13.5px; line-height: 1.8; color: var(--tm-text-2); border-bottom: 1px solid #F1F5F9; }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: ""; position: absolute; right: 0; top: 12px; width: 20px; height: 20px; border-radius: 6px; background: var(--tm-emerald-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230D5341' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.owner { display: flex; align-items: center; gap: 14px; }
.owner > span:last-child { display: flex; flex-direction: column; }
.owner strong { font-size: 15px; }
.owner small { font-size: 12.5px; color: var(--tm-muted); }

/* ---------- النوافذ (زجاجية) ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: tm-fade .25s var(--tm-ease); }
@keyframes tm-fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; border-radius: var(--tm-r-xl); padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 12px; background: rgba(255,255,255,.92); box-shadow: 0 30px 60px -20px rgba(15,23,42,.45); animation: tm-rise .4s var(--tm-ease) both; }
.sheet h2 { margin: 0; text-align: center; font-size: 22px; font-weight: 700; }
.sheet > p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--tm-body); }
.sheet-ic { align-self: center; width: 64px; height: 64px; border-radius: 18px; background: var(--tm-ink); display: grid; place-items: center; }
.sheet-ic .ic { width: 30px; height: 30px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.facts > div { background: var(--tm-surface); border-radius: 14px; padding: 10px 4px; text-align: center; display: flex; flex-direction: column; }
.facts b { font-size: 24px; font-weight: 700; line-height: 1.3; }
.facts span { font-size: 12px; color: var(--tm-muted); }
.facts .hl { background: var(--tm-ink); color: #fff; }
.facts .hl b { color: var(--tm-lime); }
.facts .hl span { color: #CBD5E1; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rules li { position: relative; padding-right: 20px; font-size: 13px; line-height: 1.8; color: var(--tm-text-2); }
.rules li::before { content: ""; position: absolute; right: 2px; top: 10px; width: 8px; height: 8px; border-radius: 2px; background: var(--tm-lime); }
.tips { background: #fff; border: 1px solid var(--tm-line-soft); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tips strong { font-size: 15px; color: var(--tm-emerald); }
.tips p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--tm-body); }
.tips ol { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: t; display: flex; flex-direction: column; gap: 8px; }
.tips li { counter-increment: t; position: relative; padding-right: 32px; font-size: 13px; line-height: 1.85; color: var(--tm-text-2); }
.tips li::before { content: counter(t, arabic-indic); position: absolute; right: 0; top: 2px; width: 24px; height: 24px; border-radius: 7px; background: var(--tm-ink); color: var(--tm-lime); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.tips b { color: var(--tm-ink); }

/* ---------- ٦. الاختبار ---------- */
.q-count { font-size: 14px; font-weight: 600; }
.timer { min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--tm-ink); color: #fff; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background var(--tm-dur) var(--tm-ease); }
.timer .t { direction: ltr; min-width: 3.1em; text-align: center; }
.t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tm-lime); animation: tm-blink 1.6s ease-in-out infinite; }
@keyframes tm-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.timer.warn { background: var(--tm-warn-bar); }
.timer.warn .t-dot, .timer.crit .t-dot { background: #fff; }
.timer.crit { background: var(--tm-wrong); }
.segs { margin: 12px 16px 0; display: grid; grid-template-columns: repeat(20, minmax(0,1fr)); gap: 3px; }
.seg { height: 20px; padding: 7px 0; border: 0; background: transparent; position: relative; }
.seg::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--tm-line); }
.seg.done::before { background: var(--tm-teal); }
.seg.cur::before { background: var(--tm-ink); }
.seg.flag::after { content: ""; position: absolute; top: -3px; left: 50%; margin-left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--tm-warn-bar); }
.seg:disabled { cursor: default; }
.quiz-page { padding-top: 20px; display: flex; flex-direction: column; min-height: calc(100vh - 110px); min-height: calc(100svh - 110px); }
.q-card { padding: 20px; border-radius: 20px; display: flex; flex-direction: column; gap: 14px; }
.q-tag { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--tm-emerald); background: var(--tm-emerald-tint); border-radius: 6px; padding: 4px 10px; }
.q-text { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.75; }
.opts { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.tm-option { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: right; font-size: 16px; line-height: 1.6; color: var(--tm-ink); }
.tm-option:hover { transform: translateY(-3px); }
.tm-option .tm-letter { flex-shrink: 0; }
.tm-option[aria-checked="true"] { font-weight: 600; }
.q-tools { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.save-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tm-muted); }
.save-note .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.flag-btn { min-height: 44px; padding: 0 12px; border: 1px solid var(--tm-line); border-radius: 10px; background: #fff; font-size: 12px; font-weight: 500; color: var(--tm-body); display: flex; align-items: center; gap: 6px; flex-shrink: 0; transition: all var(--tm-dur) var(--tm-ease); }
.flag-btn .ic { width: 16px; height: 16px; }
.flag-btn[aria-pressed="true"] { background: var(--tm-warn-bg); border-color: var(--tm-warn-bar); color: var(--tm-warn); font-weight: 600; }
.q-nav { margin-top: auto; padding-top: 24px; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.q-nav .tm-btn { min-height: 58px; }
.q-nav.solo { grid-template-columns: 1fr; }
.q-next { background: var(--tm-ink); color: #fff; }
.q-next .ic { width: 18px; height: 18px; stroke-width: 2.2; color: var(--tm-lime); }
.q-next:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--tm-shadow-lift); }

/* ---------- ٨. النتائج ---------- */
.score { position: relative; margin-top: 14px; border-radius: 24px; padding: 22px; overflow: hidden; display: flex; align-items: center; gap: 18px; background-size: 24px 24px; }
.ring-wrap { position: relative; width: 116px; height: 116px; flex-shrink: 0; }
.ring-wrap svg { display: block; }
#resRing { transition: stroke-dashoffset 1.2s var(--tm-ease); }
.ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num strong { font-size: 30px; font-weight: 700; line-height: 1; }
.ring-num span { font-size: 11px; color: #CBD5E1; margin-top: 6px; }
.score-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.score-t strong { font-size: 19px; font-weight: 700; line-height: 1.5; }
.score-t span { font-size: 12px; line-height: 1.7; color: #CBD5E1; }
.note { margin: 8px 4px 0; }
.unanswered { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; font-weight: 600; color: var(--tm-warn); background: var(--tm-warn-bg); border-radius: 12px; padding: 10px 12px; }
.unanswered button { border: 0; background: transparent; padding: 0; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--tm-ink); text-decoration: underline; text-underline-offset: 3px; }
#resEndNote { margin: 6px 4px 0; }
#resEndNote:empty { display: none; }
.domains { margin-top: 16px; padding: 16px; border-radius: 16px; display: flex; flex-direction: column; gap: 14px; }
.domains h2 { margin: 0; }
#resDomains { display: flex; flex-direction: column; gap: 14px; }
.dom { display: flex; flex-direction: column; gap: 6px; }
.dom-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.dom-h > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dom-h strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.need { font-size: 10px; font-weight: 600; color: var(--tm-warn); background: var(--tm-warn-bg); border-radius: 6px; padding: 2px 6px; }
.dom .bar-fill { transition: width 1s var(--tm-ease); }
.dom.weak .bar-fill { background: var(--tm-warn-bar); }
.review { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.review h2 { margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { min-height: 44px; padding: 0 16px; border: 1px solid var(--tm-line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; color: var(--tm-body); transition: all var(--tm-dur) var(--tm-ease); }
.chips button[aria-pressed="true"] { background: var(--tm-ink); border-color: var(--tm-ink); color: #fff; font-weight: 600; }
.chips small { font-size: 11px; opacity: .8; margin-right: 4px; }
#resReview { display: flex; flex-direction: column; gap: 10px; }
.rv { border-radius: 16px; overflow: hidden; }
.rv-h { width: 100%; min-height: 64px; border: 0; background: transparent; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: right; color: var(--tm-ink); }
.rv-st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.rv-st .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.rv-st.ok { background: var(--tm-correct); } .rv-st.no { background: var(--tm-wrong); } .rv-st.skip { background: var(--tm-warn-bar); font-weight: 700; font-size: 14px; }
.rv-tt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-tt small { font-size: 11px; color: var(--tm-muted); }
.rv-tt strong { font-size: 14px; font-weight: 600; line-height: 1.6; }
.rv-c { width: 18px; height: 18px; color: var(--tm-muted); transition: transform var(--tm-dur) var(--tm-ease); }
.rv.is-open .rv-c { transform: rotate(180deg); }
.rv-b { display: none; padding: 0 14px 14px; flex-direction: column; gap: 8px; }
.rv.is-open .rv-b { display: flex; animation: tm-rise .35s var(--tm-ease) both; }
.ans { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.7; }
.ans > span:first-child { display: flex; align-items: center; gap: 6px; font-weight: 600; flex-shrink: 0; }
.ans .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.tm-fb-wrong > span:last-child { color: #7A271A; text-align: left; }
.tm-fb-correct > span:last-child { color: #064E3B; text-align: left; }
.tm-fb-skip { border: 1px solid #FDE68A; background: var(--tm-warn-bg); color: var(--tm-warn); border-radius: 12px; padding: 10px 12px; }
.tm-fb-why { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.85; }
.why-tag { align-self: flex-start; font-size: 11px; font-weight: 600; color: #fff; background: var(--tm-ink); border-radius: 6px; padding: 3px 8px; }
.tm-fb-why p { margin: 0; }
.tm-fb-why .yours { color: var(--tm-body); border-top: 1px dashed var(--tm-line); padding-top: 6px; }
.tm-fb-tip { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.85; }
.tm-fb-tip .ic { width: 18px; height: 18px; margin-top: 2px; }
.rv-empty { text-align: center; color: var(--tm-muted); font-size: 13px; padding: 20px; border: 1px dashed var(--tm-line); border-radius: 14px; }
.res-actions { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.res-actions .tm-btn { min-height: 54px; font-size: 15px; }
.fb-box { margin-top: 22px; padding: 18px; border-radius: 20px; display: flex; flex-direction: column; gap: 14px; }
.fb-box p { margin: 4px 0 0; }
.stars { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; direction: rtl; }
.star { height: 52px; border: 1px solid var(--tm-line); border-radius: 12px; background: var(--tm-surface); display: grid; place-items: center; transition: all var(--tm-dur) var(--tm-ease); }
.star .ic { width: 24px; height: 24px; color: #94A3B8; stroke-width: 1.7; }
.star.on { background: var(--tm-ink); border-color: var(--tm-ink); }
.star.on .ic { color: var(--tm-lime); fill: var(--tm-lime); }
.fb-send { background: var(--tm-teal); color: #052E2A; min-height: 50px; border-radius: 12px; font-size: 15px; }
.fb-send:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--tm-shadow-lift); }
.fb-status { margin: 0; font-size: 13px; font-weight: 600; border-radius: 12px; padding: 10px 12px; }
.fb-status.ok { color: var(--tm-correct); background: var(--tm-correct-bg); border: 1px solid var(--tm-correct-line); }
.fb-status.err { color: var(--tm-wrong); background: var(--tm-wrong-bg); border: 1px solid var(--tm-wrong-line); }

/* ---------- لوحة المنسق ---------- */
.page.wide { max-width: 100%; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.stat { border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 32px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat.tm-dark strong { color: var(--tm-lime); }
.stat span { font-size: 12px; color: var(--tm-muted); }
.stat.tm-dark span { color: #CBD5E1; }
.sync-note { margin: 12px 0 0; font-size: 12px; line-height: 1.8; color: var(--tm-body); background: var(--tm-teal-tint); border-radius: 12px; padding: 10px 12px; }
.filter-bar { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.filter-bar select { flex: 1 1 140px; min-height: 44px; border: 1px solid var(--tm-line); border-radius: 12px; padding: 0 12px; background: #fff; font-size: 13px; }
.table-card { margin-top: 12px; border-radius: 16px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.admin-t { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.admin-t th, .admin-t td { padding: 10px 8px; text-align: right; border-bottom: 1px solid #F1F5F9; white-space: nowrap; }
.admin-t th { background: var(--tm-surface); color: var(--tm-muted); font-weight: 600; font-size: 12px; position: sticky; top: 0; }
.admin-t td.pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.admin-t td.empty { text-align: center; color: var(--tm-muted); padding: 24px; }
.admin-t tbody tr:hover { background: var(--tm-surface); }

/* ---------- الشريط السفلي ---------- */
.bnav { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 32px); max-width: 448px; height: 70px; border-radius: 22px; box-shadow: 0 10px 25px -5px rgba(15,23,42,.14); display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); align-items: center; background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bnav button { min-height: 62px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--tm-muted); }
.bn-i { width: 46px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background var(--tm-dur) var(--tm-ease); }
.bn-i .ic { width: 22px; height: 22px; stroke-width: 1.7; }
.bnav button[aria-current="page"] { color: var(--tm-ink); font-weight: 600; }
.bnav button[aria-current="page"] .bn-i { background: var(--tm-ink); color: var(--tm-lime); }

/* استئناف الاختبار، التنبيهات */
.resume-chip { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(98px + env(safe-area-inset-bottom, 0px)); min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--tm-ink); color: #fff; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 14px 28px -8px rgba(15,23,42,.45); white-space: nowrap; }
body:not(.has-nav) .resume-chip { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.resume-chip b { background: rgba(255,255,255,.12); color: var(--tm-lime); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.warn5 { position: fixed; z-index: 80; top: calc(max(16px, env(safe-area-inset-top, 0px)) + 60px); left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 448px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--tm-warn-bg); color: var(--tm-warn); border: 1px solid #FCD34D; box-shadow: var(--tm-shadow-lift); font-size: 13px; line-height: 1.8; animation: tm-drop .35s var(--tm-ease) both; }
.warn5 .ic { margin-top: 3px; color: var(--tm-warn-bar); }
@keyframes tm-drop { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast { position: fixed; z-index: 95; top: max(16px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; background: var(--tm-ink); color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--tm-shadow-lift); animation: tm-drop .3s var(--tm-ease) both; }

/* دعوة التثبيت */
.install { position: fixed; inset: 0; z-index: 85; }
.install-scrim { position: absolute; inset: 0; background: rgba(15,23,42,.45); opacity: 0; transition: opacity .35s var(--tm-ease); }
.install-sheet { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 28px 28px 0 0; padding: 12px 22px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; transform: translateY(105%); transition: transform .35s var(--tm-ease); box-shadow: 0 -20px 40px -20px rgba(15,23,42,.35); }
.install.is-open .install-scrim { opacity: 1; }
.install.is-open .install-sheet { transform: none; }
.grab { width: 44px; height: 5px; border-radius: 999px; background: var(--tm-line); }
.app-icon { width: 96px; height: 96px; border-radius: 24px; overflow: hidden; box-shadow: 0 16px 30px -14px rgba(15,23,42,.35); margin-top: 6px; }
.install-sheet h2 { margin: 0; font-size: 21px; font-weight: 700; }
.install-sheet > p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--tm-body); max-width: 360px; }
.in-feats { list-style: none; margin: 0; padding: 0; align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.in-feats li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--tm-text-2); }
.in-feats .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.ios-hint { margin: 0; align-self: stretch; display: flex; align-items: center; gap: 10px; text-align: right; font-size: 12.5px; line-height: 1.8; color: var(--tm-text-2); background: var(--tm-surface); border-radius: 14px; padding: 10px 12px; }

/* ظهور عند التمرير */
.tm-reveal.is-visible { animation-duration: .6s; }

/* ---------- الشاشات الأوسع ---------- */
@media (min-width: 760px) {
  .tm-app { max-width: 720px; }
  .doors { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .door-dark { grid-column: 1 / -1; }
  .pane .acc, .checks { max-width: 100%; }
}
@media (min-width: 1000px) {
  body[data-screen="s-landing"] .tm-app { max-width: 1080px; }
  .home { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; column-gap: 56px; align-items: center; padding: 40px 32px 24px; text-align: right; }
  .home-glow { left: 25%; }
  .home-logo { grid-column: 1; grid-row: 1; justify-self: start; height: 96px; }
  .home-art { grid-column: 2; grid-row: 1 / span 2; justify-self: center; transform: scale(1.2); margin: 40px 0; }
  .home-copy { grid-column: 1; grid-row: 2; align-items: flex-start; align-self: start; }
  .home-desc { max-width: 420px; }
  .home-cta { max-width: 360px; }
  .home-foot { grid-column: 1 / -1; grid-row: 3; margin-top: 32px; }
  body[data-screen="s-admin"] .tm-app { max-width: 1040px; }
}
@media (max-width: 360px) {
  .door-ph { width: 104px; }
  .door-t { padding: 16px 14px 14px; }
  .hd-ph { width: 92px; }
  .ev-meta { grid-template-columns: 1fr; }
  .res-actions { grid-template-columns: 1fr; }
  .tm-tab { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx { opacity: 1 !important; }
  .blob, .home-ring, .home-bubble, .home-spark, .t-dot { animation: none !important; }
}
@media print {
  .tm-topbar, .plain-head, .bnav, .resume-chip, .res-actions, .fb-box, .chips, .link-btn, #tm-install, .overlay, .toast, .warn5 { display: none !important; }
  body { background: #fff !important; }
  .screen { display: none !important; }
  #s-result { display: block !important; }
  .rv-b { display: flex !important; }
  .rv { break-inside: avoid; box-shadow: none; }
  .score { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* اسم طويل في البوابة: يُختصر الاسم ويبقى المستوى ظاهرًا */
.who-t strong { display: flex; gap: 4px; min-width: 0; }
#portalName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#portalLevel { flex-shrink: 0; }
/* لوحة المنسق: مصدر النتائج وتنبيه الخطأ */
.src-tabs { margin-top: 14px; box-shadow: var(--tm-shadow); }
.sync-note.warn { background: var(--tm-warn-bg); color: var(--tm-warn); }
.admin-t td.stars-cell { color: #B7791F; letter-spacing: 1px; font-size: 14px; }
.admin-t td.comment { white-space: normal; min-width: 220px; max-width: 360px; line-height: 1.7; color: var(--tm-text); }
.admin-t .muted { color: var(--tm-muted); }
