body{
  font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  line-height:1.75;
  max-width:880px;
  margin:2rem auto;
  padding:0 1rem;
}
p, li{
  text-align:justify;
  text-justify:inter-word;
  line-height:1.9;
}
h1{font-size:2rem;margin-bottom:1rem;}
h2{font-size:1.25rem;margin-top:1.6rem;}
h3{font-size:1.1rem;margin-top:1.0rem;}

figure{margin:1rem 0;}
img{max-width:100%;height:auto;border-radius:10px;}
figcaption{font-size:.9rem;color:#666;}
figure:first-of-type img{max-height:60vh;object-fit:cover;}

/* === فهرست مطالب با شماره‌گذاری پیشرفته === */

nav#toc,
nav.toc{
  background:#f8f9fb;
  padding:.8rem 1rem;
  border-radius:10px;

  /* رنگ را از رنگ لینک‌های اصلی سایت بگیر (سبز یونیفای) */
  color: var(--bs-link-color);
}

/* لیست اصلی (سطح ۱): 1- , 2- , 3- , ... */
nav#toc > ol,
nav.toc > ol{
  list-style:none;
  padding-inline-start:0;
  margin:0;
  counter-reset: toc-parent; /* شمارندهٔ بخش‌های اصلی */
}

nav#toc > ol > li,
nav.toc > ol > li{
  display:block;
  counter-increment: toc-parent; /* هر li سطح اول یک شماره بگیرد */
}

/* شمارهٔ سطح ۱: 1- , 2- , 3- ... */
nav#toc > ol > li::before,
nav.toc > ol > li::before{
  content: counter(toc-parent) "- ";
  font-weight:600;
  margin-inline-end:.35rem;
  color: inherit; /* دقیقاً همان رنگ متن فهرست (var(--bs-link-color)) */
}

/* لیست‌های تو در تو (سطح ۲): 1-2- , 2-2- , 1-4- , ... */
nav#toc ol ol,
nav.toc ol ol{
  list-style:none;
  padding-inline-start:1rem;
  margin:0;
  counter-reset: toc-child; /* شمارندهٔ زیر‌بخش‌ها */
}

nav#toc ol ol > li,
nav.toc ol ol > li{
  display:block;
  counter-increment: toc-child;
}

/* شمارهٔ سطح ۲: 1-2- , 2-2- , 1-4- ... */
nav#toc ol ol > li::before,
nav.toc ol ol > li::before{
  /* الگوی فرزند-والد: 1-2- , 2-2- , 1-4- ... */
  content: counter(toc-child) "-" counter(toc-parent) "- ";
  font-weight:600;
  margin-inline-end:.35rem;
  color: inherit; /* باز هم همان سبز لینک */
}

/* لینک‌ها در TOC دقیقاً همان رنگ را داشته باشند */
nav#toc a,
nav.toc a{
  color: inherit;      /* = var(--bs-link-color) */
  text-decoration:none;
}

.glossary-term{
  background:#fff6d6;
  border-radius:4px;
  padding:0 .15rem;
}
.gloss-sup{
  font-size:.72em;
  line-height:1;
  margin-inline-start:.2em;
  vertical-align:super;
}
.glossary ol{
  padding-inline-start:1.2rem;
}



.disclaimer{
  background:#fff3cd;
  padding:.8rem 1rem;
  border-radius:10px;
}

.cta p{font-weight:600;}
.warnings{
  font-size:.85rem;
  color:#b45309;
}


/* === بخش سوالات متداول (FAQ) در انتهای مقاله === */

.faq-section{
  background:#f9fafb;
  border-radius:10px;
  padding:1.25rem 1.5rem;
  margin:2rem 0;
  border:1px solid rgba(15,23,42,.06);
}

.faq-section h3{
  font-size:1.15rem;
  margin-top:0;
  margin-bottom:.9rem;
}

/* لیست کلی سؤال‌ها، اگر به‌صورت div یا ul پیاده‌سازی شود */
.faq-section .faq-list{
  list-style:none;
  padding:0;
  margin:0;
}

/* هر آیتم سؤال و جواب */
.faq-section .faq-item{
  padding:.75rem 0;
  border-top:1px solid rgba(148,163,184,.35);
}

.faq-section .faq-item:first-child{
  border-top:none;
}

.faq-section .faq-question{
  font-weight:600;
  display:block;
  margin-bottom:.25rem;
}

.faq-section .faq-answer{
  margin:0;
  font-size:.95rem;
  line-height:1.9;
}

/* اگر از h4 به‌عنوان تیتر سؤال استفاده شود */
.faq-section h4{
  font-size:1rem;
  margin:0 0 .25rem;
}

.faq-section{
  text-align:right;
}

.faq-section .faq-answer{
  text-align:justify;
  text-justify:inter-word;
}


/* حالت جمع‌وجور برای موبایل */
@media (max-width: 576px){
  .faq-section{
    padding:1rem 1rem;
    margin:1.5rem 0;
  }
}


/* تیتر "فهرست مطالب" داخل ناوبری TOC */
#toc strong{
  display:block;        /* روی یک خط جدا */
  font-weight:700;      /* بولد (تأکید بیشتر) */
  font-size:1.25rem;       /* کمی بزرگ‌تر از متن عادی */
  margin-bottom:.5rem;  /* فاصله از لیست */
}


