/* هوية موحّدة لكل صفحات الاختبارات (نفس ألوان وخطوط الصفحة الرئيسية).
   تغيّر طريقة العرض فقط؛ الأسئلة ومنطق الاختبار داخل كل صفحة كما هي. */
@import url("https://fonts.googleapis.com/css2?family=Readex+Pro:wght@400;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap");
:root { --bw-night: #0c2440; --bw-navy: #12345a; --bw-sea: #1d5c8f; --bw-gold: #e3a92b; --bw-gold-soft: #fbefd2; --bw-paper: #f5f8fb; --bw-line: #dbe5ee; }
body { font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif !important; background: var(--bw-paper) !important; }
h1, h2, h3 { font-family: "Readex Pro", "IBM Plex Sans Arabic", Tahoma, sans-serif; }

/* ---------- الشريط العلوي الموحد ---------- */
#bw-shell { position: sticky; top: 0; z-index: 30; height: 64px; background: var(--bw-night); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 max(16px, calc((100% - 1180px) / 2)); direction: rtl; font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif; box-shadow: 0 2px 0 var(--bw-gold); }
#bw-shell .bws-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
#bw-shell .bws-brand img { width: 40px; height: 40px; border-radius: 11px; background: #fff; padding: 3px; object-fit: contain; }
#bw-shell .bws-brand b { font-family: "Readex Pro", sans-serif; font-weight: 700; font-size: 16px; }
#bw-shell .bws-title { color: var(--bw-gold); font-weight: 600; font-size: 15px; padding-inline-start: 14px; border-inline-start: 1px solid #ffffff2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#bw-shell .bws-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
#bw-shell .bws-back { flex: none; color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 10px; padding: 8px 14px; box-shadow: inset 0 0 0 1.5px #ffffff4d; }
#bw-shell .bws-back:hover { box-shadow: inset 0 0 0 1.5px #fff; }
#bw-shell .bws-tools .btn.ghost { background: #ffffff14 !important; color: #fff !important; border: 0 !important; }
#bw-shell .bws-tools .timer { background: var(--bw-gold) !important; color: var(--bw-night) !important; }
#bw-shell .bws-tools .timer.urgent { background: #fbe6e2 !important; color: #c2412f !important; }
#bw-shell.static { position: relative; }
@media (max-width: 700px) {
  #bw-shell { gap: 8px; height: 58px; }
  #bw-shell .bws-brand b, #bw-shell .bws-title { display: none; }
  #bw-shell .bws-back { padding: 7px 10px; font-size: 13px; }
}

/* ---------- أقسام الكمي واللفظي والمحاكي المحوسب ---------- */
body.bwt-bank { --navy: #12345a; --blue: #1d5c8f; --cy: #e3a92b; --bg: #f5f8fb; --line: #dbe5ee; --hh: 64px; }
body.bwt-bank header.top { display: none !important; }
body.bwt-bank .card { border-radius: 20px; box-shadow: none; }
body.bwt-bank .hero { background: var(--bw-night) radial-gradient(circle at 1.5px 1.5px, #ffffff12 1.5px, transparent 0) 0 0 / 26px 26px !important; box-shadow: none !important; border-radius: 18px; text-align: right !important; }
body.bwt-bank .hero h1 { font-family: "Readex Pro", sans-serif; font-weight: 700; }
body.bwt-bank .hero .hy { background: var(--bw-gold) !important; color: var(--bw-night) !important; border: 0 !important; letter-spacing: 0; }
body.bwt-bank .hero img { box-shadow: none !important; }
body.bwt-bank .simtile { background: var(--bw-navy) !important; box-shadow: 0 0 0 2px var(--bw-gold) inset !important; border-radius: 18px; }
body.bwt-bank .simtile:hover { transform: none; background: var(--bw-sea) !important; }
body.bwt-bank .contact { display: none !important; }
body.bwt-bank .btn { border-radius: 12px; }
body.bwt-bank .btn:not(.ghost):not(.soft):not(.red) { background: var(--bw-navy); }
body.bwt-bank .btn.soft { background: #eaf2f9; }
body.bwt-bank .qcard { background: #fff; border-color: var(--bw-line); }
body.bwt-bank .opt.on, body.bwt-bank .chip.on { background: var(--bw-navy); border-color: var(--bw-navy); }
body.bwt-bank .mbox { border-top-color: var(--bw-gold); }
@media (max-width: 700px) { body.bwt-bank { --hh: 58px; } }

/* ---------- المحاكي الورقي ---------- */
body.bwt-key header { background: var(--bw-navy) !important; box-shadow: none !important; }
body.bwt-key header .brand { display: none !important; }
body.bwt-key header .pill { background: #ffffff1f !important; box-shadow: none !important; }
body.bwt-key .panel { border-radius: 20px; box-shadow: none; border: 1px solid var(--bw-line); border-top: 4px solid var(--bw-gold); }
body.bwt-key .hero h2 { color: var(--bw-navy); font-family: "Readex Pro", sans-serif; }
body.bwt-key .hero img.lg { display: none; }
body.bwt-key .tagline { background: var(--bw-gold-soft) !important; color: #7a5300 !important; }
body.bwt-key .chips span { background: #eaf2f9 !important; color: var(--bw-navy) !important; }
body.bwt-key .contacts { display: none !important; }
body.bwt-key .pri { background: var(--bw-navy) !important; box-shadow: none !important; border-radius: 12px; }
body.bwt-key .pri:hover { background: var(--bw-sea) !important; }

/* ---------- تأسيس اللفظي ---------- */
body.bwt-raw { --accent: #12345a; --accent-soft: #eaf2f9; --bg: #f5f8fb; --line: #dbe5ee; --f-display: "Readex Pro", sans-serif; }
body.bwt-raw .hero-identity, body.bwt-raw .bar .identity { display: none !important; }
body.bwt-raw .card { border-radius: 16px; }
body.bwt-raw .btn.primary { background: var(--bw-navy); border-color: var(--bw-navy); }

@media print { #bw-shell { display: none !important; } }
body.bwt-raw #bw-shell { margin: 0 -16px; }
body.bwt-key #secName:empty { display: none; }

/* ---------- صفحة اختيار النموذج الورقي ---------- */
body.bwt-hub { margin: 0; color: #142338; }
.bwh-wrap { width: min(980px, calc(100% - 32px)); margin: 56px auto 70px; }
.bwh-wrap h1 { font-size: clamp(26px, 3.6vw, 38px); color: var(--bw-navy); margin: 0 0 8px; }
.bwh-wrap > p { color: #5a6b80; margin: 0 0 30px; font-size: 17px; }
.bwh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.bwh-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--bw-line); border-radius: 22px; padding: 26px; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.bwh-card:hover { border-color: var(--bw-navy); }
.bwh-card .n { font-family: "Readex Pro", sans-serif; font-size: 56px; font-weight: 700; color: var(--bw-gold); line-height: 1; }
.bwh-card b { font-family: "Readex Pro", sans-serif; font-size: 22px; color: var(--bw-navy); }
.bwh-card span { color: #5a6b80; }
.bwh-card .go { margin-top: 14px; align-self: flex-start; background: var(--bw-navy); color: #fff; font-weight: 600; border-radius: 12px; padding: 10px 18px; }
.bwh-foot { text-align: center; color: #5a6b80; font-size: 13px; padding-bottom: 30px; }

/* ---------- زر ونافذة «إبلاغ عن خطأ» ---------- */
#bw-shell .bws-report { flex: none; background: #ffffff14; color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font: 600 13.5px "IBM Plex Sans Arabic", Tahoma, sans-serif; cursor: pointer; }
#bw-shell .bws-report:hover { background: #ffffff26; }
body.testing #bw-shell .bws-report span { display: none; }
@media (max-width: 700px) { #bw-shell .bws-report span { display: none; } }
.bws-ov { position: fixed; inset: 0; z-index: 2147483300; background: #0c244099; display: grid; place-items: center; padding: 16px; direction: rtl; font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.bws-dlg { background: #fff; color: #142338; border-radius: 18px; padding: 22px; width: min(440px, 100%); border-top: 4px solid var(--bw-gold); display: grid; gap: 10px; }
.bws-dlg h3 { margin: 0; color: var(--bw-navy); font-size: 19px; }
.bws-dlg p { margin: 0; color: #5a6b80; font-size: 14px; }
.bws-dlg label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; color: #5a6b80; }
.bws-dlg select, .bws-dlg textarea { font: inherit; padding: 10px 12px; border: 1.5px solid var(--bw-line); border-radius: 12px; background: var(--bw-paper); color: #142338; width: 100%; }
.bws-dlg .bws-msg { color: var(--bw-sea); font-weight: 600; min-height: 20px; }
.bws-acts { display: flex; gap: 8px; }
.bws-acts button { font: 600 15px "IBM Plex Sans Arabic", Tahoma, sans-serif; border: 0; border-radius: 12px; padding: 10px 18px; cursor: pointer; background: var(--bw-navy); color: #fff; }
.bws-acts .bws-x { background: #e3ebf3; color: var(--bw-navy); }

/* ---------- خطة العلاج بعد الاختبار ---------- */
.bw-plan { border-inline-start: 4px solid var(--bw-gold) !important; }
.bw-plan h3 { font-size: 18px; }
.bw-plan-list { margin: 6px 0 10px; padding-inline-start: 20px; line-height: 1.9; font-size: 14.5px; }
.bw-plan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--bw-line); font-size: 14.5px; }
.bw-plan-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .bw-plan-row { grid-template-columns: 1fr auto; } .bw-plan-row button { grid-column: 1 / -1; } }

/* ---------- إعلان الوقت المتبقي ---------- */
.bws-live { position: fixed; z-index: 2147483000; top: 76px; left: 50%; transform: translate(-50%, -12px); opacity: 0; pointer-events: none; background: var(--bw-night); color: #fff; border: 2px solid var(--bw-gold); border-radius: 14px; padding: 10px 18px; font: 600 15px "IBM Plex Sans Arabic", Tahoma, sans-serif; transition: opacity .2s, transform .2s; direction: rtl; }
.bws-live.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .bws-live { transition: none; } }

/* ---------- سبب الخطأ في مجلد الأخطاء ---------- */
.bw-why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--bw-line); font-size: 13.5px; }
.bw-why span { color: #5a6b80; font-weight: 600; margin-inline-end: 4px; }
.bw-why button, .bw-whychips button { font: 600 13px "IBM Plex Sans Arabic", Tahoma, sans-serif; border: 1.5px solid var(--bw-line); background: #fff; color: #142338; border-radius: 99px; padding: 4px 12px; cursor: pointer; }
.bw-why button.on, .bw-whychips button.on { background: var(--bw-navy); border-color: var(--bw-navy); color: #fff; }
.bw-whysum { background: #fff; border: 1px solid var(--bw-line); border-inline-start: 4px solid var(--bw-gold); border-radius: 16px; padding: 14px 16px; margin: 12px 0; }
.bw-whysum > b { color: var(--bw-navy); }
.bw-whychips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bw-whysum p { margin: 4px 0 0; color: #3b4b60; font-size: 14px; }

/* ---------- رابط منصة الدورات وأدوات سهولة القراءة ---------- */
#bw-shell .bws-lms, #bw-shell .bws-a11y { flex: none; background: #ffffff14; color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font: 600 13.5px "IBM Plex Sans Arabic", Tahoma, sans-serif; text-decoration: none; cursor: pointer; }
#bw-shell .bws-lms:hover, #bw-shell .bws-a11y:hover { background: #ffffff26; }
#bw-shell .bws-a11y { font-family: "Readex Pro", sans-serif; font-weight: 700; }
@media (max-width: 900px) { #bw-shell .bws-lms span { display: none; } }
body.testing #bw-shell .bws-lms { display: none; }
.bws-a11yp { position: fixed; z-index: 2147483100; top: 72px; left: max(16px, calc((100% - 1180px) / 2)); width: min(300px, calc(100% - 32px)); background: #fff; color: #142338; border: 1px solid var(--bw-line); border-top: 4px solid var(--bw-gold); border-radius: 16px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 16px 40px #0c244033; direction: rtl; font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.bws-a11yp[hidden] { display: none; }
.bws-a11yp b { color: var(--bw-navy); }
.bws-a11yp .g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bws-a11yp button { font: 600 14px "IBM Plex Sans Arabic", Tahoma, sans-serif; border: 1.5px solid var(--bw-line); background: #fff; color: #142338; border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: center; }
.bws-a11yp button.on { background: var(--bw-navy); border-color: var(--bw-navy); color: #fff; }
.bws-a11yp button.x { background: #e3ebf3; border-color: #e3ebf3; color: var(--bw-navy); }
html.bwa-z1 body > :not(#bw-shell):not(.bws-a11yp):not(.bws-ov) { zoom: 1.12; }
html.bwa-z2 body > :not(#bw-shell):not(.bws-a11yp):not(.bws-ov) { zoom: 1.25; }
html.bwa-rf body, html.bwa-rf button, html.bwa-rf input, html.bwa-rf select, html.bwa-rf textarea { font-family: Tahoma, Arial, sans-serif !important; letter-spacing: .01em; word-spacing: .14em; }
html.bwa-rf body p, html.bwa-rf body li, html.bwa-rf .stem, html.bwa-rf .opt { line-height: 2 !important; }
html.bwa-hc body { color: #000 !important; background: #fff !important; }
html.bwa-hc body p, html.bwa-hc body span, html.bwa-hc body li, html.bwa-hc body label, html.bwa-hc .sub, html.bwa-hc .m { color: #000 !important; }
html.bwa-hc .card, html.bwa-hc .qcard, html.bwa-hc .opt, html.bwa-hc .panel, html.bwa-hc button { border-color: #2a3a50 !important; }
html.bwa-hc a { text-decoration: underline; }
html.bwa-hc #bw-shell, html.bwa-hc #bw-shell * { color: #fff !important; }
html.bwa-nm *, html.bwa-nm *::before, html.bwa-nm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.bw-stage { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: #17633f; background: #e4f3ea; border-radius: 10px; padding: 6px 12px; display: inline-block; }
html.bwa-hc #bw-shell .timer, html.bwa-hc #bw-shell .timer * { color: var(--bw-night) !important; }
