/* ── بلاگ درس‌جی‌پی‌تی ──
   روی base.css صفحهٔ فرود سوار است (توکن‌ها، هدر شناور، .cta، .kick، .h2، .hl) و
   کارت‌ها را به زبان خود اپ می‌سازد: سفید، گوشهٔ گرد، حاشیهٔ آبی کم‌رنگ.
   قاعدهٔ صفحهٔ فرود این‌جا هم برقرار است: فقط transform/opacity انیمیت می‌شوند و هیچ
   الگوی شطرنجی یا خطی در پس‌زمینه نیست. متن مقاله هیچ‌وقت با JS پنهان نمی‌شود. */

html:has(.dg-blog),
html:has(.dg-blog) body {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
}

.dg-blog { --BW: 760px; font-family: Vazirmatn, Tahoma, sans-serif; color: var(--ink); overflow-x: clip; }
/* پوستر اورب مربعی است؛ مثل صفحهٔ فرود با ماسک دایره‌ای نرم بریده می‌شود */
.bhero__orb, .bband__orb, .bcta__orb { -webkit-mask: radial-gradient(circle, #000 50%, transparent 70%); mask: radial-gradient(circle, #000 50%, transparent 70%); }
.dg-blog a { -webkit-tap-highlight-color: transparent; }

/* ── هدر: همان قرص سفید شناور لندینگ، کمی پهن‌تر روی دسکتاپ ── */
.bhdr { width: calc(min(100vw, var(--BW)) - 24px); padding-inline-end: 4px; }
.bhdr__blog { margin-inline-start: auto; height: 34px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; font-size: 13.5px; font-weight: 900; color: var(--acc-ink); background: var(--acc-soft); }
.bhdr__cta { height: 34px; padding: 0 14px; border-radius: 12px; display: grid; place-items: center; font-size: 13.5px; font-weight: 900; color: #fff; background: var(--ink); box-shadow: 0 6px 14px -6px rgba(12,27,38,.55); white-space: nowrap; transition: transform .18s var(--ease-out); }
.bhdr__cta:active, .bhdr__blog:active { transform: scale(.94); }

/* نوار پیشرفت خواندن (فقط scaleX) */
.bprog { position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.bprog i { display: block; height: 100%; background: var(--fill); transform: scaleX(0); transform-origin: 100% 50%; }

.bwrap { position: relative; width: 100%; max-width: var(--BW); margin: 0 auto; padding: 84px var(--gut) 0; }
@media (min-width: 600px) { .dg-blog { --gut: 28px; } }

/* ── هیرو بلاگ ── */
.dg-blog main > section.bhero { overflow-x: visible; }
.bhero { position: relative; padding: 18px 0 8px; animation: bUp .7s var(--ease-out) both; }
.bhero::before { content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; top: -150px; inset-inline-end: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(34,211,238,.28), transparent 68%); pointer-events: none; }
.bhero::after { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; top: 60px; inset-inline-start: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.16), transparent 70%); pointer-events: none; }
.bhero__orb { position: absolute; top: -10px; inset-inline-end: -14px; width: 124px; height: 124px; animation: bFloat 5s ease-in-out infinite; }
.bhero__h1 { max-width: 15ch; font-size: clamp(30px, 8.2vw, 46px); }
.bhero .lead { max-width: 36ch; }
@keyframes bUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* دسته‌ها: یک ردیف قرص اسکرول‌شونده */
.bchips { display: flex; gap: 8px; margin: 18px calc(var(--gut) * -1) 0; padding: 4px var(--gut); overflow-x: auto; scrollbar-width: none; }
.bchips::-webkit-scrollbar { display: none; }
.bchip { flex-shrink: 0; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 900; color: var(--sub); background: #fff; box-shadow: 0 0 0 1px var(--line); transition: transform .18s var(--ease-out); }
.bchip:active { transform: scale(.95); }
.bchip[aria-pressed="true"] { color: #fff; background: var(--ink); box-shadow: 0 6px 14px -6px rgba(12,27,38,.55); }

/* ── کارت مطلب ── */
.bgrid { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 640px) {
  .bgrid { grid-template-columns: 1fr 1fr; }
  .bgrid .bcard--feat { grid-column: 1 / -1; }
  /* کارتی که در ردیف آخر تنها می‌ماند، افقی و تمام‌عرض می‌شود تا جای خالی نماند */
  .bgrid .bcard--feat ~ .bcard:last-child:nth-child(even) { grid-column: 1 / -1; flex-direction: row; }
  .bgrid .bcard--feat ~ .bcard:last-child:nth-child(even) .bcard__cover { width: 38%; height: auto; min-height: 190px; flex-shrink: 0; }
}
.bcard { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--sh-s); transition: transform .25s var(--ease-out), box-shadow .25s; animation: bUp .7s var(--ease-out) both; }
.bcard:nth-child(2) { animation-delay: .08s; }
.bcard:nth-child(3) { animation-delay: .16s; }
.bcard:active { transform: scale(.985); }
@media (hover: hover) { .bcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(14,116,165,.22), var(--sh); } }
.bcard[hidden] { display: none; }

.bcard__cover { position: relative; height: 128px; display: grid; place-items: center; overflow: hidden; background: var(--tone-bg); }
.bcard__cover::before, .bcard__cover::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.22); }
.bcard__cover::before { width: 180px; height: 180px; top: -90px; inset-inline-start: -50px; }
.bcard__cover::after { width: 120px; height: 120px; bottom: -70px; inset-inline-end: -30px; }
.bcard__emo { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; font-size: 38px; line-height: 1; background: rgba(255,255,255,.9); box-shadow: 0 12px 24px -10px rgba(6,23,58,.45); transform: rotate(-6deg); }
.bcard__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 16px; flex: 1; }
.bcard__cat { align-self: flex-start; height: 26px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; font-size: 11.5px; font-weight: 900; color: var(--tone-ink); background: var(--tone-soft); }
.bcard__title { font-size: 17px; line-height: 1.75; font-weight: 900; color: var(--ink); }
.bcard__desc { font-size: 13.5px; line-height: 2; font-weight: 600; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.bcard__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mut); }
.bcard__meta i { font-style: normal; }
.bcard__go { margin-inline-start: auto; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; color: var(--tone-ink); background: var(--tone-soft); }
.bcard__go svg { width: 18px; height: 18px; }

/* کارت ویژه: بلوک گرادیانی مثل کارت‌های «امروز چی لازمته؟» لندینگ */
.bcard--feat { background: var(--tone-bg); box-shadow: 0 18px 40px -18px rgba(11,107,255,.6); }
.bcard--feat .bcard__cover { height: 150px; background: none; }
.bcard--feat .bcard__emo { width: 88px; height: 88px; font-size: 46px; border-radius: 28px; }
.bcard--feat .bcard__body { padding: 0 20px 20px; }
.bcard--feat .bcard__cat { color: var(--ink); background: var(--sun); transform: rotate(-2deg); }
.bcard--feat .bcard__title { font-size: 21px; line-height: 1.6; color: #fff; }
.bcard--feat .bcard__desc { color: rgba(255,255,255,.88); }
.bcard--feat .bcard__meta { color: rgba(255,255,255,.78); }
.bcard--feat .bcard__go { color: var(--ink); background: #fff; }
.bcard--feat .bcard__go svg { animation: nudgeX 1.6s ease-in-out infinite; }

/* رنگ هر دسته — همان خانوادهٔ رنگ‌های اپ و لندینگ */
.tone-blue   { --tone-bg: var(--block); --tone-ink: #0B5ED7; --tone-soft: #E7F1FF; }
.tone-sky    { --tone-bg: linear-gradient(160deg, #29C6F7 0%, #0EA5E9 60%, #0C9BDD 100%); --tone-ink: #0369A1; --tone-soft: var(--acc-soft); }
.tone-violet { --tone-bg: linear-gradient(160deg, #6D4CFF 0%, #7C5CFF 45%, #A78BFA 100%); --tone-ink: #5B3FD9; --tone-soft: #F0ECFF; }
.tone-green  { --tone-bg: linear-gradient(160deg, #0FA37A 0%, #12B886 50%, #38D9A9 100%); --tone-ink: #0A7C56; --tone-soft: #E6F8F1; }
.tone-gold   { --tone-bg: linear-gradient(160deg, #FFB020 0%, #FFC93C 55%, #FFE28A 100%); --tone-ink: #8A5209; --tone-soft: #FFF5DB; }

.bempty { margin: 28px 0; padding: 28px 20px; border-radius: 24px; text-align: center; font-weight: 800; color: var(--sub); background: #fff; box-shadow: 0 0 0 1px var(--line); }

/* ── نوار پایانی «گیر کردی؟ بپرس. حله!» ── */
.bband { position: relative; overflow: hidden; margin: 34px 0 64px; padding: 26px 20px 20px; border-radius: 30px; color: #fff; background: var(--navy); box-shadow: 0 24px 50px -24px rgba(6,23,58,.7); }
.bband::before { content: ""; position: absolute; width: 300px; height: 300px; top: -140px; inset-inline-start: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(34,211,238,.35), transparent 70%); }
.bband::after { content: ""; position: absolute; width: 260px; height: 260px; bottom: -120px; inset-inline-end: -100px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.32), transparent 70%); }
.bband > * { position: relative; z-index: 1; }
.bband__orb { width: 110px; height: 110px; margin: -14px -14px -4px;  animation: bFloat 5s ease-in-out infinite; }
.bband__t { font-size: clamp(26px, 7.4vw, 36px); line-height: 1.4; font-weight: 900; letter-spacing: -.4px; }
.bband__t span { background: linear-gradient(95deg, #9EE7FF 0%, #22D3EE 40%, #B9A8FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bband__s { margin: 6px 0 18px; font-size: 14px; line-height: 2; font-weight: 600; color: rgba(255,255,255,.78); }

/* ── صفحهٔ مقاله ── */
.bwrap--post { --BW: 720px; }
.bcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; font-size: 12.5px; font-weight: 800; color: var(--mut); }
.bcrumb a { color: var(--acc-ink); }
.bcrumb i { font-style: normal; opacity: .5; }
.bpost__head { padding-top: 16px; animation: bUp .7s var(--ease-out) both; }
.bpost__h1 { margin-top: 14px; font-size: clamp(26px, 7.4vw, 40px); line-height: 1.5; font-weight: 900; letter-spacing: -.4px; }
.bpost__head .lead { font-size: 15.5px; }
.bmeta { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.bmeta__t { display: flex; flex-direction: column; line-height: 1.6; }
.bmeta__t b { font-size: 13.5px; font-weight: 900; }
.bmeta__s { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mut); }
.bmeta__s i { font-style: normal; }

.bcover { position: relative; height: 168px; margin-top: 20px; border-radius: 28px; overflow: hidden; display: grid; place-items: center; background: var(--tone-bg); box-shadow: 0 18px 40px -20px rgba(11,107,255,.55); animation: bUp .8s .08s var(--ease-out) both; }
.bcover::before { content: ""; position: absolute; width: 260px; height: 260px; top: -130px; inset-inline-start: -60px; border-radius: 50%; background: rgba(255,255,255,.2); }
.bcover::after { content: ""; position: absolute; width: 160px; height: 160px; bottom: -90px; inset-inline-end: -20px; border-radius: 50%; background: rgba(255,255,255,.16); }
.bcover__emo { position: relative; z-index: 1; width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; font-size: 50px; line-height: 1; background: rgba(255,255,255,.92); box-shadow: 0 16px 30px -12px rgba(6,23,58,.5); transform: rotate(-6deg); }
.bcover__chip { position: absolute; z-index: 1; width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; font-size: 18px; font-weight: 900; color: #0369A1; background: #fff; box-shadow: 0 10px 20px -10px rgba(6,23,58,.5); animation: bFloat 4.6s ease-in-out infinite; }
.bcover__chip.c1 { top: 22px; inset-inline-start: 18%; transform: rotate(8deg); }
.bcover__chip.c2 { bottom: 20px; inset-inline-start: 10%; animation-delay: -1.5s; }
.bcover__chip.c3 { top: 30px; inset-inline-end: 12%; animation-delay: -3s; }

.toc { margin-top: 20px; padding: 4px 16px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.toc summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0; font-size: 14.5px; font-weight: 900; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: "📑"; }
.toc summary::after { content: ""; margin-inline-start: auto; width: 9px; height: 9px; border-left: 2.5px solid var(--mut); border-bottom: 2.5px solid var(--mut); transform: rotate(-45deg); transition: transform .3s var(--ease-out); }
.toc[open] summary::after { transform: rotate(135deg); }
.toc ol { margin: 0; padding: 0 0 12px; list-style: none; counter-reset: t; display: grid; gap: 2px; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 10px; padding: 7px 4px; border-radius: 12px; font-size: 14px; font-weight: 700; line-height: 1.8; color: var(--sub); }
.toc a::before { content: counter(t, persian); flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--acc-ink); background: var(--acc-soft); }
.toc a:active { background: var(--acc-soft); }

/* ── متن مقاله ── */
.prose { margin-top: 8px; font-size: 16.5px; line-height: 2.15; color: #22394A; }
.prose > * + * { margin-top: 16px; }
.prose h2 { position: relative; margin-top: 38px; padding-inline-start: 16px; font-size: 22px; line-height: 1.6; font-weight: 900; color: var(--ink); scroll-margin-top: 84px; }
.prose h2::before { content: ""; position: absolute; inset-inline-start: 0; top: .35em; bottom: .35em; width: 5px; border-radius: 5px; background: var(--fill); }
.prose h3 { margin-top: 26px; font-size: 18px; line-height: 1.7; font-weight: 900; color: var(--ink); scroll-margin-top: 84px; }
.prose p { margin-bottom: 0; }
.prose strong { font-weight: 900; color: var(--ink); }
.prose a { color: var(--blue); font-weight: 800; text-decoration: underline; text-decoration-color: rgba(11,107,255,.3); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.prose code { padding: 1px 6px; border-radius: 6px; font-size: .9em; background: var(--acc-soft); direction: ltr; unicode-bidi: isolate; }
.prose ul, .prose ol { margin-bottom: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.prose ul li, .prose ol li { position: relative; padding-inline-start: 34px; }
.prose ul li::before { content: ""; position: absolute; inset-inline-start: 8px; top: .78em; width: 9px; height: 9px; border-radius: 3px; background: var(--sky); transform: rotate(45deg); }
.prose ol { counter-reset: o; }
.prose ol li { counter-increment: o; }
.prose ol li::before { content: counter(o, persian); position: absolute; inset-inline-start: 0; top: .3em; width: 25px; height: 25px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 900; line-height: 1; color: #fff; background: var(--fill); }

.callout { padding: 14px 16px; border-radius: 20px; font-size: 15px; line-height: 2.05; font-weight: 600; }
.callout p { margin: 0; }
.callout--tip { color: #3D2800; background: #FFF6D6; box-shadow: inset 0 0 0 1.5px #FFE28A; }
.callout--warn { color: #6B2A12; background: #FFF0EA; box-shadow: inset 0 0 0 1.5px #FFD2C2; }
.callout--note { color: var(--acc-ink); background: var(--acc-soft); box-shadow: inset 0 0 0 1.5px rgba(14,116,165,.18); }
.callout strong { color: inherit; }

.bfig { margin: 22px 0 0; text-align: center; }
.bfig img { width: 100%; max-width: 300px; height: auto; margin: 0 auto; border-radius: 28px; box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--line), 0 24px 44px -20px rgba(9,45,72,.45); }
.bfig figcaption { margin-top: 14px; font-size: 13px; line-height: 1.9; font-weight: 700; color: var(--mut); }

.btable { overflow-x: auto; border-radius: 20px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.btable table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.9; }
.btable th { padding: 12px 14px; text-align: right; font-weight: 900; color: #fff; background: var(--ink); white-space: nowrap; }
.btable td { padding: 11px 14px; border-top: 1px solid #EDF2F7; vertical-align: top; }
.btable td:first-child { font-weight: 900; color: var(--ink); white-space: nowrap; }
.btable tr:nth-child(even) td { background: #F8FBFE; }

/* کارت دعوت داخل متن */
.bcta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 26px !important; padding: 16px; border-radius: 24px; background: linear-gradient(160deg, #EAF6FD 0%, #F3F0FF 100%); box-shadow: 0 0 0 1px var(--line); }
.bcta__orb { width: 80px; height: 80px; margin: -11px; flex-shrink: 0; }
.bcta__t { flex: 1 1 180px; display: flex; flex-direction: column; line-height: 1.85; }
.bcta__t b { font-size: 16px; font-weight: 900; color: var(--ink); }
.bcta__t span { font-size: 13.5px; font-weight: 600; color: var(--sub); }
.prose .bcta__btn { flex: 1 0 100%; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 15px; font-weight: 900; color: #fff; text-decoration: none; background: var(--fill); box-shadow: 0 12px 24px -10px rgba(11,107,255,.7); transition: transform .18s var(--ease-out); }
.prose .bcta__btn:active { transform: scale(.97); }
@media (min-width: 600px) { .prose .bcta__btn { flex: 0 0 auto; padding: 0 22px; } }

/* سؤالات متداول — عیناً سبک بخش FAQ صفحهٔ فرود */
.bfaq { margin-top: 38px; padding: 6px 18px 4px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.prose .bfaq h2 { margin-top: 14px; }
.qa { border-bottom: 1.5px solid #EDF2F7; }
.qa:last-child { border-bottom: 0; }
.qa summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 2px; font-weight: 900; font-size: 15.5px; line-height: 1.8; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; margin-inline-start: auto; width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; color: var(--blue);
  background: linear-gradient(currentColor, currentColor) center / 12px 3px no-repeat, linear-gradient(currentColor, currentColor) center / 3px 12px no-repeat, var(--acc-soft);
  transition: background-size .3s var(--ease-out), background-color .3s, color .3s; }
.qa[open] summary::after { color: #3D2800; background-color: var(--sun); background-size: 12px 3px, 3px 0; }
.qa__a { padding: 0 2px 16px; color: var(--sub); font-size: 15px; line-height: 2.05; }

/* اشتراک‌گذاری */
.bshare { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; padding: 14px 16px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 14px; font-weight: 900; }
.bshare__btns { display: flex; gap: 8px; }
.bshare__btn { height: 38px; padding: 0 14px; border-radius: 12px; display: grid; place-items: center; font-size: 13.5px; font-weight: 900; color: var(--acc-ink); background: var(--acc-soft); transition: transform .18s var(--ease-out); }
.bshare__btn--tg { color: #fff; background: #229ED9; }
.bshare__btn:active { transform: scale(.95); }

.brel { margin-top: 40px; }
.brel__h { font-size: 22px; font-weight: 900; }
.brel .bgrid { margin-top: 14px; }

/* ── فوتر: همان فوتر سرمه‌ای صفحهٔ فرود (chapters.css) ── */
.foot { position: relative; z-index: 3; background: var(--navy); color: #fff; padding: 54px var(--gut) calc(28px + var(--safe-b)); border-radius: 30px 30px 0 0; overflow: hidden; }
.foot::before { content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(34,211,238,.35), transparent 70%); }
.foot::after { content: ""; position: absolute; width: 280px; height: 280px; left: -120px; bottom: 40px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.3), transparent 70%); }
.foot > * { position: relative; z-index: 1; }
.foot__word { font-size: clamp(40px, calc(var(--W) * .13), 58px); font-weight: 900; line-height: 1.15; letter-spacing: -1.5px; background: linear-gradient(95deg, #fff 0%, #9EE7FF 45%, #B9A8FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot__tag { font-size: 15px; font-weight: 700; opacity: .8; margin-top: 6px; }
.foot__cta { margin-top: 20px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: 13.5px; font-weight: 800; color: rgba(255,255,255,.75); }
.foot__c { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; line-height: 1.9; text-align: center; color: rgba(255,255,255,.6); }
.bfoot__in { max-width: calc(var(--BW) - 2 * var(--gut)); margin: 0 auto; }
.bfoot .foot__cta { max-width: 420px; }
