/* /exam (exam.html, exam.js): introduction, taking the exam, the result */
.rx { max-width: 860px; margin: 0 auto; }
.rx-intro { padding: 28px 30px; border-radius: 18px; background: #fff; border: 1px solid var(--rm-rule, #e6e3da); box-shadow: var(--rm-shadow); }
.rx-back { font-size: .88rem; }
.rx-intro h1 { margin: 8px 0; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); color: var(--rm-ink, #16205b); }
.rx-summary { margin: 0 0 18px; color: var(--rm-muted, #5d6475); line-height: 1.9; }
.rx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.rx-facts li { padding: 12px; border-radius: 12px; background: var(--rm-soft, #f3f1ea); text-align: center; }
.rx-facts b { display: block; font-size: 1.3rem; color: var(--rm-ink, #16205b); }
.rx-facts span { font-size: .8rem; color: var(--rm-muted, #5d6475); }
.rx-desc { line-height: 2; }
.rx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0 8px; }
.rx-start, .rx-nav button, .rx-nav a, .rx-msg button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px;
  background: #e5583f; color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.rx-start { min-width: 200px; font-size: 1.05rem; }
.rx-start:hover, .rx-nav button:hover, .rx-nav a:hover { background: #c94a33; color: #fff; text-decoration: none; }
/* a paid exam: what is bought */
.rx-buy { margin: 18px 0 0; padding: 18px 20px; border: 2px solid #f3c9bf; border-radius: 16px; background: linear-gradient(135deg, #fff7f4, #fff); }
.rx-buy-price { font-size: .95rem; color: var(--rm-muted, #5d6475); }
.rx-buy-price b { font-size: 1.8rem; color: #b8361f; }
.rx-buy ul { margin: 10px 0 0; padding: 0; list-style: none; }
.rx-buy li { padding: 3px 0; padding-inline-start: 22px; position: relative; font-size: .92rem; }
.rx-buy li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: #1f9e9c; font-weight: 800; }
.rx-buy-by { margin: 10px 0 0; font-size: .88rem; }
.rx-bought { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: #e4f2e8; color: #1d6b3a; font-weight: 700; }
.rx-note, .rx-hint { font-size: .82rem; color: var(--rm-muted, #5d6475); }

/* taking */
.rx-run { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--rm-rule, #e6e3da); box-shadow: var(--rm-shadow); }
.rx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rx-timer { min-width: 76px; padding: 6px 12px; border-radius: 10px; background: #16205b; color: #fff; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.rx-timer.rx-late { background: #b8361f; animation: rx-blink 1s infinite; }
@keyframes rx-blink { 50% { opacity: .6; } }
.rx-progress { height: 6px; border-radius: 3px; background: var(--rm-soft, #f3f1ea); overflow: hidden; }
.rx-progress i { display: block; height: 100%; background: #1f9e9c; transition: width .3s; }
/* the questions: a wrapped grid of numbers (all visible, no sideways scroll); on phones behind «سوال n از m» */
.rx-nums-toggle { display: none; }
.rx-nums { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; padding: 4px; }
.rx-nums button { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--rm-rule, #e6e3da); border-radius: 8px; background: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.rx-nums button:hover { border-color: #8fb3d6; }
.rx-nums .rx-done { background: #e2f4f3; border-color: #1f9e9c; color: #136e6c; }
.rx-nums .rx-here { background: #16205b; border-color: #16205b; color: #fff; font-weight: 800; }
.rx-q-n { margin: 0 0 6px; font-size: .82rem; color: var(--rm-muted, #5d6475); }
.rx-q-body { font-size: 1.1rem; line-height: 2; color: var(--rm-ink, #16205b); }
.rx-q-media { max-width: 100%; margin: 10px 0; border-radius: 10px; }
.rx-img { display: block; max-width: 100%; max-height: 360px; margin: 10px 0; border-radius: 10px; }
.rx-opt .rx-img, .rx-sheet li .rx-img { display: inline-block; max-height: 140px; margin: 4px 0; vertical-align: middle; }
.rx-opts { display: grid; gap: 10px; margin: 16px 0 6px; }
.rx-opt { padding: 14px 16px; border: 2px solid var(--rm-rule, #e6e3da); border-radius: 12px; background: #fff; font: inherit; text-align: start; cursor: pointer; transition: border-color .15s, background .15s; }
.rx-opt:hover { border-color: #8fb3d6; }
.rx-opt.rx-on { border-color: #1d5a8e; background: #e8f0f8; font-weight: 700; }
.rx-opt:focus-visible, .rx-nums button:focus-visible { outline: 3px solid #e5583f; outline-offset: 2px; }
.rx-likert { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rx-likert .rx-opt { padding: 12px 6px; text-align: center; font-size: .88rem; }
.rx-fill { width: 100%; height: 50px; margin: 16px 0 6px; padding: 0 14px; border: 2px solid var(--rm-rule, #e6e3da); border-radius: 12px; font: inherit; font-size: 16px; }
.rx-fill:focus { outline: none; border-color: #1d5a8e; }
.rx-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rx-nav .rx-prev, .rx-nav .rx-next { background: #16205b; }
.rx-nav .rx-prev:disabled { opacity: .35; cursor: default; }
.rx-nav .rx-finish { margin-inline-start: auto; }
.rx-saved { min-height: 1.4em; margin: 8px 0 0; font-size: .8rem; color: var(--rm-muted, #5d6475); }
.rx-msg { padding: 30px; border-radius: 18px; background: #fff; border: 1px solid var(--rm-rule, #e6e3da); text-align: center; }
.rx-msg a { display: block; margin-top: 12px; }

/* the result */
.rx-result { padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--rm-rule, #e6e3da); box-shadow: var(--rm-shadow); }
.rx-result h2 { margin: 0 0 18px; color: var(--rm-ink, #16205b); }
.rx-score { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-bottom: 20px; }
.rx-ring { --p: 0; display: grid; place-items: center; align-content: center; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(closest-side, #fff 78%, transparent 79%), conic-gradient(#1f9e9c calc(var(--p) * 1%), var(--rm-soft, #f3f1ea) 0); }
.rx-ring b { font-size: 2rem; color: var(--rm-ink, #16205b); line-height: 1.2; }
.rx-ring small { color: var(--rm-muted, #5d6475); }
.rx-score dl { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.rx-score dl div { padding: 12px 14px; border-radius: 12px; background: var(--rm-soft, #f3f1ea); }
.rx-score dt { font-size: .8rem; color: var(--rm-muted, #5d6475); }
.rx-score dd { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--rm-ink, #16205b); }
.rx-score dd small { font-size: .78rem; font-weight: 400; color: var(--rm-muted, #5d6475); }
.rx-spread { margin: 0 0 22px; }
.rx-spread figcaption { margin-bottom: 8px; font-size: .85rem; color: var(--rm-muted, #5d6475); }
.rx-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 0 2px; border-bottom: 2px solid var(--rm-rule, #e6e3da); direction: ltr; }
.rx-bars span { flex: 1; border-radius: 6px 6px 0 0; background: #c9d6e6; }
.rx-bars .rx-me { background: #e5583f; }
.rx-axis { display: flex; justify-content: space-between; direction: ltr; font-size: .75rem; color: var(--rm-muted, #5d6475); }
.rx-profile { margin: 0 0 20px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(135deg, #efe8f8, #e8f0f8); }
.rx-profile h3 { margin: 0 0 8px; color: #4a2a80; }
.rx-profile p { margin: 0; line-height: 2; }
.rx-scales { display: grid; gap: 16px; margin-bottom: 8px; }
.rx-scale-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.rx-scale-bar { height: 12px; border-radius: 6px; background: var(--rm-soft, #f3f1ea); overflow: hidden; }
.rx-scale-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6a3fa0, #1d5a8e); }
.rx-scale p { margin: 8px 0 0; font-size: .9rem; line-height: 1.9; color: var(--rm-text, #2f3445); }
.rx-sheet { margin: 18px 0 0; }
.rx-sheet summary { cursor: pointer; font-weight: 700; color: var(--rm-ink, #16205b); }
.rx-sheet ol { padding-inline-start: 22px; }
.rx-sheet > ol > li { margin: 14px 0; padding: 12px 14px; border-radius: 12px; border-inline-start: 4px solid var(--rm-rule, #e6e3da); background: #fbfaf6; }
.rx-sheet .rx-ok { border-color: #2e9e5b; }
.rx-sheet .rx-no { border-color: #d0453a; }
.rx-sheet ul { margin: 6px 0; padding-inline-start: 18px; }
.rx-sheet .rx-right { color: #1d6b3a; font-weight: 700; }
.rx-sheet .rx-wrong { color: #b8361f; text-decoration: line-through; }
.rx-why { margin: 6px 0 0; font-size: .88rem; color: #4a4f60; }
.rx-nav .rx-again { background: #16205b; }
@media (max-width: 600px) {
  .rx-nums-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--rm-rule, #e6e3da); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; }
  .rx-nums { display: none; margin-top: 8px; }
  .rx-nums.rx-open { display: flex; }
  .rx-nums button { width: 36px; height: 36px; }
  .rx-intro, .rx-run, .rx-result { padding: 18px 14px; border-radius: 14px; }
  .rx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-likert { grid-template-columns: 1fr; }
  .rx-likert .rx-opt { text-align: start; padding: 12px 14px; }
  .rx-score { justify-content: center; }
  .rx-score dl { flex-basis: 100%; }
  .rx-nav .rx-finish { margin-inline-start: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .rx-timer.rx-late { animation: none; } .rx-progress i, .rx-opt { transition: none; } }
/* exams in sections (konkur): the section of a question, and percent / تراز of each section on the result */
.rx-sec { display: inline-block; margin-inline-end: 8px; padding: 1px 10px; border-radius: 999px; background: #eef1fb; color: #2f3f9e; font-weight: 700; }
.rx-secs { margin: 22px 0; }
.rx-secs h3 { margin: 0 0 10px; font-size: 1.05rem; }
.rx-secs-scroll { overflow-x: auto; border: 1px solid var(--rm-rule, #e6e3da); border-radius: 14px; background: #fff; }
.rx-secs table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rx-secs th, .rx-secs td { padding: 10px 12px; border-bottom: 1px solid #efede6; text-align: start; white-space: nowrap; }
.rx-secs thead th { background: #f8f7f2; color: var(--rm-muted, #5d6475); font-size: .8rem; }
.rx-secs tbody tr:last-child > * { border-bottom: 0; }
.rx-secs tbody th { color: var(--rm-ink, #16205b); }
.rx-secs td b { color: var(--rm-ink, #16205b); font-size: 1rem; }
.rx-secs small { display: block; color: var(--rm-muted, #5d6475); font-size: .72rem; }
.rx-sec-bar { display: inline-block; width: 60px; height: 6px; margin-inline-end: 8px; border-radius: 3px; background: #eceae3; vertical-align: middle; overflow: hidden; }
.rx-sec-bar i { display: block; height: 100%; background: #2f5bd3; }
.rx-buy-why { margin: 0 0 10px; color: var(--rm-text, #2f3445); line-height: 1.9; }
.rx-retake { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #eef3ff; color: #1f3a8a; font-size: .9rem; line-height: 1.9; }

/* the list of question numbers stays closed (owner 2026-11-03: «فضای زیادی می‌گیره و استرس‌زاست»): one calm line,
   «سوال ۸ از ۷۰ · ۷ پاسخ», opens the list when asked; a question in English reads left to right */
.rx-nums-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 12px 0 0; padding: 10px 14px;
  border: 1px solid var(--rm-rule, #e6e3da); border-radius: 12px; background: #fafaf7; color: var(--rm-text, #2f3445); font: inherit; cursor: pointer; }
.rx-nums-toggle b { color: var(--rm-ink, #16205b); }
.rx-nums-toggle small { color: var(--rm-muted, #5d6475); font-size: .82rem; }
/* a drawn chevron (not a text arrow) */
.rx-nums-toggle::after { content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0; border: solid var(--rm-muted, #5d6475); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s, margin .2s; }
.rx-nums-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 4px; }
.rx-nums { display: none; margin: 8px 0 14px; padding: 10px; border: 1px solid var(--rm-rule, #e6e3da); border-radius: 12px; background: #fff; max-height: 220px; overflow-y: auto; }
.rx-nums.rx-open { display: flex; }
.rx-q { margin-top: 16px; }
.rx-q-body[dir="auto"], .rx-opt span[dir="auto"] { unicode-bidi: plaintext; text-align: start; }
.rx-opt span[dir="auto"] { display: block; }
