/* =============================================================================
   pages/free-test.css
   ----
   Used by:
     - free_test/intro.html  (extends base.html — has site shell)
     - free_test/take.html   (standalone — no site shell, runs the live quiz)

   Design philosophy: minimal + luxurious.
     - Generous whitespace
     - Clear visual hierarchy via typography only (not heavy borders)
     - Gold accents used sparingly, intentionally
     - Subtle motion that rewards interaction without distracting
     - English content (questions, choices, explanation): LTR, left-aligned
     - Persian content (UI, FA explanation): RTL, right-aligned

   Sections:
     1. Page wrapper + page background
     2. Runner card + header
     3. Theme toggle
     4. Top metrics (timer pill)
     5. Progress bar
     6. Question card (LTR English)
     7. Options (LTR English with gold check accent)
     8. Action buttons (Save / Next / Finish)
     9. Save toast + shake feedback
    10. Result hero (centered, 3 variants: pass / fail / neutral)
    11. Stat cards (5 cards with icons)
    12. Discount card (premium gift card style)
    13. Review shell + stepper (LTR, English numerals, centered)
    14. Review card (LTR English + RTL Persian)
    15. Review choices, explanation, Persian block
    16. Loader / empty / utilities
    17. Light-mode overrides
    18. Mobile + reduced-motion
   ========================================================================== */

/* =============================================================================
   1. PAGE WRAPPER
   ========================================================================== */
body.ft-page {
    background: var(--navy-deep);
    color: var(--ink-white);
    font-family: var(--ff);
    min-height: 100vh;
    margin: 0;
    direction: rtl;
}

.ft-wrap {
    padding: 28px 0 80px;
    min-height: 100vh;
    position: relative;
    color: var(--ink-white);
}
body.ft-page .ft-wrap {
    background:
        radial-gradient(900px 600px at 88% 12%, rgba(255, 194, 24, .07), transparent 65%),
        radial-gradient(700px 500px at  8% 88%, rgba(65, 84, 173, .14), transparent 60%);
}
.ft-wrap .container {
    /* max-width: 920px; */
    margin: 0 auto;
    padding: 0 24px;
}

.ft-hidden { display: none !important; }

/* =============================================================================
   2. RUNNER CARD + HEADER
   ========================================================================== */
.ft-runner {
    margin: 0 auto;
    padding: 32px 38px 36px;
    border-radius: var(--r-xl);
    background: var(--surface-1);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.ft-runner::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-line) 50%, transparent);
    pointer-events: none;
}
@media (max-width: 720px) {
    .ft-runner { padding: 22px 20px 26px; border-radius: var(--r-lg); }
}

.ft-runner__top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px dashed var(--line);
}
@media (max-width: 720px) {
    .ft-runner__top {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: center;
    }
    .ft-runner__topLeft,
    .ft-top-metrics { justify-self: center; }
}

.ft-runner__topLeft {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}

.ft-runner__titleWrap {
    text-align: center;
    min-width: 0;
}

.ft-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: var(--surface-gold);
    border: 1px solid var(--gold-line);
    color: var(--gold-300);
    font-size: .75rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.ft-chip i { font-size: .9em; color: var(--gold-400); }
.ft-chip--soft {
    background: var(--surface-2);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

.ft-runner__title {
    font-family: var(--ff-display);
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-weight: 900;
    color: var(--ink-white);
    margin: 0 0 4px;
    line-height: 1.4;
    letter-spacing: -.01em;
}
.ft-runner__subtitle {
    margin: 0;
    color: var(--ink-muted);
    font-size: .8rem;
}

/* =============================================================================
   3. THEME TOGGLE
   ========================================================================== */
.ft-theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-white);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--t-fast);
    position: relative;
    overflow: hidden;
}
.ft-theme-toggle:hover {
    border-color: var(--gold-line);
    color: var(--gold-300);
    background: var(--surface-gold);
}
.ft-theme-toggle .bi-sun-fill,
.ft-theme-toggle .bi-moon-stars-fill {
    position: absolute;
    transition: opacity var(--t), transform var(--t);
}
.ft-theme-toggle .bi-sun-fill        { opacity: 1; transform: rotate(0); color: var(--gold-300); }
.ft-theme-toggle .bi-moon-stars-fill { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .ft-theme-toggle .bi-sun-fill        { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .ft-theme-toggle .bi-moon-stars-fill { opacity: 1; transform: rotate(0); color: var(--navy-700); }

/* =============================================================================
   4. TOP METRICS — TIMER PILL
   ========================================================================== */
.ft-top-metrics { display: flex; gap: 10px; }

.ft-metric {
    display: flex; flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    min-width: 86px;
    transition: all var(--t-fast);
}
.ft-metric__label {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .7rem;
    color: var(--ink-muted);
    font-weight: 600;
}
.ft-metric__label i { font-size: .85em; }
.ft-metric__value {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--ink-white);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    letter-spacing: .02em;
}

.ft-metric--timer {
    background: linear-gradient(135deg, rgba(255, 194, 24, .10), rgba(255, 194, 24, .03));
    border-color: var(--gold-line);
}
.ft-metric--timer .ft-metric__label,
.ft-metric--timer .ft-metric__value { color: var(--gold-300); }
.ft-metric--timer.is-warning {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .45);
}
.ft-metric--timer.is-warning .ft-metric__label,
.ft-metric--timer.is-warning .ft-metric__value { color: #fcd34d; }
.ft-metric--timer.is-danger {
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .55);
    animation: ftTimerPulse 1s ease-in-out infinite;
}
.ft-metric--timer.is-danger .ft-metric__label,
.ft-metric--timer.is-danger .ft-metric__value { color: #fca5a5; }
@keyframes ftTimerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .35); }
    50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* =============================================================================
   5. PROGRESS BAR
   ========================================================================== */
.ft-progress {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--surface-2);
    overflow: hidden;
    margin-bottom: 30px;
    border: none;
    direction: ltr;
}
.ft-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
    border-radius: 2px;
    transition: width .5s var(--t-slow);
    box-shadow: 0 0 14px rgba(255, 194, 24, .45);
}

/* =============================================================================
   6. QUESTION CARD (English content — LTR)
   ========================================================================== */
.ft-panel { padding: 0; }
.ft-panel--center {
    text-align: center;
    padding: 48px 20px;
    color: var(--ink-soft);
}

.ft-question-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0 4px;
    direction: ltr;
}
.ft-question-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    background: var(--surface-gold);
    border: 1px solid var(--gold-line);
    color: var(--gold-300);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.ft-question-num {
    font-size: .8rem;
    color: var(--ink-muted);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ft-question-text {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--ink-white);
    margin-bottom: 26px;
    padding: 22px 26px 22px 22px;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold-500);
    text-align: left;
    direction: ltr;
}

/* =============================================================================
   7. OPTIONS (English content — LTR)
   ========================================================================== */
.ft-options {
    display: flex; flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    direction: ltr;
}

.ft-option {
    display: flex;
    padding: 0;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1.5px solid var(--line-strong);
    cursor: pointer;
    transition: all var(--t-fast);
    user-select: none;
    overflow: hidden;
    position: relative;
}
.ft-option:hover {
    border-color: var(--gold-line);
    transform: translateX(2px);
}
.ft-option:focus-visible {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(255, 194, 24, .14);
}

.ft-option.is-selected {
    background: linear-gradient(135deg,
        rgba(255, 194, 24, .12),
        rgba(255, 194, 24, .04));
    border-color: var(--gold-500);
    box-shadow:
        0 0 0 1px rgba(255, 194, 24, .20) inset,
        0 4px 14px rgba(255, 194, 24, .12);
}

.ft-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ft-option__body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    flex: 1;
    min-width: 0;
}

.ft-option__badge {
    display: inline-grid; place-items: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-weight: 800;
    font-size: .85rem;
    transition: all var(--t-fast);
    font-family: var(--ff-display);
}
.ft-option:hover .ft-option__badge {
    border-color: var(--gold-line);
    color: var(--gold-300);
}
.ft-option.is-selected .ft-option__badge {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    color: var(--navy-900);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 194, 24, .35);
}

.ft-option__text {
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.75;
    word-wrap: break-word;
    text-align: left;
}
.ft-option.is-selected .ft-option__text { color: var(--ink-white); }

.ft-option__check {
    display: inline-grid; place-items: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--gold-500);
    color: var(--navy-900);
    font-size: .85rem;
    opacity: 0;
    transform: scale(.6);
    transition: opacity var(--t-fast), transform var(--t-fast);
}
.ft-option.is-selected .ft-option__check {
    opacity: 1;
    transform: scale(1);
}

/* =============================================================================
   8. ACTION BUTTONS
   ========================================================================== */
.ft-actions {
    display: flex; flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.ft-actions--bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed var(--line);
    justify-content: space-between;
}

.ft-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    border-radius: var(--r-pill);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--t-fast), box-shadow var(--t-fast),
                background var(--t-fast), border-color var(--t-fast),
                color var(--t-fast);
    border: none;
    line-height: 1;
    white-space: nowrap;
}
.ft-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}
.ft-btn i { font-size: .92em; }

.ft-btn--primary {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
    position: relative;
    overflow: hidden;
}
.ft-btn--primary::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -85%; width: 50%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-22deg);
    transition: left .85s ease;
    pointer-events: none;
}
.ft-btn--primary:hover { transform: translateY(-2px); }
.ft-btn--primary:hover::before { left: 130%; }

.ft-btn--ghost {
    background: var(--surface-2);
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
}
.ft-btn--ghost:hover {
    border-color: var(--gold-line);
    color: var(--gold-300);
    background: var(--surface-gold);
    transform: translateY(-1px);
}

.ft-btn--danger {
    background: transparent;
    color: var(--ink-muted);
    border: 1px solid var(--line-strong);
}
.ft-btn--danger:hover {
    background: rgba(239, 68, 68, .10);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .35);
    transform: translateY(-1px);
}

.ft-btn--nav { padding: 9px 16px; font-size: .85rem; }
.ft-btn--copy { padding: 7px 14px; font-size: .82rem; border-radius: var(--r-pill); }
.ft-btn--faToggle {
    padding: 18px 18px;
    font-size: .85rem;
    width: 100%;
    justify-content: center;
}

.ft-btn--xl {
    padding: 14px 32px;
    font-size: 1rem;
}

.ft-btn--save {
    transition: all var(--t-fast);
}
.ft-btn--save.is-saved {
    background: linear-gradient(135deg, rgba(16, 185, 129, .15), rgba(16, 185, 129, .06));
    border-color: rgba(16, 185, 129, .45);
    color: #6ee7b7;
}
.ft-btn--save.is-saved i { color: #10b981; }
.ft-btn--save.is-shake { animation: ftShake .45s ease-in-out; }
@keyframes ftShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.ft-btn--copy.is-copied {
    background: rgba(16, 185, 129, .14);
    border-color: rgba(16, 185, 129, .35);
    color: #6ee7b7;
}

/* Next button gets ordering priority — between save and finish on desktop */
.ft-btn--next { min-width: 160px; }

/* =============================================================================
   9. SAVE TOAST + FEEDBACK
   ========================================================================== */
.ft-save-toast {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, rgba(16, 185, 129, .95), rgba(5, 150, 105, .95));
    color: #ffffff;
    font-size: .88rem;
    font-weight: 700;
    box-shadow: 0 14px 36px rgba(16, 185, 129, .35),
                0 4px 12px rgba(16, 185, 129, .20);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
}
.ft-save-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.ft-save-toast i { font-size: 1.1em; }

/* =============================================================================
   10. RESULT HERO — centered premium layout
   ========================================================================== */
.ft-result-head {
    margin-bottom: 26px;
}

.ft-result-hero {
    position: relative;
    padding: 44px 32px 36px;
    border-radius: var(--r-xl);
    background: var(--surface-2);
    border: 1px solid var(--line);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}
@media (max-width: 640px) { .ft-result-hero { padding: 32px 22px 28px; } }

/* Atmospheric glow behind icon */
.ft-result-hero__glow {
    position: absolute;
    top: -80px; left: 50%;
    width: 320px; height: 320px;
    border-radius: 50%;
    transform: translateX(-50%);
    filter: blur(60px);
    opacity: .6;
    pointer-events: none;
    z-index: -1;
}

.ft-result-hero--pass {
    background:
        radial-gradient(ellipse 600px 240px at 50% 0%, rgba(16, 185, 129, .14), transparent 70%),
        var(--surface-2);
    border-color: rgba(16, 185, 129, .35);
}
.ft-result-hero--pass .ft-result-hero__glow {
    background: radial-gradient(circle, rgba(16, 185, 129, .35), transparent 70%);
}
.ft-result-hero--fail {
    background:
        radial-gradient(ellipse 600px 240px at 50% 0%, rgba(239, 68, 68, .12), transparent 70%),
        var(--surface-2);
    border-color: rgba(239, 68, 68, .30);
}
.ft-result-hero--fail .ft-result-hero__glow {
    background: radial-gradient(circle, rgba(239, 68, 68, .25), transparent 70%);
}
.ft-result-hero--neutral {
    background:
        radial-gradient(ellipse 600px 240px at 50% 0%, rgba(255, 194, 24, .12), transparent 70%),
        var(--surface-2);
    border-color: var(--gold-line);
}
.ft-result-hero--neutral .ft-result-hero__glow {
    background: radial-gradient(circle, rgba(255, 194, 24, .30), transparent 70%);
}

.ft-result-hero__icon {
    display: inline-grid; place-items: center;
    width: 84px; height: 84px;
    border-radius: 50%;
    font-size: 2.4rem;
    margin: 0 auto 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .25);
    position: relative;
}
.ft-result-hero--pass .ft-result-hero__icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(16, 185, 129, .35);
}
.ft-result-hero--fail .ft-result-hero__icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(239, 68, 68, .35);
}
.ft-result-hero--neutral .ft-result-hero__icon {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
}

.ft-result-hero__title {
    font-family: var(--ff-display);
    font-size: clamp(1.4rem, 2.6vw, 1.7rem);
    font-weight: 900;
    color: var(--ink-white);
    margin: 0 0 8px;
    line-height: 1.35;
    letter-spacing: -.012em;
}
.ft-result-hero__sub {
    color: var(--ink-soft);
    font-size: .94rem;
    line-height: 1.85;
    margin: 0 auto 18px;
    max-width: 52ch;
}
.ft-result-hero__meta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px;
    border-radius: var(--r-pill);
    background: var(--surface-1);
    border: 1px solid var(--line);
    color: var(--ink-muted);
    font-size: .76rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.ft-result-hero__meta i { color: var(--gold-400); font-size: .9em; }
.ft-result-hero__meta:empty { display: none; }

.ft-result-hero__cta {
    margin-top: 22px;
}

.ft-h2 {
    font-family: var(--ff-display);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--ink-white);
    margin: 0 0 8px;
}

/* =============================================================================
   11. RESULT STAT CARDS
   ========================================================================== */
.ft-result-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}
@media (max-width: 880px) { .ft-result-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .ft-result-grid { grid-template-columns: repeat(2, 1fr); } }

.ft-statCard {
    padding: 18px 14px;
    border-radius: var(--r-lg);
    background: var(--surface-1);
    border: 1px solid var(--line);
    text-align: center;
    transition: border-color var(--t-fast), transform var(--t-fast);
    position: relative;
    overflow: hidden;
}
.ft-statCard:hover {
    border-color: var(--gold-line);
    transform: translateY(-2px);
}
.ft-statCard__icon {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px;
    border-radius: 12px;
    font-size: 1.05rem;
    margin: 0 auto 8px;
    background: var(--surface-gold);
    color: var(--gold-300);
    border: 1px solid var(--gold-line);
}
.ft-statCard__value {
    font-family: var(--ff-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ink-white);
    line-height: 1.1;
    margin-bottom: 4px;
}
.ft-statCard__label {
    font-size: .76rem;
    color: var(--ink-muted);
    font-weight: 600;
}
.ft-statCard__label small {
    display: block;
    font-size: .9em;
    margin-top: 2px;
    opacity: .7;
}

/* Variants */
.ft-statCard--good .ft-statCard__icon {
    background: rgba(16, 185, 129, .14);
    color: #10b981;
    border-color: rgba(16, 185, 129, .35);
}
.ft-statCard--good .ft-statCard__value { color: #6ee7b7; }
.ft-statCard--bad .ft-statCard__icon {
    background: rgba(239, 68, 68, .12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, .35);
}
.ft-statCard--bad .ft-statCard__value { color: #fca5a5; }
.ft-statCard--mute .ft-statCard__icon {
    background: var(--surface-2);
    color: var(--ink-muted);
    border-color: var(--line-strong);
}
.ft-statCard--mute .ft-statCard__value { color: var(--ink-soft); }
.ft-statCard--total .ft-statCard__icon { /* default gold */ }
.ft-statCard--total .ft-statCard__value { color: var(--ink-white); }
.ft-statCard--pass .ft-statCard__icon { /* default gold */ }
.ft-statCard--pass .ft-statCard__value { color: var(--gold-300); }

/* =============================================================================
   12. DISCOUNT CARD — premium gift card style
   ========================================================================== */
.ft-discount {
    margin: 24px auto 0;
    max-width: 560px;
    padding: 22px 26px;
    border-radius: var(--r-lg);
    background:
        radial-gradient(circle at 30% 0%, rgba(255, 211, 74, .14), transparent 60%),
        linear-gradient(135deg, rgba(255, 194, 24, .08), rgba(255, 194, 24, .02));
    border: 1px dashed var(--gold-line);
    text-align: right;
    position: relative;
    overflow: hidden;
}
.ft-discount::before {
    content: "";
    position: absolute;
    top: 50%; left: -10px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px dashed var(--gold-line);
    transform: translateY(-50%);
}
.ft-discount::after {
    content: "";
    position: absolute;
    top: 50%; right: -10px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px dashed var(--gold-line);
    transform: translateY(-50%);
}

.ft-discount__head {
    display: flex; align-items: center; gap: 8px;
    color: var(--gold-300);
    font-weight: 800;
    font-size: .92rem;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--gold-line);
}
.ft-discount__head i { font-size: 1.1em; }

.ft-discount__body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
}
@media (max-width: 540px) {
    .ft-discount__body { grid-template-columns: 1fr; gap: 16px; }
    .ft-discount__divider { display: none; }
}

.ft-discount__divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, var(--gold-line), transparent);
}

.ft-discount__codeBlock,
.ft-discount__amountBlock {
    text-align: center;
}

.ft-discount__label {
    font-size: .76rem;
    color: var(--ink-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.ft-discount__codeRow {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    direction: ltr;
}
.ft-discount__code {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--r);
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    color: var(--navy-900);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: .08em;
    box-shadow: var(--shadow-gold);
    text-transform: uppercase;
}

.ft-discount__money {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold-300);
    font-family: var(--ff-display);
    line-height: 1.1;
    letter-spacing: -.01em;
}
.ft-discount__money span {
    font-size: .65em;
    color: var(--ink-soft);
    margin-right: 4px;
    font-weight: 700;
}

.ft-heroBuy {
    display: inline-flex !important;
}

/* =============================================================================
   13. REVIEW SHELL + STEPPER (LTR, English numerals, centered)
   ========================================================================== */
.ft-review-shell {
    margin-top: 26px;
    padding: 26px 28px;
    border-radius: var(--r-lg);
    background: var(--surface-1);
    border: 1px solid var(--line);
}
@media (max-width: 640px) { .ft-review-shell { padding: 20px 18px; } }

.ft-review-shell__top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--line);
}
.ft-review-shell__title {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink-white);
    margin-bottom: 4px;
}
.ft-review-shell__title i { color: var(--gold-400); }
.ft-review-shell__hint {
    font-size: .8rem;
    color: var(--ink-muted);
    line-height: 1.7;
}
.ft-review-shell__mini {
    display: flex; gap: 6px;
    flex-wrap: wrap;
}

/* === STEPPER: LTR, English digits, centered === */
.ft-review-stepper {
    display: flex; flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    direction: ltr;
    justify-content: center;
    padding: 14px 8px;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.ft-step {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-family: var(--ff-display);
    font-size: .85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--t-fast);
    font-variant-numeric: tabular-nums;
}
.ft-step:hover {
    transform: translateY(-1px);
    border-color: var(--gold-line);
}
.ft-step.is-ok {
    background: rgba(16, 185, 129, .10);
    border-color: rgba(16, 185, 129, .35);
    color: #6ee7b7;
}
.ft-step.is-bad {
    background: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .30);
    color: #fca5a5;
}
.ft-step.is-active {
    transform: scale(1.08);
    box-shadow: 0 0 0 2px var(--gold-500),
                0 6px 14px rgba(255, 194, 24, .25);
    z-index: 2;
}

.ft-review-pager {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 18px;
    justify-content: space-between;
}

/* =============================================================================
   14. REVIEW CARD (LTR English + RTL Persian inside)
   ========================================================================== */
.ft-review-card {
    padding: 24px 26px;
    border-radius: var(--r-lg);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink-faint);
    direction: ltr;
    text-align: left;
}
@media (max-width: 640px) { .ft-review-card { padding: 20px 18px; } }
.ft-review-card.is-correct { border-top-color: #10b981; }
.ft-review-card.is-wrong   { border-top-color: #ef4444; }

.ft-review-card__top {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ft-review-card__qno {
    font-family: var(--ff-display);
    font-weight: 900;
    color: var(--gold-300);
    font-size: .95rem;
    letter-spacing: .02em;
}
.ft-review-card__status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--r-pill);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
}
.ft-review-card.is-correct .ft-review-card__status {
    background: rgba(16, 185, 129, .14);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, .35);
}
.ft-review-card.is-wrong .ft-review-card__status {
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, .35);
}

.ft-review-card__q {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.85;
    color: var(--ink-white);
    margin: 0 0 14px;
}

.ft-review-meta {
    display: flex; flex-wrap: wrap; gap: 6px 16px;
    padding: 10px 14px;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px dashed var(--line);
    color: var(--ink-soft);
    font-size: .82rem;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}
.ft-review-meta b { color: var(--gold-300); font-weight: 800; margin-right: 4px; }

/* =============================================================================
   15. REVIEW CHOICES + EXPLANATION + PERSIAN BLOCK
   ========================================================================== */
.ft-review-choices {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex; flex-direction: column;
    gap: 8px;
}

.ft-review-choices--fa {
    direction: rtl;
    text-align: right;
}

.ft-review-choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 12px 16px;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: .92rem;
    line-height: 1.7;
}
.ft-review-choice.correct {
    background: rgba(16, 185, 129, .08);
    border-color: rgba(16, 185, 129, .35);
}
.ft-review-choice.selected-correct {
    background: rgba(16, 185, 129, .14);
    border-color: rgba(16, 185, 129, .55);
}
.ft-review-choice.selected-wrong {
    background: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .35);
}

.ft-review-choice__badge {
    display: inline-grid; place-items: center;
    width: 26px; height: 26px;
    border-radius: 7px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-muted);
    font-weight: 800;
    font-size: .78rem;
    flex-shrink: 0;
    font-family: var(--ff-display);
}
.ft-review-choice.correct .ft-review-choice__badge {
    background: #10b981;
    color: #ffffff;
    border-color: transparent;
}
.ft-review-choice.selected-wrong .ft-review-choice__badge {
    background: #ef4444;
    color: #ffffff;
    border-color: transparent;
}
.ft-review-choice__text {
    color: var(--ink-soft);
    word-wrap: break-word;
}
.ft-review-choice.correct .ft-review-choice__text,
.ft-review-choice.selected-correct .ft-review-choice__text { color: var(--ink-white); }

.ft-review-choice__state {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .76rem;
    font-weight: 700;
    color: var(--ink-muted);
    white-space: nowrap;
    align-self: center;
}
.ft-review-choice.correct .ft-review-choice__state { color: #6ee7b7; }
.ft-review-choice.selected-wrong .ft-review-choice__state { color: #fca5a5; }
.ft-review-choice.correct .ft-review-choice__state i { color: #10b981; }
.ft-review-choice.selected-wrong .ft-review-choice__state i { color: #ef4444; }

.ft-review-choice__feedback {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    color: var(--ink-muted);
    font-size: .82rem;
    line-height: 1.7;
}

.ft-review-explain {
    padding: 16px 20px;
    border-radius: var(--r);
    background: linear-gradient(135deg,
        rgba(255, 194, 24, .05),
        rgba(255, 194, 24, .01));
    border-left: 3px solid var(--gold-500);
    border-top: 1px solid var(--gold-line);
    border-bottom: 1px solid var(--gold-line);
    border-right: 1px solid var(--gold-line);
    margin-bottom: 16px;
}
.ft-review-explain--fa {
    direction: rtl;
    text-align: right;
    border-left: 1px solid var(--gold-line);
    border-right: 3px solid var(--gold-500);
}
.ft-review-explain__title {
    font-weight: 800;
    color: var(--gold-300);
    font-size: .92rem;
    margin-bottom: 8px;
}
.ft-review-explain p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .9rem;
    line-height: 1.95;
}

/* === Persian (FA) block === */
.ft-review-faWrap {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
    direction: rtl;
    text-align: right;
}

.ft-review-faBlock {
    margin-top: 14px;
    padding: 18px 22px;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px dashed var(--gold-line);
    direction: rtl;
    text-align: right;
}

.ft-review-faSection { margin-bottom: 16px; }
.ft-review-faSection:last-child { margin-bottom: 0; }
.ft-review-faSection__title {
    font-size: .82rem;
    font-weight: 800;
    color: var(--gold-300);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--line);
}
.ft-review-faSection__title:empty { display: none; padding: 0; border: 0; }
.ft-review-faQuestion {
    color: var(--ink-soft);
    font-size: .94rem;
    line-height: 1.95;
}

/* =============================================================================
   16. LOADER, EMPTY, UTILITIES
   ========================================================================== */
.ft-loader {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 3px solid var(--line-strong);
    border-top-color: var(--gold-500);
    margin: 0 auto 16px;
    animation: ftSpin .8s linear infinite;
}
@keyframes ftSpin { to { transform: rotate(360deg); } }

.ft-empty-icon {
    font-size: 3rem;
    color: var(--gold-400);
    margin-bottom: 14px;
    opacity: .6;
}

/* =============================================================================
   INTRO PAGE — re-uses many of the above. Adds intro-only layout.
   ========================================================================== */
.ft-hero {
    position: relative;
    padding: 24px 0 32px;
}
.ft-hero__bg {
    position: absolute; inset: 0;
    pointer-events: none;
    background:
        radial-gradient(700px 400px at 80% 0%, rgba(255, 194, 24, .07), transparent 65%),
        radial-gradient(600px 380px at 10% 100%, rgba(65, 84, 173, .12), transparent 60%);
}

.ft-intro-card {
    position: relative;
    padding: 36px 38px;
    border-radius: var(--r-xl);
    background: var(--surface-1);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
    /* max-width: 920px; */
    margin: 0 auto;
}
@media (max-width: 640px) { .ft-intro-card { padding: 24px 22px; } }

.ft-intro-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: center;
}
@media (max-width: 920px) {
    .ft-intro-grid { grid-template-columns: 1fr; gap: 28px; }
    .ft-intro-art { order: 2; max-width: 320px; margin: 0 auto; }
}

.ft-intro-content { min-width: 0; }

.ft-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1px solid var(--line);
    margin-bottom: 24px;
}
@media (max-width: 720px) { .ft-stats { grid-template-columns: 1fr; gap: 10px; } }

.ft-stat {
    display: flex; align-items: center; gap: 10px;
    padding: 4px;
}
.ft-stat__icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--surface-gold);
    color: var(--gold-300);
    font-size: 1.1rem;
    border: 1px solid var(--gold-line);
}
.ft-stat__label {
    font-size: .76rem;
    color: var(--ink-muted);
    font-weight: 600;
}
.ft-stat__value {
    font-size: .96rem;
    font-weight: 800;
    color: var(--gold-300);
    margin-top: 2px;
    font-family: var(--ff-display);
}

.ft-list {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    display: grid; gap: 10px;
}
.ft-list li {
    display: flex; align-items: flex-start; gap: 10px;
    color: var(--ink-soft);
    font-size: .92rem;
    line-height: 1.85;
    padding: 10px 14px;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
    transition: border-color var(--t-fast);
}
.ft-list li:hover { border-color: var(--gold-line); }
.ft-list li i {
    color: var(--gold-400);
    margin-top: 4px;
    flex-shrink: 0;
}

.ft-intro-art {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    max-width: 380px;
    justify-self: center;
}
.ft-intro-art__frame {
    position: relative;
    display: grid; place-items: center;
    width: 100%; height: 100%;
    border-radius: var(--r-xl);
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 194, 24, .15), transparent 60%),
        linear-gradient(135deg, var(--navy-700), var(--navy-900));
    border: 1px solid rgba(255, 194, 24, .25);
    overflow: hidden;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.ft-intro-art__frame::before {
    content: "";
    position: absolute; inset: -1px;
    border-radius: inherit;
    border: 1px dashed rgba(255, 194, 24, .25);
    pointer-events: none;
}
.ft-intro-art__frame img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    border-radius: var(--r);
}

/* =============================================================================
   17. LIGHT-MODE OVERRIDES
   ========================================================================== */
[data-theme="light"] body.ft-page { background: var(--navy-deep); }
[data-theme="light"] body.ft-page .ft-wrap {
    background:
        radial-gradient(900px 600px at 88% 12%, rgba(255, 194, 24, .10), transparent 65%),
        radial-gradient(700px 500px at  8% 88%, rgba(65, 84, 173, .08), transparent 60%);
}
[data-theme="light"] .ft-runner__title,
[data-theme="light"] .ft-question-text,
[data-theme="light"] .ft-result-hero__title,
[data-theme="light"] .ft-h2,
[data-theme="light"] .ft-review-card__q,
[data-theme="light"] .ft-review-shell__title { color: var(--navy-900); }

[data-theme="light"] .ft-stat__icon { color: var(--gold-700); }
[data-theme="light"] .ft-stat__value { color: var(--gold-700); }
[data-theme="light"] .ft-list li i { color: var(--gold-600); }
[data-theme="light"] .ft-chip { color: var(--gold-700); }
[data-theme="light"] .ft-chip i { color: var(--gold-600); }
[data-theme="light"] .ft-question-type { color: var(--gold-700); }
[data-theme="light"] .ft-statCard__icon { color: var(--gold-700); }
[data-theme="light"] .ft-statCard__value { color: var(--navy-900); }
[data-theme="light"] .ft-statCard--good .ft-statCard__value { color: #047857; }
[data-theme="light"] .ft-statCard--bad  .ft-statCard__value { color: #b91c1c; }
[data-theme="light"] .ft-statCard--pass .ft-statCard__value { color: var(--gold-700); }
[data-theme="light"] .ft-discount__head { color: var(--gold-700); }
[data-theme="light"] .ft-discount__money { color: var(--gold-700); }
[data-theme="light"] .ft-discount::before,
[data-theme="light"] .ft-discount::after { background: var(--navy-deep); }
[data-theme="light"] .ft-review-card__qno { color: var(--gold-700); }
[data-theme="light"] .ft-review-meta b { color: var(--gold-700); }
[data-theme="light"] .ft-review-explain__title,
[data-theme="light"] .ft-review-faSection__title { color: var(--gold-700); }
[data-theme="light"] .ft-metric--timer .ft-metric__label,
[data-theme="light"] .ft-metric--timer .ft-metric__value { color: var(--gold-700); }
[data-theme="light"] .ft-empty-icon { color: var(--gold-600); }
[data-theme="light"] .ft-result-hero__meta i { color: var(--gold-700); }
[data-theme="light"] .ft-review-shell__title i { color: var(--gold-700); }

/* Result hero in light — same accent colors but slightly toned */
[data-theme="light"] .ft-result-hero--pass {
    background:
        radial-gradient(ellipse 600px 240px at 50% 0%, rgba(16, 185, 129, .12), transparent 70%),
        var(--surface-2);
}
[data-theme="light"] .ft-result-hero--fail {
    background:
        radial-gradient(ellipse 600px 240px at 50% 0%, rgba(239, 68, 68, .10), transparent 70%),
        var(--surface-2);
}

/* Stepper colors in light */
[data-theme="light"] .ft-step.is-ok { color: #047857; }
[data-theme="light"] .ft-step.is-bad { color: #b91c1c; }
[data-theme="light"] .ft-review-choice.correct .ft-review-choice__state { color: #047857; }
[data-theme="light"] .ft-review-choice.selected-wrong .ft-review-choice__state { color: #b91c1c; }
[data-theme="light"] .ft-review-card.is-correct .ft-review-card__status { color: #047857; }
[data-theme="light"] .ft-review-card.is-wrong .ft-review-card__status { color: #b91c1c; }

/* Form inputs in light */
[data-theme="light"] .ft-option { background: #ffffff; }
[data-theme="light"] .ft-option__text { color: var(--navy-700); }
[data-theme="light"] .ft-option.is-selected .ft-option__text { color: var(--navy-900); }
[data-theme="light"] .ft-option__badge { background: rgba(28, 36, 71, .04); }

/* Save button is-saved colors in light */
[data-theme="light"] .ft-btn--save.is-saved { color: #047857; }
[data-theme="light"] .ft-btn--save.is-saved i { color: #059669; }

/* =============================================================================
   18. MOBILE + REDUCED MOTION
   ========================================================================== */
@media (max-width: 640px) {
    .ft-actions { flex-direction: column; }
    .ft-actions .ft-btn { width: 100%; }
    .ft-actions--bottom { flex-direction: row; }
    .ft-actions--bottom .ft-btn { width: auto; }
    .ft-result-hero__icon { width: 70px; height: 70px; font-size: 2rem; }
    .ft-runner__title { font-size: 1.1rem; }
    .ft-question-text { font-size: 1rem; padding: 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .ft-loader { animation: none; }
    .ft-metric--timer.is-danger { animation: none; }
    .ft-btn--primary::before { display: none; }
    .ft-btn--save.is-shake { animation: none; }
}
/* =============================================================================
   18. INTRO ART SVG  (replaces the old gif)
   ----
   A composed infographic of an exam paper with checkmarks, current question,
   star badge, and lightning badge — adapts to both themes.
   ========================================================================== */
.ft-art-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* Orbit — dashed circle */
.ft-art-orbit {
    fill: none;
    stroke: rgba(255, 194, 24, .25);
    stroke-width: 1.5;
    stroke-dasharray: 3 5;
}

/* Floating dots */
.ft-art-dot--gold  { fill: #ffc218; opacity: .7; }
.ft-art-dot--blue  { fill: #5b67a6; opacity: .6; }
.ft-art-dot--green { fill: #22b46c; opacity: .5; }

/* Paper */
.ft-art-paper {
    fill: rgba(255, 255, 255, .05);
    stroke: rgba(255, 194, 24, .35);
    stroke-width: 1.5;
}

/* Lines (question text placeholders) */
.ft-art-line          { fill: rgba(255, 255, 255, .20); }
.ft-art-line--strong  { fill: rgba(255, 255, 255, .30); }
.ft-art-line--faint   { fill: rgba(255, 255, 255, .12); }
.ft-art-title-sub     { fill: rgba(255, 194, 24, .50); }

/* Empty radio circles */
.ft-art-circle-empty {
    stroke: rgba(255, 255, 255, .35);
    stroke-width: 1.5;
}

/* Star + lightning badge backgrounds */
.ft-art-badge {
    fill: rgba(255, 194, 24, .15);
    stroke: rgba(255, 194, 24, .55);
    stroke-width: 1.5;
}

/* ─────────────────────────────────────────────────────────
   Light theme overrides
   ───────────────────────────────────────────────────────── */
[data-theme="light"] .ft-intro-art__frame {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 194, 24, .12), transparent 60%),
        linear-gradient(135deg, #ffffff, #f1f4fa);
    border-color: rgba(200, 149, 0, .35);
    box-shadow:
        0 30px 70px rgba(28, 36, 71, .15),
        0 0 0 1px rgba(255, 255, 255, .50) inset;
}
[data-theme="light"] .ft-intro-art__frame::before {
    border-color: rgba(200, 149, 0, .30);
}

[data-theme="light"] .ft-art-paper {
    fill: rgba(255, 255, 255, .65);
    stroke: rgba(200, 149, 0, .45);
}
[data-theme="light"] .ft-art-line          { fill: rgba(28, 36, 71, .28); }
[data-theme="light"] .ft-art-line--strong  { fill: rgba(28, 36, 71, .42); }
[data-theme="light"] .ft-art-line--faint   { fill: rgba(28, 36, 71, .15); }
[data-theme="light"] .ft-art-title-sub     { fill: rgba(200, 149, 0, .60); }
[data-theme="light"] .ft-art-circle-empty  { stroke: rgba(28, 36, 71, .35); }
[data-theme="light"] .ft-art-badge {
    fill: rgba(255, 194, 24, .18);
    stroke: rgba(200, 149, 0, .55);
}
[data-theme="light"] .ft-art-orbit {
    stroke: rgba(200, 149, 0, .35);
}