/* ═══ منوی موبایل (D-649) ═══
   نوارِ هر دو سرصفحه — پوسته‌ی سایت و لندینگ — زیرِ ۱۰۲۴px پنهان
   می‌شد (`hidden lg:flex` در طرح) و هیچ راهی به رویدادها، تقویم،
   تعرفه‌ها و استعلامِ گواهی نمی‌ماند. طرح منوی موبایل **نداشت**، پس
   این یکی دست‌نویس است.

   کلاس‌ها پیشوندِ `rq-` دارند و قاعده‌شان همین‌جاست، نه در CSS ساخته‌ی
   طرح: آن فایل خروجیِ تیلویند است و کلاسِ تازه در آن وجود ندارد
   (§۶.۷۵). پس این فایل کنارِ هر دو صفحه بار می‌شود. */

.rq-mnav-btn { display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid #e2e8f0;
  background: #fff; color: #0f172a; cursor: pointer; flex: none; }
.rq-mnav-btn:hover { background: #f8fafc; }
.rq-mnav-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.rq-mnav-btn svg { width: 22px; height: 22px; }
.rq-mnav-btn .rq-x { display: none; }
.rq-mnav-btn[aria-expanded="true"] .rq-x { display: block; }
.rq-mnav-btn[aria-expanded="true"] .rq-bars { display: none; }

.rq-mnav { display: none; border-top: 1px solid #e2e8f0; background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12); }
.rq-mnav[hidden] { display: none; }
.rq-mnav-inner { max-width: 1280px; margin: 0 auto; padding: 12px 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: Vazirmatn, Tahoma, sans-serif; }
.rq-mnav a { display: flex; align-items: center; gap: 8px; padding: 12px 10px;
  border-radius: 12px; font-size: .95rem; font-weight: 700; color: #1e293b;
  text-decoration: none; }
.rq-mnav a:hover, .rq-mnav a:focus-visible { background: #f1f5f9; color: #1d4ed8; }
.rq-mnav .rq-mnav-cta { justify-content: center; margin-top: 8px;
  background: #1d4ed8; color: #fff; }
.rq-mnav .rq-mnav-cta:hover { background: #1e40af; color: #fff; }
.rq-mnav .rq-mnav-ghost { justify-content: center; border: 1px solid #cbd5e1; }
.rq-mnav-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; flex: none; }

/* زیرِ ۱۰۲۴px: دکمه می‌آید. بازشدن با جاوااسکریپت است (`hidden` برداشته
   می‌شود)، پس بی جاوااسکریپت دکمه هم دیده نمی‌شود — کنترلی که کاری
   نمی‌کند از نبودش بدتر است (§۶.۷۰). */
@media (max-width: 1023px) {
  .rq-mnav-ready .rq-mnav-btn { display: inline-flex; }
  .rq-mnav:not([hidden]) { display: block; }
  /* «ورود» و «ثبت‌نام رایگان» و نامِ کاربر از نوار می‌روند و در منو
     می‌نشینند: در ۳۹۰px هر سه کنارِ هم جا نمی‌شدند و برچسبِ ثبت‌نام
     دوخطی می‌شد (روی مرورگرِ r1 دیده شد). فقط وقتی منو واقعاً کار
     می‌کند — بی جاوااسکریپت، دکمه‌ها سر جایشان می‌مانند. */
  .rq-mnav-ready .rq-mnav-btn ~ a,
  .rq-mnav-ready .rq-mnav-btn ~ span,
  .rq-mnav-ready .rq-mnav-btn ~ button,
  .rq-mnav-ready .rq-mnav-btn ~ details { display: none; }
}
@media (min-width: 1024px) {
  .rq-mnav, .rq-mnav-btn { display: none !important; }
}

/* ═══ دکمه‌ی حساب در سرصفحه (D-720) ═══
   جایِ «نام + پنل من + خروج»: تصویرِ حساب و «پنل من»، با منوی کوچک. `<details>` است، پس
   بی جاوااسکریپت هم باز می‌شود. رنگ‌ها روشن‌اند (لندینگ همیشه روشن است)؛ پوسته‌ی تاریکِ
   سایت در `shell-dark.css`. زیرِ ۱۰۲۴px، مثلِ بقیه‌ی دکمه‌ها، به منوی موبایل می‌رود. */
.rq-acct { position: relative; font-family: Vazirmatn, Tahoma, sans-serif; }
.rq-acct-btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 4px;
  padding-inline-end: 14px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff;
  color: #334155; font-size: .9rem; font-weight: 700; cursor: pointer; list-style: none;
  user-select: none; transition: border-color .15s, background .15s; }
.rq-acct-btn::-webkit-details-marker { display: none; }
.rq-acct-btn::marker { content: ""; }
.rq-acct-btn:hover { border-color: #94a3b8; background: #f8fafc; }
.rq-acct-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.rq-acct[open] .rq-acct-btn { border-color: #6366f1; }
.rq-acct-av { position: relative; display: grid; place-items: center; flex: none; width: 36px;
  height: 36px; overflow: hidden; border-radius: 50%; color: #fff; font-size: .95rem; font-weight: 800;
  background: linear-gradient(135deg, #5B4BE8, #1E9FC4); }
.rq-acct-av.is-img { background: #e2e8f0; }
.rq-acct-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rq-acct-av svg { width: 62%; height: 62%; }
.rq-acct-badge { padding: 2px 8px; border-radius: 999px;
  background: #ede9fe; color: #5b21b6; font-size: .7rem; font-weight: 800; }
.rq-acct-chev { width: 16px; height: 16px; color: #64748b; transition: transform .2s; }
.rq-acct[open] .rq-acct-chev { transform: rotate(180deg); }

.rq-acct-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 232px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 18px; background: #fff;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .28); animation: rq-acct-in .16s ease-out; }
@keyframes rq-acct-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .rq-acct-menu { animation: none; } }
.rq-acct-who { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid #f1f5f9; }
.rq-acct-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-acct-who b { color: #0f172a; font-size: .95rem; }
.rq-acct-who small { color: #64748b; font-size: .78rem; font-weight: 600; }
.rq-acct-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  color: #1e293b; font-size: .9rem; font-weight: 600; text-decoration: none; }
.rq-acct-menu a svg { width: 18px; height: 18px; flex: none; color: #64748b; }
.rq-acct-menu a:hover, .rq-acct-menu a:focus-visible { background: #f1f5f9; color: #4338ca; outline: none; }
.rq-acct-menu a:hover svg { color: currentColor; }
.rq-acct-menu .rq-acct-out { margin-top: 6px; border-top: 1px solid #f1f5f9; border-radius: 0 0 12px 12px;
  color: #be123c; }
.rq-acct-menu .rq-acct-out svg { color: currentColor; }
.rq-acct-menu .rq-acct-out:hover { background: #fff1f2; color: #9f1239; }

/* گرادیانِ نمادهای آماده‌ی تصویرِ حساب (D-711) — این‌جا، نه panel.css، چون سرصفحه‌ی لندینگ
   panel.css را بار نمی‌کند؛ پنل هم این فایل را دارد. کلیدها در `User.AVATAR_PRESETS`. */
.av-p-class { background: linear-gradient(135deg, #5B4BE8, #1E9FC4); }
.av-p-mic { background: linear-gradient(135deg, #D8395B, #F08A5D); }
.av-p-book { background: linear-gradient(135deg, #1E7A55, #4FBF8C); }
.av-p-cap { background: linear-gradient(135deg, #2A1F9F, #8C81F5); }
.av-p-wave { background: linear-gradient(135deg, #0E7490, #22B8D8); }
.av-p-spark { background: linear-gradient(135deg, #B8761A, #EDB445); }
.av-p-globe { background: linear-gradient(135deg, #1D4ED8, #5B9BF5); }
.av-p-orbit { background: linear-gradient(135deg, #6D28D9, #DB4B9A); }

/* منوی موبایل: نام و نقش بالای پیوندهای حساب */
.rq-mnav .rq-mnav-who { display: flex; align-items: center; gap: 12px; margin-top: 8px;
  padding: 12px 10px 6px; border-top: 1px solid #e2e8f0; }
.rq-mnav-who .rq-acct-av { width: 40px; height: 40px; }
.rq-mnav-who b { display: block; color: #0f172a; font-size: .95rem; }
.rq-mnav-who small { color: #64748b; font-size: .78rem; }

/* ═══ رفتن به بالا (D-731) ═══
   کارفرما: «یک آیکون یا عبارتِ رفتن به بالا، خلاقانه و مدرن». دایره‌ی گرادیانِ برند که
   حلقه‌اش پیشرفتِ خواندنِ صفحه را نشان می‌دهد؛ پس از کمی پایین‌رفتن با جهشی نرم می‌آید و
   با کلیک فلش به بالا پرتاب می‌شود. گوشه‌ی پایین‌چپ (انتهای خط در راست‌به‌چپ) آزاد است:
   پیامِ گذرای لندینگ وسطِ پایین است. نشانه‌گذاری را `mobile-nav.js` می‌سازد، پس بی
   جاوااسکریپت دکمه‌ای بی‌کار نمی‌ماند؛ این فایل در پوسته، پنل و لندینگ بار می‌شود. */
.rq-top { position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 55; display: grid;
  place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%;
  color: #fff; cursor: pointer; background: linear-gradient(135deg, #5B4BE8, #1E9FC4);
  box-shadow: 0 14px 30px -10px rgba(91, 75, 232, .7), inset 0 1px 0 rgba(255, 255, 255, .28);
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.8);
  transition: opacity .25s, transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s, visibility 0s .35s; }
.rq-top.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.rq-top.is-on:hover { transform: translateY(-4px); box-shadow: 0 20px 38px -10px rgba(91, 75, 232, .85),
  inset 0 1px 0 rgba(255, 255, 255, .28); }
.rq-top:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }
.rq-top svg { pointer-events: none; }
.rq-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rq-top-ring circle { fill: none; stroke-width: 3; }
.rq-top-ring .trk { stroke: rgba(255, 255, 255, .22); }
.rq-top-ring .bar { stroke: #fff; stroke-linecap: round; stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 0)); transition: stroke-dashoffset .12s linear; }
.rq-top-arr { position: relative; width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rq-top.is-on:hover .rq-top-arr { animation: rq-top-bob .9s ease-in-out infinite; }
.rq-top.is-launch .rq-top-arr { animation: rq-top-launch .6s cubic-bezier(.5, 0, .2, 1); }
@keyframes rq-top-bob { 50% { transform: translateY(-3px); } }
@keyframes rq-top-launch { 45% { transform: translateY(-26px); opacity: 0; }
  46% { transform: translateY(18px); opacity: 0; } }
@media (max-width: 640px) { .rq-top { inset-inline-end: 16px; bottom: 16px; width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) {
  .rq-top, .rq-top-ring .bar { transition: none; }
  .rq-top.is-on:hover .rq-top-arr, .rq-top.is-launch .rq-top-arr { animation: none; }
}
@media print { .rq-top { display: none; } }

/* ═══ کلیدِ پوسته (D-733) ═══
   سوئیچِ روشن/تیره کنارِ نام در منوی حساب و منوی موبایل (`_theme_switch.html`). ریل در روشن
   آسمانِ صبح است و در تیره آسمانِ شب با چند ستاره؛ دکمه با خورشید/ماه می‌لغزد و یک دور
   می‌چرخد. راست‌به‌چپ: روشن دکمه در راست، تیره در چپ. «خودکار» زیرِ آن.
   انتخاب‌گرها زیرِ `.rq-tsw`اند: بازنشانیِ `.riqx-shell button` در `shell.css` (پس‌زمینه‌ی شفاف،
   رنگِ ارثی) ویژگیِ بالاتری از یک کلاسِ تنها دارد و گرادیانِ روشن را خنثی می‌کرد. */
.rq-tsw { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; }
.rq-tsw[hidden] { display: none; }
.rq-tsw .rq-tsw-btn { position: relative; width: 52px; height: 28px; padding: 0; border: 0; border-radius: 999px;
  overflow: hidden; cursor: pointer; background: linear-gradient(135deg, #bae6fd, #fde68a);
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, .18), inset 0 0 0 1px rgba(15, 23, 42, .06);
  transition: background .35s; }
.rq-tsw .rq-tsw-btn::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(1.3px 1.3px at 64% 30%, #fff 98%, transparent),
    radial-gradient(1px 1px at 78% 62%, #fff 98%, transparent),
    radial-gradient(1.4px 1.4px at 88% 36%, #c7d2fe 98%, transparent),
    radial-gradient(1px 1px at 70% 78%, #e0e7ff 98%, transparent); }
.rq-tsw .rq-tsw-btn[aria-checked="true"] { background: linear-gradient(135deg, #312e81, #0f172a);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(165, 180, 252, .28); }
.rq-tsw .rq-tsw-btn[aria-checked="true"]::before { opacity: 1; }
.rq-tsw .rq-tsw-btn:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.rq-tsw-knob { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 22px;
  height: 22px; border-radius: 50%; color: #f59e0b; background: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .28);
  transition: transform .4s cubic-bezier(.34, 1.4, .64, 1), background .35s, color .35s; }
.rq-tsw .rq-tsw-btn[aria-checked="true"] .rq-tsw-knob { transform: translateX(-24px) rotate(-360deg);
  color: #4338ca; background: #e0e7ff; }
.rq-tsw-knob svg { position: absolute; width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: opacity .25s, transform .3s; }
.rq-tsw-knob .rq-tsw-moon { fill: currentColor; stroke: none; opacity: 0; transform: scale(.4); }
.rq-tsw .rq-tsw-btn[aria-checked="true"] .rq-tsw-sun { opacity: 0; transform: scale(.4); }
.rq-tsw .rq-tsw-btn[aria-checked="true"] .rq-tsw-moon { opacity: 1; transform: none; }
.rq-tsw .rq-tsw-auto { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px; border: 0; background: none;
  color: #4f46e5; font: inherit; font-size: .68rem; font-weight: 700; line-height: 1.5; cursor: pointer; }
.rq-tsw .rq-tsw-auto::before { content: "↺"; font-size: .78rem; }
.rq-tsw .rq-tsw-auto:hover:not(:disabled) { color: #3730A3; }   /* بی زیرخط (کارفرما، D-734) */
.rq-tsw .rq-tsw-auto:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 4px; }
.rq-tsw.is-auto .rq-tsw-auto { color: #64748b; cursor: default; }
.rq-tsw.is-auto .rq-tsw-auto::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.rq-mnav-who .rq-tsw { margin-inline-start: auto; }
/* کلیدِ پوسته برای مهمان (D-739): در سرصفحه فقط از ۱۰۲۴ پیکسل (کنارِ «ورود»)؛ زیرِ آن در منوی موبایل */
.rq-tsw-hd { display: none; }
@media (min-width: 64rem) { .rq-tsw-hd { display: flex; align-items: center; } }
@media (prefers-reduced-motion: reduce) {
  .rq-tsw-btn, .rq-tsw-btn::before, .rq-tsw-knob, .rq-tsw-knob svg { transition: none; }
}

/* ═══ زنگوله‌ی اطلاع‌رسانی (D-734) ═══
   کنارِ دکمه‌ی حساب؛ با تازه، نشانِ شمارنده و یک تکانِ کوتاه هنگامِ بازشدنِ صفحه. زیرِ ۱۰۲۴px
   به منوی موبایل می‌رود (قاعده‌ی `.rq-mnav-btn ~ a`). */
.rq-bell { position: relative; display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px;
  border: 1px solid #cbd5e1; border-radius: 50%; background: #fff; color: #334155; transition: border-color .15s, background .15s; }
.rq-bell:hover { border-color: #94a3b8; background: #f8fafc; }
.rq-bell:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.rq-bell svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rq-bell.has-new svg { color: #4338ca; transform-origin: 50% 10%; animation: rq-bell-ring 1.1s ease-in-out .6s 1; }
@keyframes rq-bell-ring { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
.rq-bell-n { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  border: 2px solid #fff; border-radius: 99px; background: #e11d48; color: #fff; font: 800 .68rem/16px Vazirmatn, Tahoma, sans-serif;
  text-align: center; }
.rq-acct-n { margin-inline-start: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #e11d48; color: #fff;
  font-size: .7rem; font-weight: 800; line-height: 18px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .rq-bell.has-new svg { animation: none; } }
