#trader-psych-quiz-container {
    direction: rtl;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    max-width: 600px;
    margin: 2rem auto;
}

#tpq {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
}

/* ── Header ── */
.tpq-header {
    background: #c0392b;
    padding: 28px 28px 24px;
    text-align: center;
    color: #fff;
}

.tpq-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 8px;
}

.tpq-header h2 {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #fff;
}

.tpq-header p {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
}

/* ── Progress ── */
.tpq-progress-wrap {
    padding: 16px 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tpq-progress-bar-bg {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

.tpq-progress-bar-fill {
    height: 100%;
    background: #c0392b;
    border-radius: 3px;
    width: 10%;
    transition: width 0.4s ease;
}

.tpq-progress-text {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    min-width: 70px;
    text-align: left;
}

/* ── Quiz body ── */
.tpq-body {
    padding: 24px 24px 20px;
}

.tpq-question-num {
    font-size: 11px;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tpq-question-text {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ── Options ── */
.tpq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.tpq-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #fff;
    text-align: right;
    font-family: inherit;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    width: 100%;
}

.tpq-option:hover {
    border-color: #c0392b;
    background: #fdf2f2;
}

.tpq-option.selected {
    border-color: #c0392b;
    background: #fdf2f2;
    color: #7c1d12;
    font-weight: 500;
}

.tpq-option-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    margin-top: 1px;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpq-option.selected .tpq-option-dot {
    border-color: #c0392b;
    background: #c0392b;
}

.tpq-option.selected .tpq-option-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    display: block;
}

/* ── Nav button ── */
.tpq-nav {
    text-align: left;
}

.tpq-btn {
    height: 46px;
    padding: 0 28px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
}

.tpq-btn:hover:not(:disabled) {
    background: #a93226;
}

.tpq-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.tpq-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Result panel ── */
.tpq-result {
    display: none;
    padding: 28px 24px 24px;
    text-align: center;
}

.tpq-result.visible {
    display: block;
}

.tpq-result-emoji {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
}

.tpq-result-badge {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.tpq-result-title {
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
    font-weight: 700;
    color: #7c1d12;
    margin-bottom: 12px;
    line-height: 1.3;
}

.tpq-result-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.85;
    margin-bottom: 24px;
    text-align: right;
    background: #f9fafb;
    border-radius: 12px;
    padding: 14px 16px;
}

/* ── Score bars ── */
.tpq-score-bar-wrap {
    margin-bottom: 20px;
    text-align: right;
}

.tpq-score-row {
    margin-bottom: 12px;
}

.tpq-score-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    color: #374151;
}

.tpq-score-label-row span:last-child {
    font-weight: 600;
    color: #c0392b;
}

.tpq-score-track {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.tpq-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ── Strengths / Weaknesses ── */
.tpq-result-strengths,
.tpq-result-weaknesses {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    text-align: right;
}

.tpq-result-strengths {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.tpq-result-weaknesses {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.tpq-sw-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tpq-result-strengths .tpq-sw-title { color: #166534; }
.tpq-result-weaknesses .tpq-sw-title { color: #9a3412; }

.tpq-sw-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tpq-sw-list li {
    font-size: 13px;
    line-height: 1.7;
    padding-right: 16px;
    position: relative;
    color: #374151;
}

.tpq-result-strengths .tpq-sw-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: #16a34a;
    font-weight: 700;
}

.tpq-result-weaknesses .tpq-sw-list li::before {
    content: '!';
    position: absolute;
    right: 0;
    color: #ea580c;
    font-weight: 700;
}

/* ── Retry ── */
.tpq-retry-btn {
    display: inline-block;
    margin: 16px auto 10px;
    height: 44px;
    padding: 0 28px;
    background: transparent;
    color: #c0392b;
    border: 1.5px solid #c0392b;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.tpq-retry-btn:hover {
    background: #c0392b;
    color: #fff;
}

.tpq-share-nudge {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 8px;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .tpq-header { padding: 22px 18px 20px; }
    .tpq-body { padding: 18px 16px 16px; }
    .tpq-result { padding: 20px 16px 18px; }
    .tpq-progress-wrap { padding: 14px 16px 0; }
    .tpq-btn, .tpq-retry-btn { width: 100%; }
    .tpq-nav { text-align: center; }
}
