/* Fedayi PDF Download 2.1.4 */
.fpd-download-card{--fpd-red:#d41422;--fpd-navy:#183345;--fpd-bg:#f5f6f7;display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:14px;align-items:center;position:relative;margin:20px 0 24px;padding:14px 16px;border:1px solid #d7dde1;border-right:4px solid var(--fpd-red);background:#fff;color:#16232b;box-shadow:0 5px 16px rgba(0,0,0,.045);font-family:inherit}
.fpd-download-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:50%;background:#eef2f4;color:var(--fpd-navy)}
.fpd-download-icon svg{width:32px;height:32px}
.fpd-download-copy{display:flex;flex-direction:column;min-width:0;gap:4px}
.fpd-download-copy strong{font-size:15px;line-height:1.4;font-weight:900;color:#16232b}
.fpd-download-copy span{font-size:12px;line-height:1.5;color:#65747e}
.fpd-download-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:112px;height:42px;padding:0 16px;border:0;background:var(--fpd-navy);color:#fff;font:inherit;font-size:13px;font-weight:800;cursor:pointer;transition:background .15s ease,transform .15s ease}
.fpd-download-button:hover{background:#102735;transform:translateY(-1px)}
.fpd-download-button:disabled{opacity:.6;cursor:wait;transform:none}
.fpd-download-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fpd-status{grid-column:1/-1;display:none;font-size:11px;color:#60717c}
.fpd-status.is-visible{display:block}
@media(max-width:620px){.fpd-download-card{grid-template-columns:46px minmax(0,1fr);gap:11px}.fpd-download-button{grid-column:1/-1;width:100%}}

#fpd-pdf-source{position:fixed!important;left:-20000px!important;top:0!important;width:794px!important;visibility:hidden!important;pointer-events:none!important;z-index:-99999!important}
#fpd-pages-stage{position:fixed!important;left:0!important;top:0!important;width:794px!important;visibility:visible!important;pointer-events:none!important;z-index:-2147483000!important;background:#fff!important}
.fpd-a4-page{box-sizing:border-box;width:794px;height:1123px;background:#fff;color:#16191b;position:relative;overflow:hidden;font-family:"Vazirmatn",Tahoma,Arial,sans-serif;direction:rtl;text-align:right;padding:58px 62px 92px}
.fpd-page-body{height:973px;overflow:hidden}
.fpd-source-article{font-family:"Vazirmatn",Tahoma,Arial,sans-serif;color:#171a1c;font-size:14px;line-height:2.05;text-align:right;direction:rtl}
.fpd-source-brand{display:flex;align-items:center;gap:12px;padding-bottom:13px;border-bottom:3px solid #d41422;margin-bottom:21px}
.fpd-source-brand img{width:48px;height:48px;object-fit:contain;flex:0 0 48px}
.fpd-source-brand div{display:flex;flex-direction:column;gap:2px}
.fpd-source-brand strong{font-size:14px;font-weight:900;color:#183345}
.fpd-source-brand span{font-size:10px;color:#7b858b;direction:ltr;text-align:right}
.fpd-source-header h1{font-family:"Vazirmatn",Tahoma,Arial,sans-serif!important;font-size:25px;line-height:1.62;margin:0 0 14px;font-weight:800;color:#11181d;letter-spacing:normal!important;word-spacing:normal!important;direction:rtl;text-align:right;unicode-bidi:plaintext}
.fpd-source-meta{display:flex;flex-wrap:wrap;gap:7px 18px;padding-bottom:17px;margin-bottom:20px;border-bottom:1px solid #e1e5e7;color:#64727a;font-size:10.8px;line-height:1.75;direction:rtl;unicode-bidi:plaintext}
.fpd-source-meta b{color:#263841;font-weight:800}.fpd-source-meta a{color:inherit;text-decoration:none}
.fpd-source-featured{margin:0 0 22px;display:flex;justify-content:center;align-items:center}.fpd-source-featured img{display:block;width:auto;max-width:100%;height:auto;max-height:285px;object-fit:contain;margin:0 auto}
.fpd-source-content{font-size:14px;line-height:2.05;color:#202326}
.fpd-source-content p{margin:0 0 14px}.fpd-source-content h2,.fpd-source-content h3,.fpd-source-content h4{color:#152d3d;line-height:1.6;margin:22px 0 10px;font-weight:900;break-after:avoid}.fpd-source-content h2{font-size:19px}.fpd-source-content h3{font-size:17px}.fpd-source-content h4{font-size:15px}
.fpd-source-content ul,.fpd-source-content ol{margin:10px 0 16px;padding-right:25px}.fpd-source-content li{margin-bottom:7px}.fpd-source-content blockquote{margin:16px 0;padding:10px 16px;border-right:3px solid #d41422;background:#f5f7f8;color:#3c474e}.fpd-source-content img{display:block;max-width:100%;height:auto;margin:16px auto}.fpd-source-content figure{margin:18px 0}.fpd-source-content figcaption{font-size:10px;line-height:1.6;color:#707d84;text-align:center;margin-top:5px}.fpd-source-content table{width:100%;border-collapse:collapse;margin:15px 0;font-size:11px}.fpd-source-content th,.fpd-source-content td{border:1px solid #cfd6da;padding:6px 8px;vertical-align:top}.fpd-source-content th{background:#edf1f3;color:#183345}.fpd-source-content a{color:#183345;text-decoration:none}.fpd-source-url{margin-top:22px;padding-top:12px;border-top:1px solid #e0e5e8;font-size:9px;line-height:1.7;color:#69777f;direction:rtl;word-break:break-all}.fpd-source-url b{color:#34444d}
.fpd-page-footer{position:absolute;right:62px;left:62px;bottom:25px;height:52px;border-top:1px solid #ccd4d8;padding-top:9px;display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:14px;color:#66747c;font-size:9.5px;direction:rtl}
.fpd-footer-brand{display:flex;align-items:center;gap:7px;color:#243943;font-weight:800}.fpd-footer-brand img{width:24px;height:24px;object-fit:contain}.fpd-footer-contact{display:flex;align-items:center;gap:11px;direction:ltr}.fpd-page-number{min-width:30px;text-align:left;color:#d41422;font-size:11px;font-weight:900}


/* Fedayi PDF 1.1.0 — clean pagination + Persian typography */
.fpd-source-content,
.fpd-page-body{
  direction:rtl!important;
  unicode-bidi:plaintext;
}
.fpd-source-content p,
.fpd-page-body p{
  direction:rtl!important;
  unicode-bidi:plaintext;
  text-align:justify!important;
  text-align-last:auto!important;
  letter-spacing:normal!important;
  word-spacing:normal!important;
  white-space:normal!important;
  hyphens:none!important;
  -webkit-hyphens:none!important;
}
.fpd-source-content h1,.fpd-page-body h1,
.fpd-source-content h2,.fpd-page-body h2,
.fpd-source-content h3,.fpd-page-body h3,
.fpd-source-content h4,.fpd-page-body h4,
.fpd-source-content h5,.fpd-page-body h5,
.fpd-source-content h6,.fpd-page-body h6{
  display:block!important;
  clear:both!important;
  width:100%!important;
  direction:rtl!important;
  unicode-bidi:plaintext;
  text-align:right!important;
  text-align-last:right!important;
  font-weight:800!important;
  letter-spacing:normal!important;
  word-spacing:normal!important;
  line-height:1.7!important;
  margin:20px 0 10px!important;
}
.fpd-source-content h2,.fpd-page-body h2{font-size:18px!important;}
.fpd-source-content h3,.fpd-page-body h3{font-size:16.5px!important;}
.fpd-source-content h4,.fpd-page-body h4{font-size:15.5px!important;}

.fpd-page-number{
  direction:ltr!important;
  unicode-bidi:isolate!important;
  white-space:nowrap!important;
}


/* v1.1.1 — keep structural blocks intact */
.fpd-source-brand{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}
.fpd-source-brand div{
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
}
.fpd-source-meta{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:7px 18px!important;
}
.fpd-source-url{
  display:block!important;
  direction:rtl!important;
  unicode-bidi:plaintext!important;
  text-align:right!important;
  word-break:break-all!important;
}
.fpd-source-url b{
  display:inline!important;
}


/* v1.2.0 stability-first page composition */
.fpd-source-content p,.fpd-page-body p{
  orphans:3!important;
  widows:3!important;
}


/* v1.2.1 hard pagination rules */
.fpd-source-content h1,.fpd-page-body h1,
.fpd-source-content h2,.fpd-page-body h2,
.fpd-source-content h3,.fpd-page-body h3,
.fpd-source-content h4,.fpd-page-body h4,
.fpd-source-content h5,.fpd-page-body h5,
.fpd-source-content h6,.fpd-page-body h6{
  break-after:avoid!important;
  page-break-after:avoid!important;
}
.fpd-terminal-group{
  display:block!important;
  direction:rtl!important;
  text-align:right!important;
  margin-top:10px!important;
}
.fpd-terminal-group > *{
  margin-top:4px!important;
  margin-bottom:4px!important;
}


/* v1.2.2 — visual polish only; pagination engine is frozen at v1.2.1 */

/* Body: slightly more compact and editorial, while preserving the same page box. */
.fpd-source-content,
.fpd-page-body{
  color:#20272b!important;
}
.fpd-source-content p,
.fpd-page-body p{
  font-size:13.15px!important;
  line-height:1.82!important;
  margin:0 0 10px!important;
}

/* Internal headings: clearer hierarchy without oversized gaps. */
.fpd-source-content h2,.fpd-page-body h2{
  font-size:17.5px!important;
  line-height:1.62!important;
  margin:18px 0 8px!important;
  font-weight:900!important;
}
.fpd-source-content h3,.fpd-page-body h3{
  font-size:15.8px!important;
  line-height:1.65!important;
  margin:16px 0 7px!important;
  font-weight:850!important;
}
.fpd-source-content h4,.fpd-page-body h4{
  font-size:14.7px!important;
  line-height:1.65!important;
  margin:14px 0 6px!important;
  font-weight:800!important;
}

/* First-page title/meta: stronger hierarchy and cleaner spacing. */
.fpd-source-header h1{
  font-size:24px!important;
  line-height:1.48!important;
  margin-bottom:10px!important;
}
.fpd-source-meta{
  font-size:10.6px!important;
  line-height:1.55!important;
  padding-bottom:13px!important;
  margin-bottom:16px!important;
}
.fpd-source-featured{
  margin-bottom:16px!important;
}
.fpd-source-featured img{
  border-radius:1px!important;
}

/* Brand: slightly tighter and more publication-like. */
.fpd-source-brand{
  padding-bottom:10px!important;
  margin-bottom:15px!important;
}
.fpd-source-brand strong{
  font-weight:900!important;
}

/* Source line: discreet and separated from article ending. */
.fpd-source-url{
  margin-top:14px!important;
  padding-top:10px!important;
  font-size:9.6px!important;
  line-height:1.55!important;
  color:#748087!important;
}

/* Footer: lighter visual weight; preserve exact geometry. */
.fpd-page-footer{
  font-size:8.8px!important;
  color:#758087!important;
}
.fpd-page-footer strong{
  color:#313b40!important;
}
.fpd-page-number{
  font-weight:800!important;
}

/* Signature/date ending: clear, compact, and distinct from body text. */
.fpd-terminal-group{
  margin-top:12px!important;
}
.fpd-terminal-group > *{
  margin-top:3px!important;
  margin-bottom:3px!important;
}


/* v1.2.3 — page geometry optimization only.
   Pagination engine and paragraph rules remain frozen. */

/* Increase usable vertical text area without moving the footer itself.
   Original body bottom reserve: 96px. New reserve: 66px. */
.fpd-page-body{
  top:52px!important;
  bottom:66px!important;
}

/* Keep footer fixed in its established position. */
.fpd-page-footer{
  bottom:25px!important;
}

/* Slightly reduce top whitespace on continuation pages.
   First-page article hierarchy remains controlled by its own blocks. */
.fpd-a4-page:not(:first-child) .fpd-page-body{
  top:44px!important;
}


/* v1.2.4 — real heading keep-with-next probe + compact linked source */
.fpd-heading-keep-probe{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
.fpd-heading-keep-probe > :last-child{margin-bottom:0!important;}
.fpd-heading-next-preview{max-height:7em!important;overflow:hidden!important;}
.fpd-source-url{
  word-break:normal!important;
  overflow-wrap:normal!important;
}
.fpd-source-url a{
  color:inherit!important;
  text-decoration:none!important;
  direction:rtl!important;
  unicode-bidi:plaintext!important;
}


/* v1.2.5 — deterministic heading lock */
.fpd-heading-lock-probe{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
.fpd-heading-lock-probe > :first-child{margin-top:0!important;}
.fpd-heading-lock-probe > :last-child{margin-bottom:0!important;}


/* v1.3.0 — section start is a real committed group, not a measurement probe */
.fpd-section-start{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  direction:rtl!important;
}
.fpd-section-start > h1,
.fpd-section-start > h2,
.fpd-section-start > h3,
.fpd-section-start > h4,
.fpd-section-start > h5,
.fpd-section-start > h6{
  margin-top:18px!important;
}
.fpd-section-start > p:last-child{
  margin-bottom:10px!important;
}


/* v1.4.0 — flowing paragraph pagination */
.fpd-flow-fragment{
  direction:rtl!important;
  unicode-bidi:plaintext!important;
  text-align:justify!important;
  text-align-last:auto!important;
}
.fpd-flow-continuation{
  margin-top:0!important;
}
.fpd-heading-flow-probe{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
.fpd-heading-flow-probe > :last-child{margin-bottom:0!important;}


/* v1.4.1 — recognize bold-only editorial subheads */
.fpd-source-content p.fpd-inline-heading,
.fpd-page-body p.fpd-inline-heading{
  display:block!important;
  width:100%!important;
  direction:rtl!important;
  text-align:right!important;
  text-align-last:right!important;
  font-size:15.8px!important;
  line-height:1.65!important;
  font-weight:900!important;
  margin:17px 0 8px!important;
  letter-spacing:normal!important;
  word-spacing:normal!important;
}
.fpd-source-content p.fpd-inline-heading strong,
.fpd-page-body p.fpd-inline-heading strong,
.fpd-source-content p.fpd-inline-heading b,
.fpd-page-body p.fpd-inline-heading b{
  font-size:inherit!important;
  line-height:inherit!important;
  font-weight:900!important;
}

/* Compact, unambiguous source label. */
.fpd-source-url a{
  font-weight:700!important;
  text-decoration:underline!important;
  text-underline-offset:2px!important;
}


/* v1.4.2 — keep signature/date/source together */
.fpd-terminal-group .fpd-terminal-source{
  margin-top:10px!important;
  padding-top:8px!important;
}


/* v1.5.2 - final PDF geometry/integrity hardening */
.fpd-page-body{
  height:920px!important;
  max-height:920px!important;
  overflow:hidden!important;
}
.fpd-source-featured{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%!important;
  margin:0 0 16px!important;
  overflow:hidden!important;
}
.fpd-source-featured img{
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  max-height:285px!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:0 auto!important;
}
/* Generated table-of-contents blocks are never part of the archival PDF. */
.fpd-pdf-toc-remove{display:none!important;}


/* v1.5.3 — deterministic A4 geometry + visual-bottom pagination safety.
   The page body now has one absolute rectangle. This removes the old
   padding/height/top-bottom conflict that allowed text to be measured as
   fitting while its final lines were actually clipped by overflow:hidden. */
.fpd-a4-page{
  padding:0!important;
  overflow:hidden!important;
}
.fpd-page-body{
  position:absolute!important;
  top:52px!important;
  right:62px!important;
  bottom:110px!important;
  left:62px!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.fpd-a4-page:not(:first-child) .fpd-page-body{
  top:44px!important;
}
.fpd-page-body > :first-child{margin-top:0!important;}
.fpd-page-body > :last-child{margin-bottom:0!important;}

/* Keep the featured image proportional and compact on page one. */
.fpd-source-featured{
  max-height:260px!important;
}
.fpd-source-featured img{
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:260px!important;
  object-fit:contain!important;
  object-position:center center!important;
}


/* v1.5.4 - natural-flow pagination audit.
   Measurement clones are intentionally unclipped and off-screen. */
.fpd-natural-measure{
  overflow:visible!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
.fpd-flow-end-marker{
  display:block!important;
  clear:both!important;
}


/* v1.5.5 — live-flow sentinel pagination hardening.
   The marker participates in the exact page flow and has zero visual footprint. */
.fpd-live-flow-marker{
  display:block!important;
  clear:both!important;
  float:none!important;
  position:relative!important;
  width:0!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  line-height:0!important;
  font-size:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}


/* v1.6.0 — lossless atomic pagination.
   The page body itself is deliberately NOT a clipping surface anymore.
   Every page owns a normal-flow stack whose actual height is measured before
   rendering.  Ordinary paragraphs stay whole, so no tail can be consumed by
   pagination and then hidden below the A4 body. */
.fpd-page-body{
  overflow:visible!important;
}
.fpd-flow-stack{
  display:flow-root!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  direction:rtl!important;
}
.fpd-flow-stack > :first-child{margin-top:0!important;}
.fpd-flow-stack > :last-child{margin-bottom:0!important;}
.fpd-flow-stack .fpd-flow-fragment{
  overflow:visible!important;
}

/* v1.7.0 compatibility — legacy single-flow raster source.
   This surface has no A4 clipping geometry; the complete article is rendered
   once and then split at blank raster rows. */
#fpd-raster-stage{
  font-family:"Vazirmatn",Tahoma,Arial,sans-serif!important;
  direction:rtl!important;
  color:#20272b!important;
}
#fpd-raster-stage .fpd-source-article,
#fpd-raster-stage .fpd-source-content{
  width:670px!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}


/* v1.8.0 — streamed raster pagination.
   Each A4 slice is rendered independently from one continuous DOM flow,
   avoiding browser limits on very tall single canvases. */
#fpd-raster-stage.fpd-streaming-stage{
  overflow:visible!important;
}
#fpd-raster-clip{
  position:relative!important;
  width:670px!important;
  overflow:hidden!important;
  background:#fff!important;
  box-sizing:border-box!important;
}
#fpd-raster-clip > .fpd-source-article{
  position:relative!important;
  left:0!important;
  width:670px!important;
}


/* v1.9.0 — conservative independent-page rendering.
   Keep every live paginated page fully laid out; the JS paginator reserves an
   additional 150px below text, so no glyph can drift into the footer during
   html2canvas font rasterization. */
#fpd-pages-stage .fpd-a4-page{overflow:hidden!important;content-visibility:visible!important;contain:none!important;}
#fpd-pages-stage .fpd-page-body{overflow:visible!important;content-visibility:visible!important;contain:none!important;}
#fpd-pages-stage .fpd-flow-stack,
#fpd-pages-stage .fpd-flow-stack *{content-visibility:visible!important;contain:none!important;}


/* v1.9.1 - footer-isolated compositor support.
   The direct PDF path rasterizes only the article flow stack and composites
   the footer afterwards on a clean A4 canvas. The live DOM footer therefore
   cannot overlap article text. Keep the fallback footer opaque and above
   content for browser-print fallback. */
#fpd-pages-stage .fpd-page-footer{
  background:#fff!important;
  z-index:20!important;
}
#fpd-pages-stage .fpd-flow-stack{
  position:relative!important;
  z-index:1!important;
}


/* v1.9.4 — visual-boundary pagination hardening.
   Pagination now measures the actual painted bottoms of flow children.
   Keep a deterministic A4 body with a clear gap above the footer. */
.fpd-page-body{
  top:52px!important;
  right:62px!important;
  bottom:110px!important;
  left:62px!important;
  overflow:visible!important;
  contain:none!important;
}
.fpd-a4-page:not(:first-child) .fpd-page-body{top:44px!important;}
.fpd-flow-stack{
  display:flow-root!important;
  overflow:visible!important;
  contain:none!important;
  transform:none!important;
}
.fpd-flow-stack > :first-child{margin-top:0!important;}
.fpd-flow-stack > :last-child{margin-bottom:0!important;}

/* v2.0.0 — independent block compositor render surface.
   Direct PDF generation never clips article text inside an A4 DOM box. */
#fpd-block-stage{
  font-family:"Vazirmatn",Tahoma,Arial,sans-serif!important;
  direction:rtl!important;
  color:#20272b!important;
  background:#fff!important;
  contain:none!important;
  content-visibility:visible!important;
}
#fpd-block-stage .fpd-block-article,
#fpd-block-stage .fpd-block-content{
  box-sizing:border-box!important;
  width:670px!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  contain:none!important;
  content-visibility:visible!important;
  transform:none!important;
}
#fpd-block-stage .fpd-block-article > :first-child,
#fpd-block-stage .fpd-block-content > :first-child{margin-top:0!important;}


/* v2.1.0 - pixel-first block compositor.
   Direct PDF download renders small semantic blocks only; no long DOM/A4
   clipping surface participates in the final file. */
#fpd-block-stage{contain:none!important;content-visibility:visible!important;}
#fpd-block-stage .fpd-source-article,#fpd-block-stage .fpd-source-content{overflow:visible!important;max-height:none!important;height:auto!important;}


/* v2.1.2 — first-page balance only.
   The pagination engine from 2.1.1 remains unchanged. The compositor may
   scale the featured raster on page one; this class is only a marker for
   consistent image interpolation and does not change later pages. */
#fpd-block-stage .fpd-source-featured img{image-rendering:auto!important;}


/* v2.1.3 — terminal-tail compaction only; body typography unchanged. */
#fpd-block-stage .fpd-source-url{margin-top:8px!important;padding-top:6px!important;}
#fpd-block-stage .fpd-source-content p:last-child{margin-bottom:6px!important;}


/* v2.1.5 - no typography changes; keep-with-next fix is compositor-only. */
