/* PFT — الاختبار الترويجي المجاني للزوار (/free-test). PFT-S3.3: Layout خفيف + صفحة الهبوط + البوابة.
   مبني على نظام تصميم معهد القدرات: Cairo، تركوازي #087F73، حبر #0B1F33، كهرماني للتمييز فقط، زوايا 16–24px.
   للجوال أولًا (أغلب الزوار من وسائل التواصل). PFT-S4: صفحة القسم وشاشة الانتقال في آخر الملف. */

/* خط الجذر العربي للأسئلة الكمية: محتوى بنك الأسئلة يرسم علامة الجذر بنقطة «.» داخل
   <span style="font-family: 'ZA-roots'"> (مئات العناوين والخيارات). Layout الزوار لا يحمّل site.css حيث يُعرَّف عادةً،
   فيُعرَّف هنا بالاسمين المستخدمين في المشروع. block لا swap: بلا الخط تظهر نقطة مضللة بدل الجذر،
   والملف 6KB ومُحمَّل مسبقًا (preload) في صفحتي القسم والمراجعة. */
@font-face {
    font-family: 'ZA-roots';
    src: url('../fonts/ZA-roots.woff2') format('woff2'),
         url('../fonts/ZA-roots.woff') format('woff'),
         url('../fonts/ZA-roots.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'ZA-Roots';
    src: url('../fonts/ZA-roots.woff2') format('woff2'),
         url('../fonts/ZA-roots.woff') format('woff'),
         url('../fonts/ZA-roots.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
    --pft-ink: #0B1F33;
    --pft-teal: #087F73;
    --pft-teal-hover: #066b61;
    --pft-teal-focus: #12a093;
    --pft-teal-tint: #DDF3EF;
    --pft-amber: #F59E0B;
    --pft-amber-tint: #FEF1DA;
    --pft-bg: #F7FAFC;
    --pft-card: #FFFFFF;
    --pft-text: #16202A;
    --pft-muted: #667085;
    --pft-line: #E4E9EE;
    --pft-line-teal: #C7E8E3;
    --pft-radius: 20px;
    --pft-radius-sm: 12px;
    --pft-shadow: 0 8px 24px rgba(11, 31, 51, .08);
    --pft-font: 'Cairo', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* السمة hidden تغلب أي display في عناصر الصفحة (العدّاد شبكة) */
.pft-body [hidden] { display: none !important; }

.pft-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--pft-bg);
    color: var(--pft-text);
    font-family: var(--pft-font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-text-size-adjust: 100%;
}

.pft-container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

.pft-skip {
    position: absolute; inset-inline-start: 12px; top: -60px; z-index: 10;
    background: var(--pft-ink); color: #fff; padding: 8px 14px; border-radius: 10px; text-decoration: none;
}
.pft-skip:focus { top: 12px; }

/* ---------- شريط الهوية ---------- */
.pft-brandbar { background: var(--pft-card); border-bottom: 1px solid var(--pft-line); }
.pft-brandbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.pft-brandbar__logo img { display: block; height: 44px; width: auto; }
.pft-brandbar__tag {
    font-size: 13px; font-weight: 600; color: var(--pft-teal);
    background: var(--pft-teal-tint); padding: 4px 12px; border-radius: 999px; text-align: center;
}
/* PFT-S6.1 — شريط الهوية: لوجو + «اختبار مجاني من …» + الموقع (يظهر في أي لقطة شاشة لأعلى الصفحة) */
.pft-brandbar__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.pft-brandbar__site { font-size: 12px; font-weight: 700; color: var(--pft-muted); letter-spacing: .2px; }
.pft-solve__site { color: var(--pft-muted); font-weight: 600; }

.pft-main { flex: 1; padding-top: 20px; padding-bottom: 40px; }

/* ---------- البطل ---------- */
.pft-hero { text-align: center; padding: 8px 0 20px; }
.pft-eyebrow {
    display: inline-block; font-size: 13px; font-weight: 700; color: var(--pft-teal);
    border: 1px solid var(--pft-line-teal); border-radius: 999px; padding: 2px 12px; margin-bottom: 8px;
}
.pft-hero__title { margin: 0 0 8px; font-size: 30px; line-height: 1.35; font-weight: 800; color: var(--pft-ink); }
.pft-hero__lead { margin: 0 auto 20px; max-width: 560px; color: var(--pft-muted); font-size: 16px; }

.pft-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pft-fact {
    background: var(--pft-card); border: 1px solid var(--pft-line); border-radius: var(--pft-radius-sm);
    padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.pft-fact__value { font-size: 24px; font-weight: 800; color: var(--pft-teal); line-height: 1.2; }
.pft-fact__label { font-size: 13px; color: var(--pft-muted); line-height: 1.4; text-align: center; }

/* ---------- التنبيه ---------- */
.pft-notice {
    margin: 0 0 16px; padding: 12px 16px; border-radius: var(--pft-radius-sm);
    background: var(--pft-amber-tint); border-inline-start: 4px solid var(--pft-amber); color: var(--pft-text);
}

/* ---------- البوابة ---------- */
.pft-gate {
    background: var(--pft-card); border: 1px solid var(--pft-line); border-radius: var(--pft-radius);
    box-shadow: var(--pft-shadow); padding: 24px 18px; text-align: center; margin-bottom: 24px;
}
.pft-gate--available, .pft-gate--progress { border-color: var(--pft-line-teal); }
.pft-gate--locked { background: linear-gradient(180deg, var(--pft-teal-tint) 0, var(--pft-card) 140px); }
/* PFT-S8 — مهلة ما بعد المحاولة: نفس خلفية القفل، والشارة بلون الهوية لا الكهرماني (إنجاز لا انتظار) */
.pft-gate--cooldown { background: linear-gradient(180deg, var(--pft-teal-tint) 0, var(--pft-card) 140px); border-color: var(--pft-line-teal); }
.pft-gate--cooldown .pft-gate__badge { color: var(--pft-teal); }
.pft-gate__text b { color: var(--pft-ink); }
.pft-gate__actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 6px; }
.pft-gate__badge {
    display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
    background: var(--pft-card); color: var(--pft-amber); border: 1px solid var(--pft-line); margin-bottom: 8px;
}
.pft-gate__title { margin: 0 0 8px; font-size: 22px; line-height: 1.35; font-weight: 800; color: var(--pft-ink); }
.pft-gate__text { margin: 0 auto 18px; max-width: 540px; color: var(--pft-text); }
.pft-gate__text strong { color: var(--pft-teal); }
.pft-gate__form { margin: 0 0 10px; }
.pft-gate__hint { margin: 0; font-size: 14px; color: var(--pft-muted); }

/* ---------- الأزرار ---------- */
.pft-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 10px 24px; border-radius: 999px; border: 1.5px solid transparent;
    font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.pft-btn--lg { width: 100%; max-width: 360px; min-height: 54px; font-size: 18px; }
.pft-btn--primary { background: var(--pft-teal); color: #fff; }
.pft-btn--primary:hover { background: var(--pft-teal-hover); }
.pft-btn--secondary { background: transparent; color: var(--pft-teal); border-color: var(--pft-teal); }
.pft-btn--secondary:hover { background: var(--pft-teal-tint); }
.pft-btn:focus-visible, .pft-link:focus-visible { outline: 3px solid var(--pft-teal-focus); outline-offset: 2px; }
.pft-btn[disabled] { cursor: progress; opacity: .85; }
.pft-btn__busy { display: none; }
.pft-btn[aria-busy="true"] .pft-btn__label { display: none; }
.pft-btn[aria-busy="true"] .pft-btn__busy { display: inline; }
.pft-btn[aria-busy="true"]::before {
    content: ""; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: pft-spin .8s linear infinite;
}
@keyframes pft-spin { to { transform: rotate(360deg); } }

.pft-link { color: var(--pft-teal); font-weight: 700; }

/* ---------- العدّاد ---------- */
.pft-countdown {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    max-width: 380px; margin: 0 auto 18px; direction: rtl;
}
.pft-countdown__unit {
    background: var(--pft-card); border: 1px solid var(--pft-line-teal); border-radius: var(--pft-radius-sm);
    padding: 8px 4px; display: flex; flex-direction: column; align-items: center;
}
.pft-countdown__value {
    font-size: 26px; font-weight: 800; color: var(--pft-ink); line-height: 1.2;
    font-variant-numeric: tabular-nums; direction: ltr;
}
.pft-countdown__label { font-size: 12px; color: var(--pft-muted); }
.pft-countdown--short { grid-template-columns: repeat(3, 1fr); max-width: 290px; } /* PFT-S8: المهلة بلا خانة أيام */
.pft-countdown__done { margin: 0 0 16px; font-weight: 700; color: var(--pft-teal); }

/* ---------- آخر نتيجة ---------- */
.pft-last {
    margin-top: 16px; padding: 12px 14px; border-top: 1px dashed var(--pft-line);
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px;
}
.pft-last__label { font-size: 14px; color: var(--pft-muted); }
.pft-last__score { font-size: 22px; font-weight: 800; color: var(--pft-teal); }
.pft-last__meta { font-size: 14px; color: var(--pft-muted); }

/* ---------- الخطوات ---------- */
.pft-section-title { font-size: 18px; font-weight: 800; color: var(--pft-ink); margin: 0 0 12px; }
.pft-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pft-step {
    display: flex; gap: 12px; align-items: flex-start; background: var(--pft-card);
    border: 1px solid var(--pft-line); border-radius: var(--pft-radius-sm); padding: 12px 14px;
}
.pft-step__num {
    flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--pft-teal-tint); color: var(--pft-teal); font-weight: 800;
}
.pft-step b { display: block; color: var(--pft-ink); }
.pft-step p { margin: 2px 0 0; color: var(--pft-muted); font-size: 14px; }

/* ---------- التذييل ---------- */
.pft-footer { border-top: 1px solid var(--pft-line); background: var(--pft-card); padding: 16px 0; text-align: center; }
.pft-footer p { margin: 0; font-size: 13px; color: var(--pft-muted); }
.pft-footer__privacy { margin-bottom: 4px !important; }

@media (min-width: 640px) {
    .pft-main { padding-top: 32px; }
    .pft-hero__title { font-size: 40px; }
    .pft-gate { padding: 32px 36px; }
    .pft-steps__list { grid-template-columns: repeat(3, 1fr); }
    .pft-step { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .pft-btn { transition: none; }
    .pft-btn[aria-busy="true"]::before { animation: none; }
}

/* =====================================================================
   PFT-S4 — صفحة القسم (المؤقّت، لوحة الأسئلة، السؤال، شريط التنقل، تأكيد الإنهاء) وشاشة الانتقال.
   بطاقة السؤال نفسها من _ExamQuestionContent + _UnifiedExamStyles (الأنماط المعتمدة)، بألوان المعهد هنا.
   ===================================================================== */

.pft-solve {
    --qx-primary: var(--pft-teal);
    --qx-primary-light: var(--pft-teal-tint);
    --qx-primary-mid: var(--pft-line-teal);
    --qx-shadow: var(--pft-shadow);
    --pft-danger: #C2410C;
    --pft-danger-tint: #FDE8DC;
}

/* ---------- الرأس الثابت: القسم + المؤقّت ---------- */
.pft-solve__bar {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 0 -16px; padding: 10px 16px;
    background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--pft-line);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pft-solve__title { line-height: 1.35; }
.pft-solve__title b { font-size: 17px; font-weight: 800; color: var(--pft-ink); }
.pft-solve__title span { font-size: 14px; color: var(--pft-muted); }
.pft-solve__track { display: block; font-size: 12px; color: var(--pft-teal); font-weight: 600; }

.pft-timer {
    flex: 0 0 auto; min-width: 92px; padding: 6px 14px; border-radius: 999px;
    background: var(--pft-teal-tint); color: var(--pft-ink); border: 1px solid var(--pft-line-teal);
    font-size: 22px; font-weight: 800; line-height: 1.3; text-align: center;
    font-variant-numeric: tabular-nums; direction: ltr;
}
.pft-timer.is-warning { background: var(--pft-amber-tint); border-color: var(--pft-amber); }
.pft-timer.is-danger { background: var(--pft-danger-tint); border-color: var(--pft-danger); color: var(--pft-danger); }

/* ---------- الأدوات: لوحة الأسئلة + حالة الحفظ ---------- */
.pft-solve__tools {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 8px;
}
.pft-palette-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px;
    border: 1px solid var(--pft-line); border-radius: 999px; background: var(--pft-card);
    font: inherit; font-size: 14px; font-weight: 700; color: var(--pft-ink); cursor: pointer;
}
.pft-palette-toggle::after {
    content: ""; width: 8px; height: 8px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); margin-top: -4px; transition: transform 150ms ease;
}
.pft-palette-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 4px; }
.pft-palette-toggle__count { font-weight: 600; color: var(--pft-muted); }
.pft-palette-toggle__count b { color: var(--pft-teal); }
.pft-palette-toggle:focus-visible, .pft-chip:focus-visible, .pft-nav__btn:focus-visible, .pft-save__retry:focus-visible {
    outline: 3px solid var(--pft-teal-focus); outline-offset: 2px;
}

.pft-save { font-size: 13px; color: var(--pft-muted); min-height: 20px; }
.pft-save.is-ok { color: var(--pft-teal); }
.pft-save.is-error { color: var(--pft-danger); font-weight: 600; }
.pft-save__retry {
    border: 0; background: none; padding: 4px 2px; font: inherit; font-weight: 700;
    color: var(--pft-teal); text-decoration: underline; cursor: pointer;
}

.pft-palette {
    background: var(--pft-card); border: 1px solid var(--pft-line); border-radius: var(--pft-radius-sm);
    padding: 12px; margin-bottom: 12px;
}
.pft-palette__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px; }
.pft-chip {
    min-height: 44px; border-radius: 10px; border: 1.5px solid var(--pft-line); background: var(--pft-bg);
    font: inherit; font-weight: 800; color: var(--pft-text); cursor: pointer;
}
.pft-chip.is-answered { background: var(--pft-teal-tint); border-color: var(--pft-teal); color: var(--pft-ink); }
.pft-chip.is-flagged { background: var(--pft-amber-tint); border-color: var(--pft-amber); color: var(--pft-ink); }
.pft-chip.is-current { box-shadow: 0 0 0 2px var(--pft-card), 0 0 0 4px var(--pft-ink); }
.pft-palette__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0; font-size: 12px; color: var(--pft-muted); }
.pft-legend::before {
    content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px;
    border: 1.5px solid var(--pft-line); background: var(--pft-bg); vertical-align: -1px;
}
.pft-legend--answered::before { background: var(--pft-teal-tint); border-color: var(--pft-teal); }
.pft-legend--flagged::before { background: var(--pft-amber-tint); border-color: var(--pft-amber); }
.pft-palette__finish { width: 100%; min-height: 44px; }

/* ---------- السؤال ---------- */
.pft-q__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.pft-q__num { margin: 0; font-size: 18px; font-weight: 800; color: var(--pft-ink); }
.pft-q__num span { font-size: 14px; font-weight: 600; color: var(--pft-muted); }
.pft-q__num:focus { outline: none; }
.pft-q__flag {
    font-size: 12px; font-weight: 700; color: #8A5300; background: var(--pft-amber-tint);
    border: 1px solid var(--pft-amber); border-radius: 999px; padding: 2px 10px;
}
/* =====================================================================
   PFT-S6.1 — العلامة المائية على بطاقة السؤال (الحل والمراجعة): لوجو المعهد في المنتصف + «الاسم · الموقع» أسفلها.
   فوق المحتوى لا خلفه (البطاقات والخيارات في _UnifiedExamStyles بخلفيات بيضاء معتمة)، ولا تحجب شيئًا:
   - pointer-events: none ⇒ الضغط واللمس والتحديد تمر للمحتوى تحتها.
   - اللوجو ظلّ رمادي موحّد (contrast(0) ⇒ #808080 مهما كانت ألوان اللوجو) بشفافية .07 ومزج multiply ⇒ أي لون تحتها
     يُضرب في 0.965 فقط: النص الأساسي يبقى ~13:1 والتركوازي ≥ 4.5:1 (يتحقق منه PromoBrandUnitTests من هذا الملف).
   - الحاشية السفلية محجوزة لسطر «الاسم · الموقع» فلا يقع فوق آخر خيار.
   ===================================================================== */
.pft-question-card { position: relative; isolation: isolate; padding-bottom: 26px; }
.pft-watermark {
    position: absolute; inset: 0; z-index: 3;
    display: grid; place-items: center; overflow: hidden;
    pointer-events: none; -webkit-user-select: none; user-select: none;
    mix-blend-mode: multiply;
}
.pft-watermark__logo {
    display: block; width: min(55%, 260px); max-height: 70%; object-fit: contain;
    opacity: .07; filter: grayscale(100%) contrast(0);
    -webkit-user-drag: none;
}
.pft-watermark__text {
    position: absolute; bottom: 4px; inset-inline-start: 14px; max-width: calc(100% - 28px);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .78rem; font-weight: 700; line-height: 18px; color: var(--pft-ink); opacity: .45;
}
@media print {
    .pft-watermark__logo { opacity: .06; }
}

/* ---------- شريط التنقل السفلي ---------- */
.pft-nav {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 6;
    display: flex; justify-content: center; gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--pft-line);
    box-shadow: 0 -6px 20px rgba(11, 31, 51, .06);
}
.pft-nav__btn {
    flex: 1 1 0; max-width: 220px; min-height: 48px; padding: 8px 10px; border-radius: 999px;
    border: 1.5px solid var(--pft-teal); background: var(--pft-card); color: var(--pft-teal);
    font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; line-height: 1.3;
}
.pft-nav__btn[disabled] { border-color: var(--pft-line); color: var(--pft-muted); cursor: not-allowed; }
.pft-nav__btn--next, .pft-nav__btn--finish { background: var(--pft-teal); color: #fff; }
.pft-nav__btn--flag { border-color: var(--pft-amber); color: #8A5300; }
.pft-nav__btn--flag[aria-pressed="true"] { background: var(--pft-amber-tint); }
.pft-body:has(.pft-nav) .pft-main { padding-bottom: 96px; }
.pft-body:has(.pft-nav) .pft-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.pft-finish-form { margin: 0; }

/* ---------- تأكيد الإنهاء ---------- */
.pft-dialog {
    width: calc(100% - 32px); max-width: 420px; border: 0; border-radius: var(--pft-radius);
    padding: 22px 18px; box-shadow: 0 18px 48px rgba(11, 31, 51, .22); color: var(--pft-text); text-align: center;
}
.pft-dialog::backdrop { background: rgba(11, 31, 51, .45); }
.pft-dialog__title { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--pft-ink); }
.pft-dialog__text { margin: 0 0 14px; color: var(--pft-muted); font-size: 15px; }
.pft-dialog__stats { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pft-dialog__stats li {
    display: flex; flex-direction: column; align-items: center; padding: 8px 4px;
    border-radius: var(--pft-radius-sm); background: var(--pft-teal-tint);
}
.pft-dialog__stats li.is-warn { background: var(--pft-danger-tint); }
.pft-dialog__stats li.is-flag { background: var(--pft-amber-tint); }
.pft-dialog__stats b { font-size: 22px; font-weight: 800; color: var(--pft-ink); line-height: 1.3; }
.pft-dialog__stats span { font-size: 12px; color: var(--pft-muted); }
.pft-dialog__actions { display: flex; gap: 8px; }
.pft-dialog__actions .pft-btn { flex: 1; padding-inline: 12px; }

/* ---------- انتهى الوقت ---------- */
.pft-overlay {
    position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
    background: rgba(11, 31, 51, .55);
}
.pft-overlay__card {
    max-width: 380px; width: 100%; background: var(--pft-card); border-radius: var(--pft-radius);
    padding: 24px 20px; text-align: center; box-shadow: var(--pft-shadow);
}
.pft-overlay__card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--pft-ink); }
.pft-overlay__card p { margin: 0; color: var(--pft-muted); }

/* ---------- شاشة الانتقال والإكمال ---------- */
.pft-steps-bar { list-style: none; margin: 4px 0 18px; padding: 0; display: flex; justify-content: center; gap: 10px; }
.pft-steps-bar__item {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 800; font-size: 15px; border: 1.5px solid var(--pft-line); background: var(--pft-card); color: var(--pft-muted);
}
.pft-steps-bar__item.is-done { background: var(--pft-teal); border-color: var(--pft-teal); color: #fff; }
.pft-steps-bar__item.is-current { border-color: var(--pft-teal); color: var(--pft-teal); box-shadow: 0 0 0 3px var(--pft-teal-tint); }
.pft-transition__card { padding-top: 28px; }
.pft-transition__icon {
    display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; margin-bottom: 10px;
}
.pft-transition__icon--done { background: var(--pft-teal-tint); color: var(--pft-teal); }
.pft-transition__icon--time { background: var(--pft-amber-tint); color: #8A5300; }
.pft-transition__facts { max-width: 440px; margin: 0 auto 18px; }
.pft-transition__alt { margin: 14px 0 0; }
.pft-score { display: flex; flex-direction: column; align-items: center; margin: 4px 0 12px; }
.pft-score__value { font-size: 52px; font-weight: 800; line-height: 1.2; color: var(--pft-teal); }
.pft-score__meta { font-size: 15px; color: var(--pft-muted); }

@media (min-width: 640px) {
    .pft-solve__bar { margin: 0; border: 1px solid var(--pft-line); border-top: 0; border-radius: 0 0 var(--pft-radius-sm) var(--pft-radius-sm); }
    .pft-palette__grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
}

/* محتوى السؤال لا يتجاوز بطاقته (الحل والمراجعة): صورة داخل نص السؤال بعرض البطاقة على الأكثر.
   صورة سؤال المقارنة أُصلحت في _UnifiedExamStyles المشترك نفسه (لكل صفحات الاختبارات). */
.pft-solve .qx-question-card__body img,
.pft-review .qx-question-card__body img { max-width: 100%; height: auto; }

/* صفحتا الحل والمراجعة أوسع على الشاشات الكبيرة: السؤال وخياراته في المنتصف بعرض حتى 1080px بدل 760px
   (كانت تترك فراغًا مبالغًا فيه يمينًا ويسارًا). الهبوط والنتيجة والتقرير تبقى بعرض القراءة. شريط الهوية والتذييل
   يتسعان معهما حتى تبقى الحواف على خط واحد. :has مستخدم في هذا الملف أصلًا؛ المتصفح الأقدم يبقى على 760px. */
@media (min-width: 992px) {
    .pft-body:has(.pft-solve) .pft-container,
    .pft-body:has(.pft-review) .pft-container { max-width: 1080px; padding-inline: 24px; }
    /* زر «أنهِ القسم» في لوحة الأسئلة لا يمتد بعرض الصفحة كله */
    .pft-palette__finish { display: flex; width: 100%; max-width: 360px; margin-inline: auto; }
}
@media (min-width: 1400px) {
    .pft-body:has(.pft-solve) .pft-container,
    .pft-body:has(.pft-review) .pft-container { max-width: 1200px; }
}

@media (prefers-reduced-motion: reduce) {
    .pft-palette-toggle::after { transition: none; }
}
