/* ═══════════════════════════════════════════════════════════
   تسهیل‌چی — سیستم طراحی
   پالت مستقیماً از لوگو استخراج شده: آبی #1870D8 تا فیروزه‌ای #00B0AC
   تم روشن و تک‌حالته، RTL، موبایل‌اول، بدون وابستگی به فریم‌ورک.
   ═══════════════════════════════════════════════════════════ */

/* ═══════════ فونت ═══════════

   ┌─ چرا خودمان میزبانی می‌کنیم ────────────────────────────────────┐
   │ فونت از fonts.googleapis.com و fonts.gstatic.com می‌آمد. از      │
   │ ایران، دست‌دادن TLS با این دو دامنه بین ۰٫۷ تا ۵٫۲ ثانیه طول      │
   │ می‌کشید و یک بار هم اصلاً وصل نشد و بعد از ۱۶ ثانیه رها شد. بدتر  │
   │ اینکه فایل CSS گوگل رندر را بلوکه می‌کند: تا نیاید، صفحه رنگ      │
   │ نمی‌گیرد.                                                        │
   │                                                                 │
   │ حالا هر سه فایل روی دامنه‌ی خودمان‌اند — همان دامنه‌ای که مرورگر   │
   │ قبلاً برای HTML به آن وصل شده. دو دست‌دادن TLS حذف شد.            │
   └─────────────────────────────────────────────────────────────────┘

   ┌─ چرا فونت متغیر و نه پنج وزن جدا ───────────────────────────────┐
   │ سایت از پنج وزن استفاده می‌کند (۴۰۰ تا ۸۰۰). پنج فایل جدا یعنی    │
   │ پنج دانلود؛ یک فونت متغیر همه را در یک فایل دارد.                │
   └─────────────────────────────────────────────────────────────────┘

   unicode-range دقیقاً همان چیزی است که گوگل می‌داد: مرورگر فقط
   زیرمجموعه‌ای را دانلود می‌کند که صفحه واقعاً به آن نیاز دارد. صفحه‌ی
   فارسی معمولاً فقط arabic و latin را می‌گیرد، نه latin-ext را.

   وزیرمتن با پروانه‌ی SIL OFL منتشر شده — متن پروانه در
   public/fonts/OFL.txt است. */

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400 800;
  /* swap یعنی متن بلافاصله با فونت جایگزین دیده می‌شود و بعد عوض
     می‌شود — روی شبکه‌ی کند، تفاوت بین «صفحه‌ی سفید» و «صفحه‌ی خوانا» */
  font-display: swap;
  src: url(/fonts/vazirmatn-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/vazirmatn-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/vazirmatn-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ── برند: آبی (از نام برند و پایه‌ی نشان) ── */
  --brand-900: #10366F;
  --brand-800: #154995;
  --brand-700: #1A5CBB;
  --brand-600: #1870D8;   /* رنگ اصلی برند */
  --brand-500: #2B86EA;
  --brand-400: #5CA4F0;
  --brand-200: #B9D8F8;
  --brand-100: #DCEBFB;
  --brand-50:  #EFF6FE;

  /* ── برند: فیروزه‌ای (نوک فلش رو به بالا — رشد و نتیجه) ── */
  --teal-800: #006C68;
  --teal-700: #00857F;
  --teal-600: #00A39C;
  --teal-500: #00B0AC;
  --teal-300: #5FD6CF;
  --teal-100: #D2F2EF;
  --teal-50:  #E9F9F7;

  /* ── خنثی: با انحراف خفیف به آبی برند تا کنار هم بنشینند ── */
  --ink:       #12263F;
  --ink-2:     #3D566E;
  --ink-3:     #6B8299;
  --ink-4:     #9BADBE;
  --line:      #DCE6EF;
  --line-soft: #EDF2F8;
  --surface:   #FFFFFF;
  --surface-2: #F6F9FC;
  --page:      #F1F6FB;

  /* ── معنایی ── */
  --ok: #0B8A5E;      --ok-bg: #E2F6EE;      --ok-line: #A5DEC8;
  --warn: #9A5B08;    --warn-bg: #FDF1DF;    --warn-line: #EDC98E;
  --danger: #B93A2E;  --danger-bg: #FCEAE7;  --danger-line: #EFB0A7;

  /* ── گرادیان امضای برند ── */
  --grad-brand: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 45%, var(--teal-500) 100%);
  --grad-soft:  linear-gradient(135deg, var(--brand-50) 0%, var(--teal-50) 100%);

  /* ── سایه ── */
  --sh-xs: 0 1px 2px rgba(18, 38, 63, .06);
  --sh-sm: 0 1px 3px rgba(18, 38, 63, .07), 0 1px 2px rgba(18, 38, 63, .04);
  --sh-md: 0 4px 12px -2px rgba(18, 38, 63, .09), 0 2px 6px -2px rgba(18, 38, 63, .05);
  --sh-lg: 0 12px 28px -8px rgba(18, 38, 63, .14), 0 4px 10px -4px rgba(18, 38, 63, .06);
  --sh-brand: 0 8px 20px -6px rgba(24, 112, 216, .40);
  --sh-teal:  0 8px 20px -6px rgba(0, 176, 172, .38);

  /* ── شعاع ── */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* ── فاصله ── */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  --font: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 62px;
}

/* ═══════════ پایه ═══════════ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink);
  background: var(--page);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

:focus-visible {
  outline: 3px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--brand-100); color: var(--brand-900); }

/* ═══════════ تایپوگرافی ═══════════ */

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.5; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 5.2vw, 2.5rem); line-height: 1.45; }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.85rem); }
h3 { font-size: clamp(1.05rem, 2.4vw, 1.25rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p  { margin: 0; }

.lede { font-size: 1.03rem; color: var(--ink-2); font-weight: 400; line-height: 2; }
.muted { color: var(--ink-3); }
.tiny { font-size: .78rem; line-height: 1.7; }
.small { font-size: .875rem; line-height: 1.8; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  color: var(--brand-700); background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 5px 13px; border-radius: var(--r-full);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-500); flex: none;
}

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ═══════════ چیدمان ═══════════ */

.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--sp-4); }
@media (min-width: 768px) { .container { padding-inline: var(--sp-6); } }

.section { padding-block: var(--sp-12); }
@media (min-width: 768px) { .section { padding-block: var(--sp-16); } }
.section--tight { padding-block: var(--sp-10); }
.section--surface { background: var(--surface); }
.section--soft { background: var(--surface-2); }

.stack { display: flex; flex-direction: column; }
.stack-2 { gap: var(--sp-2); } .stack-3 { gap: var(--sp-3); }
.stack-4 { gap: var(--sp-4); } .stack-6 { gap: var(--sp-6); }

.grid { display: grid; gap: var(--sp-4); }
@media (min-width: 640px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 560px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.section-head { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-8); }
.section-head p { color: var(--ink-2); max-width: 62ch; }
.section-head--center { align-items: center; text-align: center; }
.section-head--center p { text-align: center; }

.hidden { display: none !important; }

/* ═══════════ هدر ═══════════ */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--sp-4);
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; }
@media (min-width: 480px) { .brand img { height: 38px; } }

.site-nav { display: none; margin-inline-start: var(--sp-4); }
@media (min-width: 940px) {
  .site-nav { display: flex; align-items: center; gap: var(--sp-1); }
}
.site-nav a {
  padding: 8px 13px; border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 600; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--brand-50); color: var(--brand-700); }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-2); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; color: var(--ink-2);
}
@media (min-width: 940px) { .nav-toggle { display: none; } }
.nav-toggle:hover { background: var(--brand-50); border-color: var(--brand-200); }

/* منوی موبایل */
.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: var(--sp-3) var(--sp-4) var(--sp-5);
}
@media (min-width: 940px) { .mobile-nav { display: none !important; } }
.mobile-nav a {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 12px 14px; border-radius: var(--r-md);
  font-weight: 600; color: var(--ink); font-size: .95rem;
}
.mobile-nav a:hover { background: var(--brand-50); }
.mobile-nav a svg { color: var(--brand-600); flex: none; }

/* ═══════════ دکمه‌ها ═══════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 13px 22px; border: 1px solid transparent; border-radius: var(--r-md);
  font-size: .95rem; font-weight: 700; line-height: 1.4;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform .12s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { flex: none; }

.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-brand); }
.btn-primary:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 10px 24px -6px rgba(24,112,216,.5); }

.btn-teal { background: var(--teal-600); color: #fff; box-shadow: var(--sh-teal); }
.btn-teal:hover { color: #fff; background: var(--teal-700); }

.btn-outline { background: var(--surface); color: var(--brand-700); border-color: var(--brand-200); box-shadow: var(--sh-xs); }
.btn-outline:hover { background: var(--brand-50); border-color: var(--brand-400); color: var(--brand-800); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-block { width: 100%; }
.btn-lg { padding: 16px 26px; font-size: 1.02rem; border-radius: var(--r-lg); }
.btn-sm { padding: 9px 15px; font-size: .85rem; }

/* ═══════════ هیرو ═══════════ */

.hero { position: relative; overflow: hidden; background: var(--surface); }
.hero::before {
  content: ''; position: absolute; inset-inline-end: -18%; top: -55%;
  width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: var(--grad-soft); filter: blur(8px); opacity: .85; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset-inline-start: -22%; bottom: -48%;
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--teal-50) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding-block: var(--sp-10) var(--sp-12); }
@media (min-width: 900px) { .hero-inner { padding-block: var(--sp-16) var(--sp-20); } }

.hero-grid { display: grid; gap: var(--sp-10); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--sp-12); } }

.hero h1 { margin-block: var(--sp-4) var(--sp-4); }
.hero-cta { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-8); }
@media (min-width: 480px) { .hero-cta { flex-direction: row; flex-wrap: wrap; } }
@media (min-width: 480px) { .hero-cta .btn { flex: 1 1 200px; } }
/* هیرو یک دکمه‌ی اصلی دارد. بدون این، همان یک دکمه روی دسکتاپ کل ستون را
   می‌کشد — چون flex: 1 1 200px برای دو دکمه نوشته شده بود. */
@media (min-width: 480px) { .hero-cta--single .btn { flex: 0 1 auto; } }

.hero-note {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-5); font-size: .82rem; color: var(--ink-3);
}
.hero-note svg { color: var(--teal-600); flex: none; }

/* مسیر تأمین‌کننده: هست، ولی وزنش اندازه‌ی سهمش از مخاطب است. */
.hero-alt {
  display: flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap;
  margin-top: var(--sp-2); font-size: .82rem; color: var(--ink-3);
}

/* کارت آمار کنار هیرو */
.hero-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-lg); overflow: hidden;
}
.hero-panel-head {
  background: var(--grad-brand); color: #fff;
  padding: var(--sp-5) var(--sp-6);
}
.hero-panel-head h3 { color: #fff; font-size: 1.05rem; }
.hero-panel-head p { color: rgba(255,255,255,.86); font-size: .84rem; margin-top: 2px; }
.hero-panel-body { padding: var(--sp-5) var(--sp-6) var(--sp-6); }

/* پنجره‌ی زنده‌ی کاتالوگ داخل همان کارت */
.hp-lede { font-size: .86rem; color: var(--ink-2); margin-bottom: var(--sp-3); }
.hp-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.hp-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 7px 14px; border: 1px solid var(--brand-100); border-radius: var(--r-full);
  background: var(--brand-50); color: var(--ink); font-size: .86rem;
  text-decoration: none; transition: border-color .15s, background .15s;
}
.hp-chip:hover { background: var(--brand-100); border-color: var(--brand-200); text-decoration: none; }
/* عدد با ارقام هم‌عرض تا چیپ‌ها با تغییر کاتالوگ نلرزند */
.hp-chip b { color: var(--brand-700); font-variant-numeric: tabular-nums; }
.hp-stamp { margin-top: var(--sp-3); font-size: .76rem; color: var(--ink-4); text-align: center; }

/* ═══════════ کادر جست‌وجوی طرح ═══════════ */

.lsearch { position: relative; margin-bottom: var(--sp-5); }
.lsearch-box {
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-full); padding: 5px 5px 5px var(--sp-4);
  box-shadow: var(--sh-xs); transition: border-color .15s, box-shadow .15s;
}
.lsearch-box:focus-within { border-color: var(--brand-400); box-shadow: var(--sh-sm); }
.lsearch-icon { color: var(--ink-4); flex: none; }
.lsearch-box input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: .95rem; color: var(--ink); padding: 8px 0;
}
.lsearch-box input::placeholder { color: var(--ink-4); }
/* دکمه‌ی ✕ مرورگر در چیدمان راست‌چین روی متن می‌افتد */
.lsearch-box input::-webkit-search-cancel-button { display: none; }
.lsearch-box .btn { flex: none; border-radius: var(--r-full); }

/* فهرست پیشنهاد روی محتوا شناور است، نه اینکه صفحه را جابه‌جا کند */
.lsearch-list {
  position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 6px);
  margin: 0; padding: var(--sp-1); list-style: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  max-height: 340px; overflow-y: auto;
}
.lsearch-list a {
  display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap;
  padding: var(--sp-3); border-radius: var(--r-md);
  color: var(--ink); text-decoration: none;
}
.lsearch-list li.is-active a,
.lsearch-list a:hover { background: var(--brand-50); text-decoration: none; }
.lsearch-name { font-weight: 500; }
.lsearch-meta { font-size: .8rem; color: var(--ink-3); width: 100%; }
.lsearch-empty { padding: var(--sp-4); color: var(--ink-3); font-size: .88rem; text-align: center; }

/* ═══════════ نوار اخبار صفحه‌ی اصلی ═══════════ */

/* فهرست و نه کارت: هدف، اسکن سریع عنوان‌هاست. ستون تاریخ عرض ثابت دارد
   تا عنوان‌ها زیر هم تراز بمانند و چشم یک خط عمودی برای دنبال کردن داشته
   باشد — کارت‌های شبکه‌ای این را نمی‌دهند و سه برابر هم ارتفاع می‌گیرند. */
.newsline { list-style: none; margin: 0 0 var(--sp-6); padding: 0; border-top: 1px solid var(--line); }
.newsline li {
  display: grid; grid-template-columns: 6.5em 1fr; gap: var(--sp-1) var(--sp-4);
  align-items: baseline; padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.newsline time {
  grid-column: 1; font-size: .78rem; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.newsline a { grid-column: 2; color: var(--ink); font-weight: 500; text-decoration: none; }
.newsline a:hover { color: var(--brand-700); text-decoration: underline; }
.newsline p { grid-column: 2; margin: 0; color: var(--ink-2); font-size: .88rem; }
.newsline li.is-lead { padding-block: var(--sp-4); }
.newsline li.is-lead a { font-size: 1.06rem; font-weight: 700; }
.newsline-more { display: flex; justify-content: center; }

@media (max-width: 30rem) {
  /* ستون تاریخ روی موبایل یک سطر کامل می‌گرفت و هر خبر را ۸۰ پیکسل
     می‌کرد. اینجا همان عناصر به جریان درون‌خطی برمی‌گردند: تاریخ جلوی
     عنوان می‌نشیند و هر خبر یک سطر کوتاه‌تر می‌شود. */
  .newsline li { display: block; }
  .newsline time { margin-inline-end: var(--sp-2); }
  .newsline p { margin-top: var(--sp-1); }
}


/* ═══════════ کارت‌ها ═══════════ */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5);
  box-shadow: var(--sh-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card--pad-lg { padding: var(--sp-6); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--brand-200); }
.card--flat { box-shadow: none; }

.card-icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4); flex: none;
}
.card-icon.is-brand { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); }
.card-icon.is-teal  { background: var(--teal-50); color: var(--teal-600); border: 1px solid var(--teal-100); }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--ink-2); font-size: .92rem; }

/* کارت طرح تسهیلاتی */
.loan-card { display: flex; flex-direction: column; gap: var(--sp-4); height: 100%; }
.loan-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.loan-card h3 { font-size: 1.1rem; }
.loan-specs { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: auto; }
.loan-spec {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 9px 13px; background: var(--surface-2);
  border: 1px solid var(--line-soft); border-radius: var(--r-sm); font-size: .86rem;
}
.loan-spec dt { color: var(--ink-3); margin: 0; }
.loan-spec dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* کارت راهنما */
.guide-card { display: flex; gap: var(--sp-4); align-items: flex-start; }
.guide-step {
  width: 38px; height: 38px; flex: none; border-radius: var(--r-md);
  background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums;
}

/* ═══════════ نشان‌ها ═══════════ */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: .74rem; font-weight: 700; line-height: 1.7; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-brand  { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.badge-teal   { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }
.badge-ok     { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-warn   { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-muted  { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); }

.badge-urgent {
  background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line);
  animation: urgentPulse 1.9s ease-in-out infinite;
}
@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 58, 46, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(185, 58, 46, .13); }
}

/* ═══════════ لیست ویژگی ═══════════ */

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.checklist li { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: .93rem; color: var(--ink-2); }
.checklist svg { color: var(--teal-600); flex: none; margin-top: 5px; }

/* ═══════════ آکاردئون ═══════════ */

.accordion { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.accordion + .accordion { margin-top: var(--sp-3); }
.accordion-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); background: none; border: 0; cursor: pointer;
  text-align: right; font-weight: 700; font-size: .96rem; color: var(--ink);
}
.accordion-btn:hover { background: var(--surface-2); }
.accordion-chevron { flex: none; color: var(--ink-4); transition: transform .22s ease; }
.accordion.is-open .accordion-chevron { transform: rotate(180deg); color: var(--brand-600); }
.accordion-body { padding: 0 var(--sp-5) var(--sp-5); color: var(--ink-2); font-size: .93rem; }

/* ═══════════ فراخوان تماس ═══════════ */

.contact-cta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4); border-radius: var(--r-md); text-decoration: none;
  transition: transform .14s, box-shadow .16s;
}
.contact-cta:active { transform: scale(.99); }
.contact-cta.is-teal { background: var(--teal-50); border: 1px solid var(--teal-100); }
.contact-cta.is-brand { background: var(--brand-50); border: 1px solid var(--brand-100); }
.contact-cta-label { font-size: .78rem; font-weight: 600; margin-bottom: 1px; }
.contact-cta.is-teal .contact-cta-label { color: var(--teal-700); }
.contact-cta.is-brand .contact-cta-label { color: var(--brand-700); }
.contact-cta-phone { font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; }
.contact-cta.is-teal .contact-cta-phone { color: var(--teal-800); }
.contact-cta.is-brand .contact-cta-phone { color: var(--brand-800); }
.contact-cta-icon {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.contact-cta.is-teal .contact-cta-icon { background: var(--teal-600); }
.contact-cta.is-brand .contact-cta-icon { background: var(--brand-600); }

/* ═══════════ فرم چندمرحله‌ای ═══════════ */

.flow { min-height: 100dvh; display: flex; flex-direction: column; background: var(--page); }
.flow-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.flow-header-inner { height: var(--header-h); display: flex; align-items: center; gap: var(--sp-3); }
.flow-back {
  width: 40px; height: 40px; flex: none; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; color: var(--ink-2);
}
.flow-back:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.flow-title { font-weight: 700; font-size: .95rem; }
.flow-title span { display: block; font-size: .75rem; font-weight: 500; color: var(--ink-3); }

.progress { padding: var(--sp-4) 0 0; }
.progress-meta { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--ink-3); margin-bottom: var(--sp-2); }
.progress-track { height: 7px; background: var(--line-soft); border-radius: var(--r-full); overflow: hidden; }
.progress-bar { height: 100%; background: var(--grad-brand); border-radius: var(--r-full); transition: width .35s cubic-bezier(.4,0,.2,1); }

.flow-body { flex: 1; padding-block: var(--sp-8) var(--sp-12); }
.flow-step { max-width: 520px; margin-inline: auto; }
.flow-question { font-size: 1.22rem; font-weight: 800; line-height: 1.6; margin-bottom: var(--sp-2); }
.flow-hint { font-size: .88rem; color: var(--ink-3); margin-bottom: var(--sp-6); }

.option-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.option {
  width: 100%; display: flex; align-items: center; gap: var(--sp-3);
  padding: 15px 18px; text-align: right; cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-md);
  font-size: .97rem; font-weight: 600; color: var(--ink);
  box-shadow: var(--sh-xs); transition: border-color .16s, background .16s, transform .12s;
}
.option:hover { border-color: var(--brand-400); background: var(--brand-50); }
.option:active { transform: scale(.985); }
.option.is-selected { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-800); }
.option-mark {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  margin-inline-start: auto; color: transparent; transition: all .16s;
}
.option.is-selected .option-mark { border-color: var(--brand-600); background: var(--brand-600); color: #fff; }

/* شبکه‌ی رتبه اعتباری */
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.score-btn {
  padding: 14px 8px; cursor: pointer; text-align: center;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-md);
  font-weight: 800; font-size: 1rem; box-shadow: var(--sh-xs);
  transition: border-color .16s, background .16s, transform .12s, color .16s;
}
.score-btn:hover { border-color: var(--brand-400); }
.score-btn:active { transform: scale(.97); }
.score-btn.is-selected { border-color: var(--brand-600); background: var(--brand-600); color: #fff; }
.score-btn small { display: block; font-size: .68rem; font-weight: 500; color: var(--ink-3); margin-top: 1px; }
.score-btn.is-selected small { color: rgba(255,255,255,.85); }

.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label { font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.input {
  width: 100%; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 2px solid var(--line); color: var(--ink);
  font-size: 1rem; transition: border-color .16s, box-shadow .16s;
}
.input::placeholder { color: var(--ink-4); }
.input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-50); }
.input.is-valid { border-color: var(--ok); }
.input.is-invalid { border-color: var(--danger); }
/* ورودی با واحد کنار آن.
   نسخه‌ی قبلی واحد را absolute می‌گذاشت و برای جایش ۷۶ پیکسل پدینگ رزرو
   می‌کرد — یک عدد جادویی که با «میلیون تومان» جا نمی‌شد و متن راهنما
   روی واحد می‌افتاد. حالا هر دو در یک ردیف flex نشسته‌اند، پس هر
   واحدی با هر طولی جای خودش را می‌گیرد و همپوشانی ممکن نیست. */
.input-suffix {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 2px solid var(--line);
  transition: border-color .16s, box-shadow .16s;
}
.input-suffix:focus-within {
  border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-50);
}
.input-suffix .input {
  flex: 1 1 auto; min-width: 0;
  padding: 0; border: 0; background: none; border-radius: 0;
}
.input-suffix .input:focus { box-shadow: none; }
.input-suffix .suffix {
  flex: 0 0 auto;
  font-size: .85rem; color: var(--ink-3); font-weight: 600;
  white-space: nowrap; pointer-events: none;
}

/* فلش‌های بالا/پایینِ ورودی عددی: در چیدمان راست‌چین سمت چپ می‌نشینند و
   کنار واحد شلوغی می‌سازند، و روی موبایل هم اصلاً دیده نمی‌شوند. */
.input.num::-webkit-outer-spin-button,
.input.num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input.num[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.field-error { font-size: .8rem; color: var(--danger); font-weight: 600; }

/* جستجوی شهر */
.combo { position: relative; }
.combo-list {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30;
  /* بلندتر از قبل: فهرست حالا ۵۲۹ شهر گروه‌بندی‌شده است و باید مرور
     شود، نه اینکه فقط چهار ردیف دیده شود. */
  max-height: min(60vh, 420px); overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
}
.combo-item { width: 100%; padding: 11px 16px; text-align: right; background: none; border: 0; cursor: pointer; font-size: .93rem; color: var(--ink); }
.combo-item:hover { background: var(--brand-50); color: var(--brand-700); }
.combo-empty { padding: 14px 16px; font-size: .87rem; color: var(--ink-3); }

/* سرگروه استان — چسبان می‌ماند تا هنگام اسکرول بدانی کجایی */
.combo-group {
  position: sticky; top: 0; z-index: 1;
  padding: 7px 16px;
  background: var(--surface-2);
  border-block: 1px solid var(--line-soft);
  font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-3);
}
.combo-group:first-child { border-top: 0; }

/* پیام راهنما داخل جریان */
.notice { display: flex; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); font-size: .89rem; line-height: 1.9; }
.notice svg { flex: none; margin-top: 4px; }
.notice-info { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-900); }
.notice-info svg { color: var(--brand-600); }
.notice-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: #6B3F06; }
.notice-warn svg { color: var(--warn); }
.notice-teal { background: var(--teal-50); border: 1px solid var(--teal-100); color: var(--teal-800); }
.notice-teal svg { color: var(--teal-600); }

/* صفحه موفقیت */
.success { max-width: 480px; margin-inline: auto; text-align: center; }
.success-icon {
  width: 84px; height: 84px; margin-inline: auto; margin-bottom: var(--sp-6);
  border-radius: 50%; background: var(--teal-50); border: 2px solid var(--teal-100);
  display: flex; align-items: center; justify-content: center; color: var(--teal-600);
  animation: popIn .45s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.recap { text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.recap-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: 11px var(--sp-4); font-size: .89rem; }
.recap-row + .recap-row { border-top: 1px solid var(--line-soft); }
.recap-row dt { color: var(--ink-3); margin: 0; }
.recap-row dd { margin: 0; font-weight: 700; }

/* ═══════════ فوتر ═══════════ */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: var(--sp-12) var(--sp-8); }
.footer-grid { display: grid; gap: var(--sp-8); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-10); } }
.footer-brand img { height: 78px; width: auto; margin-bottom: var(--sp-4); }
.footer-brand p { font-size: .89rem; color: var(--ink-2); max-width: 42ch; }
.footer-col h4 { font-size: .88rem; margin-bottom: var(--sp-4); color: var(--ink); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-links a { font-size: .89rem; color: var(--ink-2); }
.footer-links a:hover { color: var(--brand-600); }
.footer-bottom {
  margin-top: var(--sp-10); padding-top: var(--sp-6); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: var(--sp-3); font-size: .8rem; color: var(--ink-3);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-disclaimer { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: var(--sp-4); font-size: .8rem; color: var(--ink-3); line-height: 1.9; margin-top: var(--sp-6); }

/* هویت شرکت در فوتر — اینماد همین نشانی و تلفن را با پرونده‌ی ثبتی می‌سنجد */
.footer-identity {
  margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: var(--sp-3); font-size: .86rem; color: var(--ink-2); line-height: 1.9;
}
.footer-company { margin: 0; }
.footer-registry { margin: 0; font-size: .8rem; color: var(--ink-3); }
.footer-registry .ltr { white-space: nowrap; }
.footer-company strong { color: var(--ink); font-weight: 700; }
.footer-address { font-style: normal; display: flex; flex-direction: column; gap: var(--sp-1); }
.footer-address a, .footer-legal a { color: var(--ink-2); }
.footer-address a:hover, .footer-legal a:hover { color: var(--brand-600); }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
/* شماره در خط تیره نشکند — نیمه‌ی شماره در خط بعد قابل گرفتن نیست */
.footer-address .ltr, .identity-list .ltr, .contact-cta-phone .ltr { white-space: nowrap; }
@media (min-width: 720px) { .footer-address { flex-direction: row; flex-wrap: wrap; column-gap: var(--sp-6); } }

/* ═══════════ صفحه‌های هویتی ═══════════ */

.identity-card { margin-top: var(--sp-8); }
.identity-card h2 { font-size: 1.05rem; margin-bottom: var(--sp-4); }
.identity-list { margin: 0; display: grid; gap: var(--sp-4); }
.identity-list > div { display: grid; gap: 2px; }
.identity-list dt { font-size: .8rem; font-weight: 600; color: var(--ink-3); }
.identity-list dd { margin: 0; color: var(--ink); line-height: 1.9; }
@media (min-width: 560px) {
  .identity-list > div { grid-template-columns: 8.5rem 1fr; gap: var(--sp-4); align-items: baseline; }
}

.identity-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.identity-channel { margin-top: var(--sp-6); font-size: .92rem; color: var(--ink-2); }
.identity-notice { margin-top: var(--sp-6); }

.contact-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 720px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-grid .card { display: flex; flex-direction: column; gap: var(--sp-4); }
.contact-grid .card h2 { font-size: 1.05rem; margin: 0; }
.contact-grid .card p { margin: 0; flex: 1; }

/* ═══════════ Toast ═══════════ */

.toast-container {
  position: fixed; bottom: 20px; inset-inline-end: 16px; z-index: 200;
  display: flex; flex-direction: column; gap: var(--sp-2); pointer-events: none;
}
.toast {
  padding: 11px 17px; border-radius: var(--r-md); color: #fff;
  font-size: .87rem; font-weight: 700; max-width: 300px;
  box-shadow: var(--sh-lg); direction: rtl;
  opacity: 0; transform: translateX(-40px);
  transition: opacity .25s, transform .25s;
}
.toast.is-in { opacity: 1; transform: translateX(0); }

/* ═══════════ Skeleton ═══════════ */

.skeleton {
  background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 50%, var(--line-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ═══════════ ورود از پایین ═══════════ */

/* محتوا به‌صورت پیش‌فرض دیده می‌شود. حالت پنهان فقط وقتی فعال می‌شود که
   جاوااسکریپت واقعاً اجرا شده و IntersectionObserver در دسترس باشد — وگرنه
   یک خطای کوچک می‌توانست کل صفحه را نامرئی کند. */
.reveal { opacity: 1; transform: none; }
.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ═══════════ کارنامه‌ی تسهیلات ═══════════ */

/* کارنامه از سوال‌ها عریض‌تر است چون جدول‌وار خوانده می‌شود */
.flow-step--wide { max-width: 720px; }

.report-hero {
  background: var(--grad-brand); color: #fff;
  border-radius: var(--r-xl); padding: var(--sp-6);
  box-shadow: var(--sh-lg); text-align: center;
}
.report-hero .label { font-size: .82rem; opacity: .88; }
.report-amount {
  font-size: clamp(1.7rem, 7vw, 2.3rem); font-weight: 800;
  line-height: 1.35; margin: var(--sp-2) 0; font-variant-numeric: tabular-nums;
}
.report-hero .unit { font-size: .95rem; font-weight: 600; opacity: .9; }
.report-tally {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.report-tally .badge { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.28); }

/* هشدار وقتی مبنای محاسبه ناقص است */
.report-ungrounded {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--r-md); padding: var(--sp-4);
  display: flex; gap: var(--sp-3); font-size: .9rem; line-height: 1.9; color: #6B3F06;
}
.report-ungrounded svg { color: var(--warn); flex: none; margin-top: 4px; }

/* کارت هر طرح در کارنامه */
.result {
  background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.result.is-eligible { border-inline-start-color: var(--ok); }
.result.is-partial  { border-inline-start-color: var(--warn); }
.result.is-unknown  { border-inline-start-color: var(--ink-3); border-inline-start-style: dashed; }

/* سه گروه نتیجه — همان سه چیزی که صفحه‌ی اصلی وعده داده است.
   گروه دوم و سوم بسته‌اند تا فهرست بلند، تطبیق‌های واقعی را دفن نکند. */
.results { display: flex; flex-direction: column; gap: var(--sp-3); }

/* بعضی مرورگرها محتوای details بسته را با display:none پنهان می‌کنند —
   و آن‌وقت همین display:flex بالا رویش را می‌گیرد و کارت‌ها باز می‌مانند.
   این دو خط، پنهان‌شدن را از رفتار مرورگر مستقل می‌کند. */
.result-group:not([open]) .results,
.result-group:not([open]) .result-group-note { display: none; }

.result-group { margin-bottom: var(--sp-4); }
.result-group:last-child { margin-bottom: 0; }

.result-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3); cursor: pointer; list-style: none;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.result-group-head::-webkit-details-marker { display: none; }
.result-group-head:hover { border-color: var(--line); }
.result-group-head:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* مثلث باز/بسته، دست‌ساز تا در هر دو جهت درست بچرخد */
.result-group-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: var(--sp-2); }
.result-group-title::before {
  content: ''; flex: none; width: 0; height: 0;
  border-block: 5px solid transparent;
  border-inline-end: 6px solid currentColor;
  transition: transform .15s ease;
}
.result-group[open] .result-group-title::before { transform: rotate(-90deg); }

.result-group.is-confirmed  .result-group-title { color: var(--ok); }
.result-group.is-mismatch   .result-group-title { color: var(--warn); }
.result-group.is-unverified .result-group-title { color: var(--ink-3); }

.result-group-count { font-size: .82rem; color: var(--ink-3); white-space: nowrap; }

.result-group-note {
  font-size: .85rem; color: var(--ink-3); line-height: 1.9;
  margin: var(--sp-3) var(--sp-1) var(--sp-3);
}

@media (prefers-reduced-motion: reduce) {
  .result-group-title::before { transition: none; }
}
/* ═══════════ پرسش از پایگاه دانش ═══════════ */

.ask-answers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.ask-answers li {
  padding: var(--sp-3); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface-2);
}
.ask-answers a { font-weight: 700; font-size: .95rem; color: var(--brand-700); text-decoration: none; }
.ask-answers a:hover { text-decoration: underline; }
.ask-answers .tiny { margin-top: 4px; line-height: 1.85; }

.result-note {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
  font-size: .82rem; line-height: 1.9; color: var(--ink-3);
}
.result.is-blocked  { border-inline-start-color: var(--ink-4); opacity: .82; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.result-name { font-weight: 700; font-size: 1rem; }
.result-name a { color: var(--ink); }
.result-name a:hover { color: var(--brand-600); }
.result-bank { font-size: .78rem; color: var(--ink-3); margin-top: 2px; }
.result-amount { font-size: 1.15rem; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.result-amount small { font-size: .74rem; font-weight: 600; color: var(--ink-3); }
.result-specs { display: flex; flex-wrap: wrap; gap: var(--sp-2); font-size: .8rem; }
.result-specs span {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: 4px 10px; color: var(--ink-2);
}
.result-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.result-reasons li { display: flex; gap: var(--sp-2); font-size: .86rem; line-height: 1.8; }
.result-reasons svg { flex: none; margin-top: 4px; }
.result-reasons .is-blocker { color: var(--danger); }
.result-reasons .is-gap { color: var(--warn); }

/* کارهای باقی‌مانده */
.todo { display: flex; flex-direction: column; gap: var(--sp-3); }
.todo-item {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-4);
}
.todo-num {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.todo-item .title { font-weight: 700; font-size: .92rem; }
.todo-item .action { font-size: .85rem; color: var(--ink-2); margin-top: 2px; line-height: 1.85; }

/* قیف تأمین امتیاز — صریحاً خدمت تسهیل‌چی، نه توصیه‌ی بی‌طرف */
.offer {
  background: var(--teal-50); border: 1px solid var(--teal-100);
  border-inline-start: 4px solid var(--teal-600);
  border-radius: var(--r-md); padding: var(--sp-5);
}
.offer h3 { font-size: 1.05rem; margin-bottom: var(--sp-2); color: var(--teal-800); }
.offer p { font-size: .92rem; color: var(--ink-2); line-height: 1.95; margin-bottom: var(--sp-4); }
.offer .disclosure { font-size: .78rem; color: var(--ink-3); margin-top: var(--sp-3); margin-bottom: 0; }

/* ═══════════ صفحات محتوایی (رندر سرور) ═══════════ */

/* مسیر راهنما */
.breadcrumb { margin-bottom: var(--sp-6); }
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  font-size: .82rem; color: var(--ink-3);
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand-600); }
.breadcrumb li[aria-current] { color: var(--ink); font-weight: 600; }
.breadcrumb .sep { color: var(--ink-4); }

/* متن مقاله */
.prose { color: var(--ink-2); font-size: 1.02rem; line-height: 2.15; max-width: 68ch; }
.prose > * + * { margin-top: var(--sp-5); }
.prose p { margin: 0; }
.prose h2 {
  font-size: 1.3rem; font-weight: 800; color: var(--ink);
  margin-top: var(--sp-10); line-height: 1.6;
}
.prose h3 {
  font-size: 1.08rem; font-weight: 700; color: var(--ink);
  margin-top: var(--sp-8); line-height: 1.65;
}
.prose ul, .prose ol { margin: 0; padding-inline-start: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.prose li { padding-inline-start: var(--sp-2); }
.prose li::marker { color: var(--teal-600); font-weight: 700; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 700; }

/* جدول مشخصات طرح */
/* ظرف جدول خودش اسکرول افقی می‌گیرد تا یک مقدار بلند (مثلاً شرح ضمانت)
   کل صفحه را به هم نریزد. */
.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-sm);
  -webkit-overflow-scrolling: touch;
}
.spec-table { border-collapse: collapse; width: 100%; min-width: 320px; font-size: .93rem; }
.spec-table th, .spec-table td {
  padding: 13px var(--sp-5); text-align: right; border-bottom: 1px solid var(--line-soft);
  vertical-align: top; line-height: 1.8;
}
.spec-table th {
  color: var(--ink-3); font-weight: 600; white-space: nowrap;
  background: var(--surface-2); width: 42%;
}
.spec-table td { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* فراداده‌ی پایین صفحه — تاریخ بررسی و منبع */
.page-meta {
  margin-top: var(--sp-8); padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6);
  align-items: center; justify-content: space-between;
  font-size: .82rem; color: var(--ink-3);
}

/* فهرست لینک ساده */
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.link-list li { border-bottom: 1px solid var(--line-soft); }
.link-list li:last-child { border-bottom: none; }
.link-list a { display: block; padding: 13px 0; font-weight: 600; font-size: .95rem; }

/* عنوان‌های داخل کارت که حالا لینک‌اند */
.card h2 a, .card h3 a { color: var(--ink); }
.card h2 a:hover, .card h3 a:hover { color: var(--brand-600); }

/* ═══════════ دسترسی‌پذیری ═══════════ */

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 300;
  background: var(--brand-700); color: #fff; padding: 10px 18px; border-radius: var(--r-md); font-weight: 700;
}
.skip-link:focus { inset-inline-start: 16px; color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* ═══════════ اخبار ═══════════ */

.news-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  font-size: .78rem; color: var(--ink-3); margin-bottom: var(--sp-2);
}
.news-meta time { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════
   نوار چسبان کارنامه و تماس بالای کارنامه
   ═══════════════════════════════════════════════════════════
   کارنامه روی موبایل حدود ۲٬۵۶۰ پیکسل ارتفاع دارد و دکمه‌ی تبدیل در
   انتهای آن بود. این دو عنصر همان دکمه را همیشه در دسترس نگه می‌دارند.
   ─────────────────────────────────────────────────────────── */

.report-actionbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  /* روی آیفون، نوار خانه روی دکمه می‌نشیند */
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(16, 24, 40, .09);
}

.report-actionbar .btn { flex: 1 1 0; min-width: 0; }
/* دکمه‌ی پیگیری هدف اصلی است، پس سهم بیشتری از عرض می‌گیرد */
.report-actionbar .btn-primary { flex-grow: 1.6; }

/* بدون این، انتهای کارنامه زیر نوار می‌ماند و دکمه‌ی «بازگشت» لمس‌ناپذیر می‌شود.
   کلاس با جاوااسکریپت گذاشته می‌شود نه :has()، چون :has() روی مرورگرهای
   قدیمی‌تر موبایل پشتیبانی نمی‌شود و نتیجه‌اش دکمه‌ی غیرقابل لمس است. */
body.has-actionbar #page-buyer { padding-bottom: 88px; }

@media (min-width: 768px) {
  .report-actionbar {
    inset-inline: auto;
    inset-inline-end: var(--sp-6);
    bottom: var(--sp-6);
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    max-width: 460px;
  }
}

/* تماس داخل سربرگ کارنامه */
.report-hero-call {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 999px;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .32);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: background .18s ease;
}
.report-hero-call:hover { background: rgba(255, 255, 255, .26); }
.report-hero-call .num { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* دعوت به کانال تلگرام — روی صفحه‌های خبر */
.channel-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #229ED9, #1B7FB0);
  box-shadow: var(--sh-lg);
}
.channel-invite-text { flex: 1 1 320px; }
.channel-invite h2 { color: #fff; font-size: 1.15rem; margin: 0 0 var(--sp-2); }
.channel-invite p { color: rgba(255, 255, 255, .92); margin: 0; max-width: 60ch; }
.channel-invite-btn {
  background: #fff; color: #1B7FB0; box-shadow: var(--sh-md);
  display: inline-flex; align-items: center; gap: var(--sp-2); flex-shrink: 0;
}
.channel-invite-btn:hover { background: #f4fbff; }

/* ═══════════════════════════════════════════════════════════
   مقایسه‌ی وام‌ها
   ═══════════════════════════════════════════════════════════ */

.compare-filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  box-shadow: var(--sh-sm);
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.compare-filters .field { margin: 0; }
.compare-filters label { display: block; font-size: .84rem; color: var(--ink-2); margin-bottom: var(--sp-2); }
.compare-filters input[type="text"],
.compare-filters select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  font: inherit; font-size: .92rem; background: #fff; color: var(--ink);
}
.compare-filters input:focus, .compare-filters select:focus {
  outline: 2px solid var(--brand-400); outline-offset: 1px; border-color: var(--brand-600);
}

.filter-checks {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-4) 0; border-top: 1px solid var(--line);
}
.filter-check { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; margin: 0; }
.filter-check input { width: 17px; height: 17px; accent-color: var(--brand-600); cursor: pointer; }
.filter-check span { font-size: .9rem; color: var(--ink); }

.filter-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* چیپ فیلترهای فعال — کلیک روی هرکدام همان فیلتر را برمی‌دارد */
.active-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100);
  border-radius: 999px; padding: 4px 12px;
  font-size: .84rem; font-weight: 600; text-decoration: none;
}
.chip:hover { background: var(--brand-100); }

.compare-count { color: var(--ink-2); font-size: .9rem; margin-bottom: var(--sp-4); }

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-4);
}
.compare-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.compare-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
.compare-card h2 { font-size: 1.03rem; margin: 0 0 4px; line-height: 1.6; }
.compare-card h2 a { color: var(--ink); text-decoration: none; }
.compare-card h2 a:hover { color: var(--brand-600); }
.compare-bank { font-size: .82rem; color: var(--ink-3); margin: 0; }

.compare-rate { text-align: center; flex-shrink: 0; line-height: 1.3; }
.compare-rate b { display: block; font-size: 1.25rem; color: var(--brand-600); font-variant-numeric: tabular-nums; }
.compare-rate span { font-size: .7rem; color: var(--ink-3); }

.compare-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.compare-note { font-size: .82rem; color: var(--ink-2); margin: 0; line-height: 1.85; }
.compare-actions { display: flex; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-2); }
.compare-disclaimer {
  margin-top: var(--sp-6); font-size: .84rem; color: var(--ink-3);
  text-align: center; line-height: 1.9;
}

/* ═══════════════════ نشان بانک ═══════════════════
   لوگو + نام، یک شکل در تمام سایت. اندازه‌ها با BANK_MARK_PX در
   lib/view.js و public/js/shared.js هماهنگ‌اند و روی خود تگ img هم
   نوشته می‌شوند، تا هنگام بارگذاری متن کنارش نپرد.

   فایل‌های منبع با برش خودکار ساخته می‌شوند (scripts/build-bank-logos.js)،
   پس نشان تقریباً کل کادر را پر می‌کند و حاشیه‌ی داخلی اینجا کم است. */

.bank-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;                 /* تا نام بلند بتواند کوتاه شود */
  max-width: 100%;
  color: var(--ink-2);
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}

.bank-mark__logo {
  flex: 0 0 auto;
  object-fit: contain;          /* نسبت تصویر حفظ می‌شود؛ نه کشیده، نه بریده */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 2px;
  box-sizing: border-box;
}

/* بانک بی‌لوگو: حرف اول در همان کادر، تا ردیف‌ها هم‌تراز بمانند */
.bank-mark__logo--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-700);
  font-weight: 800;
  padding: 0;
}

.bank-mark__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── اندازه‌ها ── */

.bank-mark--sm { font-size: .84rem; }
.bank-mark--sm .bank-mark__logo { width: 28px; height: 28px; border-radius: 7px; }
.bank-mark--sm .bank-mark__logo--letter { font-size: .85rem; }

.bank-mark--md { font-size: .95rem; }
.bank-mark--md .bank-mark__logo { width: 40px; height: 40px; padding: 3px; }
.bank-mark--md .bank-mark__logo--letter { font-size: 1.15rem; }

.bank-mark--lg { font-size: 1.08rem; gap: var(--sp-3); color: var(--ink); }
.bank-mark--lg .bank-mark__logo { width: 56px; height: 56px; padding: 4px; border-radius: var(--r-md); }
.bank-mark--lg .bank-mark__logo--letter { font-size: 1.6rem; }

/* ── جای نشان در چیدمان‌ها ── */

/* در سربرگ صفحه‌ی وام، جای eyebrow می‌نشیند */
.section-head .bank-mark { margin-bottom: var(--sp-3); }

/* در کارت وام و کارت مقایسه، نشان ردیف خودش را دارد.
   قبلاً کنار عنوان در یک ردیف بود و نام بانک‌های بلند مثل
   «بانک قرض‌الحسنه مهر ایران» با سه‌نقطه بریده می‌شد. */
.loan-card-top { flex-wrap: wrap; }
.loan-card-top > h2 { flex: 1 1 100%; }
.loan-card-top .bank-mark { flex: 1 1 100%; margin-top: var(--sp-1); }
.compare-card-head .bank-mark { margin-top: var(--sp-2); }

/* ═══════════════════ نتیجه‌ی تطبیق وام ═══════════════════
   خروجی فرم «کدام وام به من می‌رسد؟». سه تا پنج گزینه‌ی رتبه‌بندی‌شده،
   نه فهرست هجده‌تایی با برچسب. */

.chip.is-selected {
  background: var(--brand-600); color: #fff; border-color: var(--brand-600);
}

.report-loading {
  padding: var(--sp-12) var(--sp-4);
  text-align: center; color: var(--ink-3); font-size: .95rem;
}

.report-head { margin-bottom: var(--sp-5); }
.report-head h2 { font-size: 1.35rem; margin-bottom: var(--sp-2); }

/* خلاصه‌ی چیزی که کاربر گفت — تا بداند نتیجه بر چه مبنایی است */
.report-recap {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5); font-size: .88rem; color: var(--ink-2);
}
.report-recap > span { flex: 1 1 auto; min-width: 0; }

.result-rank {
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  color: var(--ok); margin-bottom: 2px;
}

/* اعداد تصمیم: سقف، قسط، مدت، نرخ — قسط مهم‌ترینشان است */
.result-figs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: var(--sp-3);
  border-top: 1px solid var(--line-soft);
  margin-top: var(--sp-3); padding-top: var(--sp-3);
}
.result-figs span { display: block; font-size: .72rem; color: var(--ink-3); margin-bottom: 2px; }
.result-figs b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.result-figs .muted { font-weight: 500; font-size: .9rem; color: var(--ink-4); }

.result-reasons li.is-good::marker { color: var(--ok); }
.result-reasons li.is-bad { color: var(--warn); }
.result-reasons li.is-bad::marker { color: var(--warn); }

/* راهنمای رفع همان شرط — زیر خودش، تا معلوم باشد به کدام مانع مربوط است.
   سطرِ دارای راهنما ستونی می‌شود: کنار هم گذاشتنشان روی عرض ۳۹۰ پیکسل
   باعث می‌شد خودِ متن شرط بشکند، و بیشتر بازدیدها از همین عرض می‌آیند. */
.result-reasons li.has-fix { flex-direction: column; align-items: flex-start; gap: 0; }

.result-fix {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  margin-top: 2px; font-size: .82rem; line-height: 1.7;
  color: var(--brand-600); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.result-fix::before { content: '←'; font-size: .9em; }
.result-fix:hover { color: var(--brand-700); }

.result-actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.result-actions .btn { flex: 1 1 auto; }

.report-foot {
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: 1px solid var(--line-soft);
}
.report-foot-actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3);
}

/* ═══════════════════ فهرست وام‌ها ═══════════════════
   کاتالوگ از شش طرح به ۱۷۴ رسید. هدف این بخش این است که کاربر با
   کمترین اسکرول بیشترین تسلط را داشته باشد: میان‌بر، فیلتر، و دو نمای
   کارتی و جدولی. */

/* ── میان‌برهای بانک و دسته ── */
.shortcuts {
  display: grid; gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.shortcut-row { display: flex; align-items: flex-start; gap: var(--sp-3); }
.shortcut-label {
  flex: 0 0 auto; padding-top: 6px;
  font-size: .78rem; font-weight: 700; color: var(--ink-3);
  min-width: 2.5rem;
}
.qchips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.qchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-2); text-decoration: none;
  transition: border-color .14s, background .14s, color .14s;
}
.qchip:hover { border-color: var(--brand-400); color: var(--brand-700); }
.qchip.is-on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.qchip span {
  font-size: .72rem; opacity: .65;
  font-variant-numeric: tabular-nums;
}
.qchips-more { display: inline-block; }
.qchips-more > summary {
  display: inline-flex; align-items: center;
  padding: 5px 11px; border-radius: var(--r-full);
  border: 1px dashed var(--line); cursor: pointer;
  font-size: .84rem; color: var(--ink-3); list-style: none;
}
.qchips-more > summary::-webkit-details-marker { display: none; }
.qchips-more[open] > summary { border-style: solid; color: var(--brand-700); }
.qchips-more .qchips { margin-top: 6px; }

/* ── نوار کنترل ── */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-block: 1px solid var(--line-soft);
  margin-bottom: var(--sp-4);
}
.toolbar-count { font-size: .9rem; color: var(--ink-2); }
.toolbar-count b { font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.toolbar-right { display: flex; align-items: center; gap: var(--sp-3); margin-inline-start: auto; }
.toolbar-sort { display: flex; align-items: center; gap: var(--sp-2); }
.toolbar-sort label { font-size: .8rem; color: var(--ink-3); }
.toolbar-sort select {
  padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
  font-size: .85rem; color: var(--ink); font-family: inherit;
}
.viewtabs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.viewtab {
  padding: 7px 14px; font-size: .85rem; color: var(--ink-2);
  text-decoration: none; background: var(--surface);
}
.viewtab + .viewtab { border-inline-start: 1px solid var(--line); }
.viewtab.is-on { background: var(--brand-600); color: #fff; font-weight: 600; }

.chip-clear { background: var(--surface-2); color: var(--ink-3); }

/* ── کارت فشرده ──
   متن معرفی وام عمداً اینجا نیست: همان بود که ارتفاع هر کارت را سه
   برابر می‌کرد. جایش صفحه‌ی خود وام است. */
.lcards {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
.lcard {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4); border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .14s, box-shadow .14s;
}
.lcard:hover { border-color: var(--brand-400); box-shadow: var(--sh-md); }
.lcard-link { text-decoration: none; }
.lcard-name {
  font-size: .98rem; font-weight: 700; line-height: 1.55;
  color: var(--ink); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.lcard:hover .lcard-name { color: var(--brand-700); }
.lcard-figs {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--line-soft); padding-top: var(--sp-3); margin-top: auto;
}
.lcard-figs span { display: block; font-size: .7rem; color: var(--ink-3); }
.lcard-figs b { font-size: .92rem; font-variant-numeric: tabular-nums; }
.lcard-figs i { font-style: normal; font-weight: 500; color: var(--ink-4); font-size: .82rem; }
.lcard-badges { display: flex; flex-wrap: wrap; gap: 5px; }

/* ── نمای جدولی ──
   جواب «چطور تعداد بیشتری را در یک نگاه نشان بدهیم». */
.loan-table { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 52rem; }
.loan-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2); text-align: right;
  padding: 10px 12px; font-size: .76rem; font-weight: 700; color: var(--ink-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.loan-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2); vertical-align: middle;
}
.loan-table tr:hover td { background: var(--brand-50); }
.loan-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.loan-table i { font-style: normal; color: var(--ink-4); }
.loan-table .ok { color: var(--ok); font-weight: 700; }
.lt-name a { color: var(--ink); font-weight: 600; text-decoration: none; }
.lt-name a:hover { color: var(--brand-700); text-decoration: underline; }
.lt-bank { white-space: nowrap; }

/* ── صفحه‌بندی ── */
.pager {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-6);
}
.pg-nums { display: flex; flex-wrap: wrap; gap: 4px; }
.pg-item {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; padding: 8px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
  font-size: .88rem; color: var(--ink-2); text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pg-item:hover { border-color: var(--brand-400); color: var(--brand-700); }
.pg-item.is-on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; font-weight: 700; }
.pg-item.is-off { opacity: .4; pointer-events: none; }
.pg-gap { padding: 8px 4px; color: var(--ink-4); }
.pg-meta { text-align: center; font-size: .82rem; color: var(--ink-3); margin-top: var(--sp-3); }

@media (max-width: 40rem) {
  .shortcut-row { flex-direction: column; gap: 6px; }
  .shortcut-label { padding-top: 0; }
  .toolbar-right { margin-inline-start: 0; width: 100%; justify-content: space-between; }
  .lcards { grid-template-columns: 1fr; }
}

/* فیلترهای تاشو — میان‌برها مسیر سریع‌اند و باز می‌مانند؛ فیلتر دقیق
   پشت یک کلیک است تا نتایج بدون اسکرول دیده شوند. */
.filters-fold { margin-bottom: var(--sp-4); }
.filters-fold > summary {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 9px 16px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .88rem; font-weight: 600; color: var(--ink-2);
  cursor: pointer; list-style: none; user-select: none;
}
.filters-fold > summary::-webkit-details-marker { display: none; }
.filters-fold > summary::after {
  content: '▾'; font-size: .8rem; color: var(--ink-3); transition: transform .15s;
}
.filters-fold[open] > summary::after { transform: rotate(180deg); }
.filters-fold > summary:hover { border-color: var(--brand-400); color: var(--brand-700); }
.filters-fold[open] > summary {
  border-color: var(--brand-400); color: var(--brand-700);
  margin-bottom: var(--sp-3);
}
.fold-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; border-radius: var(--r-full);
  background: var(--brand-600); color: #fff; font-size: .72rem; font-weight: 700;
}
.filters-fold .compare-filters { margin-bottom: 0; }

/* روی موبایل، چیپ‌ها در یک ردیف افقی می‌لغزند نه اینکه بپیچند.
   اندازه‌گیری روی ۳۷۵ پیکسل: نُه چیپ در چهار خط می‌پیچید و هر ردیف
   ۱۹۵ پیکسل ارتفاع می‌گرفت؛ دو ردیف یعنی ۴۰۱ پیکسل پیش از نتایج. */
@media (max-width: 40rem) {
  .shortcut-row > .qchips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    /* لبه‌ی ظرف را بشکن تا معلوم شود ادامه دارد */
    margin-inline: calc(var(--sp-4) * -1);
    padding-inline: var(--sp-4);
  }
  .shortcut-row > .qchips::-webkit-scrollbar { display: none; }
  .shortcut-row > .qchips > .qchip,
  .shortcut-row > .qchips > .qchips-more { flex: 0 0 auto; scroll-snap-align: start; }
  .qchips-more[open] .qchips { flex-wrap: wrap; max-width: 78vw; }

  /* سربرگ صفحه هم روی موبایل جمع‌تر می‌شود */
  .section-head h1 { margin-bottom: var(--sp-2); }
  .section-head p { font-size: .92rem; }
}
