/* ==========================================================================
   وبلاگ زی‌روم — قالب اصلی
   پالت «Lagoon» زی‌روم؛ تم روشن و تیره با data-theme روی <html> (همان قرارداد ziroom.ir)
   موبایل اول: همه‌ی چیدمان‌ها از تک‌ستونی شروع می‌شوند و در عرض بیشتر باز می‌شوند.
   تایپوگرافی سبک: متن پایه ۱۵ پیکسل، تیترها با وزن ۷۰۰ و فقط تیتر اصلی صفحه ۸۰۰.
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-wght.woff2") format("woff2-variations"),
       url("../fonts/Vazirmatn-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------ توکن‌ها ------------------------------ */
:root {
  color-scheme: light;

  --primary: #0f766e;
  --primary-hover: #0d9488;
  --accent: #06b6a4;
  --highlight: #2dd4bf;
  --on-primary: #ffffff;
  --link: #0f766e;
  --soft: #d5f7ef;
  --soft-2: #ecfbf7;

  --bg: #f8fbfa;
  --bg-tint: #f1faf8;
  --surface: #ffffff;
  --surface-2: #f0f6f5;
  --surface-3: #e4eeec;
  --border: #e2ece9;
  --border-strong: #c4d4d1;

  --text: #142e2d;
  --text-2: #34504e;
  --muted: #5b7876;
  --muted-2: #87a09d;

  --mark: #99f6e4;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --warn-border: #fed7aa;
  --info: #0369a1;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --danger: #d44040;
  --success: #16a34a;

  --shadow-sm: 0 1px 2px rgba(8, 32, 31, .04);
  --shadow: 0 10px 30px -14px rgba(8, 32, 31, .16), 0 2px 6px rgba(8, 32, 31, .03);
  --shadow-lg: 0 26px 50px -24px rgba(8, 50, 48, .26), 0 4px 12px rgba(8, 32, 31, .04);
  --glass: rgba(255, 255, 255, .76);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --header-h: 66px;
  --gutter: 16px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --font: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Tahoma, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --primary: #06b6a4;
  --primary-hover: #2dd4bf;
  --accent: #2dd4bf;
  --on-primary: #042f2e;
  --link: #2dd4bf;
  --soft: rgba(45, 212, 191, .13);
  --soft-2: rgba(45, 212, 191, .07);

  --bg: #08201f;
  --bg-tint: #0a2625;
  --surface: #0c2928;
  --surface-2: #113634;
  --surface-3: #1a413e;
  --border: #1c4240;
  --border-strong: #335e5a;

  --text: #e6f0ee;
  --text-2: #c3d6d3;
  --muted: #87a8a4;
  --muted-2: #5f817d;

  --mark: rgba(45, 212, 191, .32);
  --warn: #f0b35e;
  --warn-bg: rgba(240, 179, 94, .08);
  --warn-border: rgba(240, 179, 94, .28);
  --info: #7dd3fc;
  --info-bg: rgba(125, 211, 252, .07);
  --info-border: rgba(125, 211, 252, .24);
  --danger: #f05e5e;
  --success: #4ade80;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .2);
  --shadow-lg: 0 26px 56px -22px rgba(0, 0, 0, .65), 0 4px 12px rgba(0, 0, 0, .25);
  --glass: rgba(8, 32, 31, .76);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

/* ------------------------------ پایه ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.9;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.6; margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--mark); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: middle; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 880px; }
.container--post { max-width: 820px; }

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

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200;
  background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; color: var(--on-primary); }

main { display: block; min-height: 50vh; }
main:focus { outline: none; }

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  background: var(--surface);
  color: var(--muted);
}

/* ------------------------------ دکمه‌ها ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 8px 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; line-height: 1.4; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s var(--ease), box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px -12px rgba(15, 118, 110, .7); }
.btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); box-shadow: 0 10px 24px -12px rgba(15, 118, 110, .8); }
.btn--soft { background: var(--soft); color: var(--link); }
.btn--soft:hover { background: var(--primary); color: var(--on-primary); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); color: var(--link); }
.btn--light { background: #fff; color: #0f766e; }
.btn--light:hover { background: #f0fdfa; color: #0b5f58; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .42); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.btn--lg { min-height: 48px; padding-inline: 26px; font-size: 14.5px; }
.btn--sm { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  transition: background-color .2s, border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--link); }
.icon-btn .icon { width: 18px; height: 18px; }

/* ------------------------------ چیپ و نشان ------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 500; line-height: 1.7; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.chip small { color: var(--muted-2); font-weight: 500; font-size: 11px; }
.chip .icon { width: 14px; height: 14px; color: var(--muted); }
.chip:hover { border-color: var(--primary); color: var(--link); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip.is-active small, .chip.is-active .icon { color: inherit; opacity: .85; }
.chip--glass { background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip--w1 { font-size: 12px; }
.chip--w2 { font-size: 13px; }
.chip--w3 { font-size: 14px; background: var(--soft-2); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  padding: 2px 10px; border-radius: 999px;
  background: var(--soft); color: var(--link);
  font-size: 11.5px; font-weight: 600; line-height: 1.8;
}
.badge .icon { width: 13px; height: 13px; }
.badge--link { position: relative; z-index: 2; transition: background-color .2s, color .2s; }
.badge--link:hover { background: var(--primary); color: var(--on-primary); }
.badge--lg { font-size: 12.5px; padding: 3px 13px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 13px 4px 11px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border);
  color: var(--link); font-size: 12px; font-weight: 600;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.eyebrow .icon { width: 14px; height: 14px; }
.eyebrow--soft { background: var(--soft); border-color: transparent; margin-bottom: 10px; }

/* ------------------------------ نوار بالا ------------------------------ */
.topbar {
  background: linear-gradient(90deg, #0f766e, #0ea5a0 55%, #0f766e);
  background-size: 200% 100%;
  animation: topbar-shift 14s ease-in-out infinite alternate;
  color: #fff; font-size: 12.5px;
}
@keyframes topbar-shift { from { background-position: 0 0; } to { background-position: 100% 0; } }
.topbar__inner { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.topbar__dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ccfbf1; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(204, 251, 241, .7); animation: pulse 2.2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(204, 251, 241, 0); } 100% { box-shadow: 0 0 0 0 rgba(204, 251, 241, 0); } }
.topbar__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .92; }
.topbar__link {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  color: #fff; font-weight: 600; padding: 1px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .15);
}
.topbar__link:hover { color: #fff; background: rgba(255, 255, 255, .26); }
.topbar__link .icon { width: 14px; height: 14px; transition: transform .2s; }
.topbar__link:hover .icon { transform: translateX(-3px); }
@media (max-width: 520px) { .topbar__text { display: none; } .topbar__inner { justify-content: center; } }

/* ------------------------------ سربرگ ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 10px 28px -22px rgba(8, 32, 31, .35); }
.header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand__logo { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 16px -8px rgba(15, 118, 110, .55); }
.brand__text { display: inline-flex; align-items: center; gap: 8px; }
.brand__name { font-size: 19px; font-weight: 800; line-height: 1; }
.brand__zi { color: var(--primary); }
html[data-theme="dark"] .brand__zi { color: var(--accent); }
.brand__tag {
  font-size: 10.5px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 999px;
  background: var(--soft); color: var(--link);
}

.nav { display: none; flex: 1; }
.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.nav__link .i-chevron { width: 14px; height: 14px; opacity: .7; transition: transform .2s; }
.nav__link:hover, .nav__item:focus-within > .nav__link { background: var(--surface-2); color: var(--text); }
.nav__link.is-active { color: var(--link); font-weight: 600; }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: var(--primary);
}
.nav__sub {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 230px;
  padding: 6px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s var(--ease), visibility .18s;
}
.nav__sub::before { content: ""; position: absolute; inset-inline: 0; top: -10px; height: 10px; }
.nav__item.has-sub:hover .nav__sub,
.nav__item.has-sub:focus-within .nav__sub,
.nav__item.is-open .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__item.has-sub:hover .i-chevron, .nav__item.is-open .i-chevron { transform: rotate(180deg); }
.nav__sub-link { display: block; padding: 7px 12px; border-radius: 10px; color: var(--text-2); font-size: 13.5px; }
.nav__sub-link:hover, .nav__sub-link.is-active { background: var(--soft-2); color: var(--link); }

.header__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.search-trigger:hover { border-color: var(--primary); color: var(--text); box-shadow: 0 0 0 4px var(--soft-2); }
.search-trigger .icon { width: 17px; height: 17px; }
.search-trigger__text, .search-trigger__kbd { display: none; }

.theme-btn .icon { display: none; }
html[data-theme-mode="light"] .theme-btn .i-light,
html[data-theme-mode="dark"] .theme-btn .i-dark,
html[data-theme-mode="system"] .theme-btn .i-system,
html:not([data-theme-mode]) .theme-btn .i-system { display: block; }

.header__cta { display: none; }
.header__cta .icon { width: 15px; height: 15px; }
.burger { display: inline-grid; }

@media (min-width: 640px) {
  .header__cta { display: inline-flex; min-height: 40px; padding-inline: 16px; font-size: 13.5px; }
}
@media (min-width: 1100px) {
  .nav { display: block; margin-inline-start: 22px; }
  .burger { display: none; }
  .search-trigger { min-width: 200px; }
  .search-trigger__text { display: inline; font-size: 13px; flex: 1; text-align: start; }
  .search-trigger__kbd { display: inline-block; }
}

/* ------------------------------ منوی کشویی ------------------------------ */
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer[hidden] { display: none; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(4, 20, 19, .5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 0;
  width: min(340px, 88vw); display: flex; flex-direction: column; gap: 16px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto;
  transform: translateX(100%); transition: transform .3s var(--ease);
}
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__head .brand__logo { width: 30px; height: 30px; }
.drawer__search {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 46px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); text-align: start; font-size: 14px;
}
.drawer__list { display: flex; flex-direction: column; gap: 2px; }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 600; font-size: 14.5px; cursor: pointer;
  list-style: none;
}
.drawer__link::-webkit-details-marker { display: none; }
.drawer__link:hover, .drawer__link.is-active { background: var(--soft-2); color: var(--link); }
.drawer__group[open] > .drawer__link .i-chevron { transform: rotate(180deg); }
.drawer__group ul { margin: 2px 12px 8px 0; padding-inline-start: 12px; border-inline-start: 1px solid var(--border); list-style: none; }
.drawer__group ul a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--text-2); font-size: 14px; }
.drawer__group ul a:hover { background: var(--surface-2); color: var(--link); }
.drawer__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.drawer__theme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.drawer__theme button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 4px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
}
.drawer__theme button .icon { display: block; width: 15px; height: 15px; }
.drawer__theme button.is-active { background: var(--surface); color: var(--link); box-shadow: var(--shadow-sm); }

/* ------------------------------ بخش‌ها ------------------------------ */
.section { padding-block: 52px; }
.section--tight { padding-block: 32px; }
.section--flush { padding-top: 28px; }
.section--tint { position: relative; background: var(--bg-tint); border-block: 1px solid var(--border); }
html[data-theme="dark"] .section--tint { background: linear-gradient(180deg, var(--bg-tint), var(--bg)); }
@media (min-width: 900px) {
  .section { padding-block: 80px; }
  .section--tight { padding-block: 44px; }
  .section--flush { padding-top: 36px; }
}

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head__title { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.section-head__title::before {
  content: ""; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--soft);
}
.section-head__title--sm { font-size: 16px; margin: 28px 0 16px; }
.section-head__desc { color: var(--muted); margin-top: 6px; max-width: 620px; font-size: 14px; }
.section-head__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13.5px; }
.section-head__link .icon { width: 15px; height: 15px; transition: transform .2s; }
.section-head__link:hover .icon { transform: translateX(-4px); }
@media (min-width: 900px) {
  .section-head { margin-bottom: 32px; }
  .section-head__title { font-size: 22px; }
  .section-head__title--sm { font-size: 17px; }
}

/* ------------------------------ نوار جستجو ------------------------------ */
.searchbar {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 5px; padding-inline-start: 16px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.searchbar:focus-within { border-color: var(--primary); box-shadow: var(--shadow), 0 0 0 5px var(--soft-2); }
.searchbar > .icon { width: 19px; height: 19px; color: var(--muted); }
.searchbar input {
  flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--text);
}
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar input::-webkit-search-cancel-button { cursor: pointer; }
.searchbar .btn { flex-shrink: 0; }
.searchbar--hero { max-width: 600px; }
@media (min-width: 900px) { .searchbar input { font-size: 14.5px; } }
@media (max-width: 480px) {
  .searchbar .btn { padding-inline: 14px; }
}

/* جعبه‌ی پیشنهاد زیر نوارهای جستجو */
.suggest {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 30;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-lg); overflow: hidden; text-align: start;
}
.suggest[hidden] { display: none; }

/* ------------------------------ بالای صفحه اصلی ------------------------------ */
.hero { position: relative; padding: 44px 0 44px; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.hero__blob--a { width: 520px; height: 520px; top: -240px; inset-inline-start: -140px; background: radial-gradient(circle, #5eead4, transparent 65%); }
.hero__blob--b { width: 460px; height: 460px; bottom: -280px; inset-inline-end: -100px; background: radial-gradient(circle, #99f6e4, transparent 65%); }
html[data-theme="dark"] .hero__blob { opacity: .2; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 20%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 20%, #000 10%, transparent 70%);
  opacity: .6;
}
/* مدارهای تزئینی پشت ستون برگزیده‌ها */
.hero__orbit {
  display: none; position: absolute; top: 50%; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--primary) 24%, transparent);
  transform: translateY(-50%);
}
.hero__orbit--a { width: 640px; height: 640px; inset-inline-end: -150px; animation: orbit 90s linear infinite; }
.hero__orbit--b {
  width: 440px; height: 440px; inset-inline-end: -50px;
  border-style: solid; border-color: color-mix(in srgb, var(--primary) 12%, transparent);
  animation: orbit 60s linear infinite reverse;
}
.hero__orbit i {
  position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 16px var(--accent);
}
.hero__orbit--b i { top: auto; bottom: 18%; left: -3px; width: 6px; height: 6px; margin: 0; background: #22d3ee; }
@keyframes orbit { to { transform: translateY(-50%) rotate(360deg); } }

.hero__inner { display: grid; gap: 36px; align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.hero__title {
  font-size: clamp(24px, 4vw, 37px); line-height: 1.6; font-weight: 800;
  background: linear-gradient(120deg, var(--text) 45%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .hero__title { background-image: linear-gradient(120deg, #fff 40%, #5eead4 100%); }
.hero__lead { color: var(--muted); font-size: 15px; line-height: 2; max-width: 540px; }
.hero__lead p + p { margin-top: 8px; }
.hero .searchbar { width: 100%; margin-top: 4px; }
.hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.hero__tags .chip { font-size: 12px; padding: 3px 12px; }
.hero__stats { display: flex; flex-wrap: wrap; margin: 10px 0 0; padding-top: 18px; border-top: 1px solid var(--border); width: 100%; max-width: 600px; }
.hero__stat { display: flex; flex-direction: column-reverse; padding-inline-end: 24px; margin-inline-end: 24px; border-inline-end: 1px solid var(--border); }
.hero__stat:last-child { padding: 0; margin: 0; border: 0; }
.hero__stat dd { margin: 0; font-size: 26px; font-weight: 250; line-height: 1.3; color: var(--text); }
.hero__stat dt { font-size: 12px; color: var(--muted); }
.hero__feature { display: flex; flex-direction: column; gap: 12px; }
.hero__feature-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.hero__feature-label .icon { width: 15px; height: 15px; color: #f59e0b; }
@media (min-width: 1024px) {
  .hero { padding: 76px 0 72px; }
  .hero__inner { grid-template-columns: 1.08fr .92fr; gap: 64px; }
  .hero__orbit { display: block; }
}

/* ------------------------------ کارت مطلب ------------------------------ */
.grid { display: grid; gap: 20px; }
.grid--cards { grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid--cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--cards { grid-template-columns: repeat(3, 1fr); gap: 28px; } .grid--2 { grid-template-columns: repeat(2, 1fr); } }
.grid__cell { display: flex; }
/* ریل افقی در موبایل (آموزش‌ها)؛ از ۶۲۰ پیکسل به بعد همان شبکه */
@media (max-width: 619px) {
  .grid--rail {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .grid--rail::-webkit-scrollbar { display: none; }
  .grid--rail > * { scroll-snap-align: start; }
}
.grid__cell > .card { flex: 1; }
.grid__cell[hidden] { display: none; }

.card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: 9px; padding: 18px 20px 18px; flex: 1; }
.card__title { font-size: 15px; line-height: 1.8; font-weight: 700; }
.card__link { color: var(--text); transition: color .2s; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__link:hover { color: var(--link); }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card__excerpt {
  color: var(--muted); font-size: 13px; line-height: 2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 4px; color: var(--muted-2); font-size: 12px; }
.card__stat { display: inline-flex; align-items: center; gap: 4px; }
.card__stat .icon { width: 14px; height: 14px; }
.card__go {
  display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; margin-inline-start: auto;
  border-radius: 50%; border: 1px solid var(--border); color: var(--muted);
  transition: background-color .3s, border-color .3s, color .3s, transform .35s var(--ease);
}
.card__go .icon { width: 14px; height: 14px; }
.card:hover .card__go { background: var(--primary); border-color: var(--primary); color: var(--on-primary); transform: translateX(-3px); }

.card--feature .card__title { font-size: 17px; line-height: 1.75; }
.card--feature .card__body { padding: 20px 22px; }
@media (min-width: 1024px) { .card--feature .card__title { font-size: 18.5px; } }

.card--row { flex-direction: row; align-items: stretch; border-radius: 14px; }
.card--row .card__media { width: 124px; flex-shrink: 0; aspect-ratio: auto; }
.card--row .card__media img { object-position: 22% 50%; }
.card--row .card__body { padding: 12px 16px; gap: 5px; justify-content: center; }
.card--row .card__title { font-size: 13.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card--row .badge { font-size: 10.5px; padding: 0 8px; }
.card--row .card__meta { font-size: 11.5px; margin-top: 0; padding-top: 0; }
.card--row .cover__icon { width: 42px; height: 42px; border-radius: 14px; }
.card--row .cover__icon .icon { width: 20px; height: 20px; }

.card--mini { flex-direction: row; align-items: center; gap: 14px; border: 0; box-shadow: none; background: transparent; padding: 12px 6px; border-radius: 12px; overflow: visible; }
.card--mini:hover { transform: none; box-shadow: none; background: var(--surface-2); }
.card--mini .card__body { padding: 0; gap: 2px; }
.card--mini .card__title { font-size: 13.5px; font-weight: 600; }
.card--mini .card__meta { font-size: 11.5px; padding-top: 0; }
/* شماره‌ی فهرست: رقم باریک و بزرگ */
.card__num {
  display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px;
  color: var(--primary); font-weight: 200; font-size: 28px; line-height: 1;
  transition: color .2s;
}
.card--mini:hover .card__num { color: var(--accent); }

/* جلد ساختگی مطلب بی‌عکس */
.cover { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.cover--1 { background: linear-gradient(135deg, #0f766e, #14b8a6 60%, #5eead4); }
.cover--2 { background: linear-gradient(135deg, #115e59, #0d9488 55%, #22d3ee); }
.cover--3 { background: linear-gradient(135deg, #0e7490, #06b6a4 60%, #a7f3d0); }
.cover--4 { background: linear-gradient(135deg, #134e4a, #0f766e 55%, #2dd4bf); }
.cover--5 { background: linear-gradient(135deg, #065f46, #10b981 60%, #6ee7b7); }
.cover--6 { background: linear-gradient(135deg, #1e3a3a, #0f766e 55%, #38bdf8); }
.cover__grid {
  position: absolute; inset: 0; opacity: .22;
  background-image: radial-gradient(rgba(255, 255, 255, .7) 1.2px, transparent 1.3px);
  background-size: 18px 18px;
  mask-image: linear-gradient(135deg, transparent 10%, #000 70%); -webkit-mask-image: linear-gradient(135deg, transparent 10%, #000 70%);
}
.cover__glow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; inset-inline-end: -20%; top: -35%; background: rgba(255, 255, 255, .18); filter: blur(10px); }
.cover__icon {
  position: relative; display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 22px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
  color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .35);
  transition: transform .5s var(--ease);
}
.cover__icon .icon { width: 32px; height: 32px; }
.card:hover .cover__icon { transform: scale(1.08) rotate(-4deg); }

/* ------------------------------ موضوع‌ها ------------------------------ */
.topics {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  scrollbar-width: none;
}
.topics::-webkit-scrollbar { display: none; }
.topics > li { scroll-snap-align: start; }
@media (min-width: 900px) {
  .topics { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; overflow: visible; margin-inline: 0; padding-inline: 0; }
}
.topic {
  position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; overflow: hidden; isolation: isolate;
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); color: var(--text); }
.topic__glyph {
  position: absolute; z-index: -1; inset-inline-end: -16px; bottom: -20px; color: var(--primary); opacity: .06;
  transition: transform .5s var(--ease), opacity .3s;
}
.topic__glyph .icon { width: 96px; height: 96px; stroke-width: 1.1; }
.topic:hover .topic__glyph { opacity: .12; transform: rotate(-8deg) scale(1.06); }
.topic__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; }
.topic__icon .icon { width: 20px; height: 20px; }
.topic--1 .topic__icon { background: linear-gradient(135deg, #0f766e, #2dd4bf); }
.topic--2 .topic__icon { background: linear-gradient(135deg, #115e59, #22d3ee); }
.topic--3 .topic__icon { background: linear-gradient(135deg, #0e7490, #34d399); }
.topic--4 .topic__icon { background: linear-gradient(135deg, #134e4a, #2dd4bf); }
.topic--5 .topic__icon { background: linear-gradient(135deg, #065f46, #6ee7b7); }
.topic--6 .topic__icon { background: linear-gradient(135deg, #1e3a3a, #38bdf8); }
.topic__name { font-weight: 600; font-size: 14px; line-height: 1.7; }
.topic__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.topic__count { color: var(--muted-2); font-size: 12px; }
.topic__go { display: inline-grid; color: var(--link); opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s var(--ease); }
.topic__go .icon { width: 16px; height: 16px; }
.topic:hover .topic__go, .topic:focus-visible .topic__go { opacity: 1; transform: none; }

/* ------------------------------ زبانه‌ها ------------------------------ */
.tabs {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 24px; padding: 2px var(--gutter) 8px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs[hidden] { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-weight: 500; font-size: 13px;
  transition: all .2s;
}
.tab .icon { width: 15px; height: 15px; opacity: .8; }
.tab:hover { border-color: var(--primary); color: var(--link); }
.tab.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
@media (min-width: 900px) { .tabs { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; } }

.feed-more { display: flex; justify-content: center; margin-top: 32px; }
.feed-more .btn.is-loading { opacity: .7; pointer-events: none; }
.feed-more .btn.is-loading .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ پنل ------------------------------ */
.split { display: grid; gap: 20px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 28px; } }
.panel { padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.panel--flat { background: var(--bg-tint); }
.panel__title { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.panel__title .icon { color: var(--primary); width: 18px; height: 18px; }
.panel__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 500; font-size: 13px; }
.panel__more .icon { width: 15px; height: 15px; }
.panel p { color: var(--text-2); margin-bottom: 14px; font-size: 14px; }
@media (min-width: 900px) { .panel { padding: 28px 30px; } }
.ranked { display: flex; flex-direction: column; }
.ranked > li + li { border-top: 1px dashed var(--border); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.related-tags { margin-top: 40px; }

/* ------------------------------ دعوت ------------------------------ */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 20px; align-items: center;
  padding: 30px 24px; border-radius: var(--radius-xl);
  background:
    radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.3px) 0 0 / 20px 20px,
    linear-gradient(125deg, #0b5f58 0%, #0f766e 38%, #06b6a4 100%);
  color: #fff; box-shadow: 0 30px 60px -34px rgba(15, 118, 110, .75);
}
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.cta-band::before { width: 420px; height: 420px; inset-inline-end: -140px; top: -200px; background: #0b5f58; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 0 0 60px rgba(255, 255, 255, .04), 0 0 0 61px rgba(255, 255, 255, .1); opacity: .9; }
.cta-band::after { width: 240px; height: 240px; inset-inline-start: 18%; bottom: -170px; background: rgba(204, 251, 241, .12); }
.cta-band__art img { width: 68px; height: 68px; border-radius: 20px; box-shadow: 0 18px 38px -12px rgba(0, 0, 0, .45); transform: rotate(-6deg); }
.cta-band__title { font-size: 19px; line-height: 1.65; }
.cta-band__desc { opacity: .88; margin-top: 6px; font-size: 14px; }
.cta-band__desc a { color: #fff; text-decoration: underline; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) {
  .cta-band { grid-template-columns: auto 1fr auto; padding: 44px 48px; gap: 36px; }
  .cta-band__art img { width: 96px; height: 96px; }
  .cta-band__title { font-size: 22px; }
}

/* ------------------------------ خبرنامه ------------------------------ */
.newsletter {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 18px; align-items: center;
  padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: radial-gradient(120% 140% at 100% 0%, var(--soft-2), transparent 60%), var(--surface);
}
/* حلقه‌های هم‌مرکز تزئینی در گوشه */
.newsletter::after {
  content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; inset-inline-end: -120px; bottom: -190px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 26px, color-mix(in srgb, var(--primary) 14%, transparent) 26px 27px);
  mask-image: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%);
}
.newsletter__text { display: flex; gap: 14px; align-items: flex-start; }
.newsletter__icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; background: var(--soft); color: var(--link); }
.newsletter__icon .icon { width: 22px; height: 22px; }
.newsletter__title { font-size: 16.5px; }
.newsletter__desc { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.newsletter__form { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter__form .field { flex: 1 1 220px; }
.newsletter__note { flex-basis: 100%; font-size: 13px; min-height: 1em; }
.newsletter__note.is-success { color: var(--success); }
.newsletter__note.is-error { color: var(--danger); }
@media (min-width: 900px) { .newsletter { grid-template-columns: 1.1fr 1fr; padding: 32px 38px; } }

/* ------------------------------ فرم‌ها ------------------------------ */
.field {
  width: 100%; min-height: 46px; padding: 9px 14px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 16px; line-height: 1.7;
  transition: border-color .2s, box-shadow .2s;
}
@media (min-width: 900px) { .field { font-size: 14.5px; } }
textarea.field { resize: vertical; min-height: 120px; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 50%, 13px 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 14px; padding-inline-start: 36px; }
.field::placeholder { color: var(--muted-2); }
.field:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px var(--soft-2); }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field > span:first-child { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-field em { color: var(--danger); font-style: normal; }
.form-field__error, .field-validation-error { color: var(--danger); font-size: 12.5px; }
.input-validation-error { border-color: var(--danger); }
.form-row { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 13.5px; cursor: pointer; }
.form-check input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-errors ul { margin: 0 0 14px; padding: 12px 32px 12px 12px; border-radius: 12px; background: rgba(212, 64, 64, .08); color: var(--danger); font-size: 13.5px; }
.form-errors.validation-summary-valid { display: none; }
.card-form { padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }

/* ------------------------------ اعلان‌ها (هسته) ------------------------------ */
.alert-messages { padding-top: 16px; }
.alert-messages .row, .alert-messages .col-12 { display: contents; }
.alert {
  position: relative; margin-bottom: 10px; padding: 12px 18px; padding-inline-end: 44px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-size: 14px;
}
.alert-success { border-color: rgba(22, 163, 74, .35); background: rgba(22, 163, 74, .08); }
.alert-danger { border-color: rgba(212, 64, 64, .35); background: rgba(212, 64, 64, .08); }
.alert-warning { border-color: var(--warn-border); background: var(--warn-bg); }
.alert-info { border-color: var(--info-border); background: var(--info-bg); }
.alert-heading { font-size: 15px; margin-bottom: 4px; }
.btn-close { position: absolute; top: 11px; inset-inline-end: 12px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; opacity: .6; }
.btn-close::before { content: "×"; font-size: 20px; line-height: 1; }
.btn-close:hover { opacity: 1; background: var(--surface-2); }

/* ------------------------------ سرصفحه‌ی فهرست‌ها ------------------------------ */
.page-head { position: relative; padding: 30px 0 34px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); background: var(--bg-tint); }
.page-head__bg {
  position: absolute; inset: 0; z-index: -1; opacity: .6;
  background:
    radial-gradient(600px 240px at 85% -10%, color-mix(in srgb, var(--highlight) 30%, transparent), transparent 70%),
    radial-gradient(500px 200px at 10% 120%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
}
/* شبکه‌ی خطوط محو در گوشه‌ی سرصفحه */
.page-head__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border-strong) 1px, transparent 1px), linear-gradient(90deg, var(--border-strong) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 55% 110% at 12% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 55% 110% at 12% 0%, #000, transparent 70%);
  opacity: .5;
}
.page-head__row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.page-head__icon {
  display: grid; place-items: center; flex-shrink: 0; width: 50px; height: 50px; border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #2dd4bf); color: #fff; box-shadow: 0 14px 28px -14px rgba(15, 118, 110, .7);
}
.page-head__icon .icon { width: 24px; height: 24px; }
.page-head__icon--2 { background: linear-gradient(135deg, #115e59, #22d3ee); }
.page-head__icon--3 { background: linear-gradient(135deg, #0e7490, #34d399); }
.page-head__icon--4 { background: linear-gradient(135deg, #134e4a, #2dd4bf); }
.page-head__icon--5 { background: linear-gradient(135deg, #065f46, #6ee7b7); }
.page-head__icon--6 { background: linear-gradient(135deg, #1e3a3a, #38bdf8); }
.page-head__kicker { display: block; color: var(--link); font-size: 12px; font-weight: 600; }
.page-head__title { font-size: clamp(22px, 3.6vw, 31px); font-weight: 800; line-height: 1.55; }
.page-head--search .page-head__title { margin-bottom: 16px; }
.page-head__desc { color: var(--muted); max-width: 680px; margin-top: 12px; font-size: 14.5px; }
.page-head__meta { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 12.5px; margin-top: 12px; font-weight: 500; }
.page-head__meta::before { content: ""; width: 18px; height: 1px; background: var(--border-strong); }
.page-head__switch { display: flex; gap: 8px; margin-top: 18px; }
@media (min-width: 900px) { .page-head { padding: 40px 0 44px; } }

.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: ""; width: 5px; height: 5px; margin-inline: 10px; border-inline-start: 1px solid var(--muted-2); border-bottom: 1px solid var(--muted-2); transform: rotate(45deg); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--link); }
.breadcrumb [aria-current] { color: var(--text-2); font-weight: 500; max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding-bottom: 4px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.sort { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; }
.sort > .icon { width: 15px; height: 15px; margin-inline: 8px 4px; color: var(--muted); }
.sort__item { padding: 4px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.sort__item:hover { color: var(--link); }
.sort__item.is-active { background: var(--soft); color: var(--link); font-weight: 600; }
.select { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.select select { border: 0; background: transparent; outline: 0; font-weight: 500; font-size: 13px; color: var(--text); cursor: pointer; }
.select .icon { width: 15px; height: 15px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); font-size: 14px; }
.empty__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--soft); color: var(--link); }
.empty__icon .icon { width: 26px; height: 26px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination__pages { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination__page, .pagination__step, .pagination__gap {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: 13.5px;
}
.pagination__gap { border: 0; background: none; min-width: 20px; }
.pagination a:hover { border-color: var(--primary); color: var(--link); }
.pagination .is-current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination .is-disabled { opacity: .45; }
.pagination__step .icon { width: 15px; height: 15px; }
@media (max-width: 480px) { .pagination__step span { display: none; } }

/* ------------------------------ فهرست دسته‌ها و برچسب‌ها ------------------------------ */
.category-index { display: grid; gap: 18px; }
@media (min-width: 720px) { .category-index { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .category-index { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.category-card { padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 12px; transition: box-shadow .25s, border-color .25s; }
.category-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.category-card__head { display: flex; align-items: center; gap: 14px; color: var(--text); }
.category-card__head:hover { color: var(--link); }
.category-card__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #0f766e, #2dd4bf); flex-shrink: 0; }
.category-card--2 .category-card__icon { background: linear-gradient(135deg, #115e59, #22d3ee); }
.category-card--3 .category-card__icon { background: linear-gradient(135deg, #0e7490, #34d399); }
.category-card--4 .category-card__icon { background: linear-gradient(135deg, #134e4a, #2dd4bf); }
.category-card--5 .category-card__icon { background: linear-gradient(135deg, #065f46, #6ee7b7); }
.category-card--6 .category-card__icon { background: linear-gradient(135deg, #1e3a3a, #38bdf8); }
.category-card__icon .icon { width: 22px; height: 22px; }
.category-card__title { font-size: 15.5px; }
.category-card__count { color: var(--muted-2); font-size: 12px; }
.category-card__desc { color: var(--muted); font-size: 13.5px; }
.category-card__children { display: flex; flex-wrap: wrap; gap: 6px; }
.category-card__children a { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.category-card__children a .icon { width: 14px; height: 14px; color: var(--primary); }
.category-card__children a small { color: var(--muted-2); }
.category-card__children a:hover { background: var(--soft); color: var(--link); }
.tag-index { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------ جستجو ------------------------------ */
.search-summary { margin-top: 14px; color: var(--muted); font-size: 14px; }
.search-summary strong { color: var(--text); font-weight: 600; }
.notice { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--info-bg); border: 1px solid var(--info-border); color: var(--text-2); font-size: 13.5px; }
.notice .icon { color: var(--info); margin-top: 3px; }
.toolbar--search .chips-scroll { flex: 1; }
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.result {
  position: relative; padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.result:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); box-shadow: var(--shadow); }
.result__meta { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px; margin-bottom: 8px; }
.result__title { font-size: 16px; line-height: 1.75; }
.result__snippet { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 2; }
.result__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--muted-2); }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.search-empty { display: flex; flex-direction: column; gap: 20px; }

/* ------------------------------ جستجوی سریع (پنجره) ------------------------------ */
.spotlight {
  width: min(660px, calc(100% - 24px)); max-height: min(620px, 82vh);
  margin: 9vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden;
}
.spotlight::backdrop { background: rgba(4, 20, 19, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.spotlight[open] { animation: pop .22s var(--ease); display: flex; }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.spotlight__box { display: flex; flex-direction: column; width: 100%; max-height: inherit; }
.spotlight__field { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 10px; padding-inline-start: 18px; border-bottom: 1px solid var(--border); }
.spotlight__field > .icon { width: 20px; height: 20px; color: var(--primary); }
.spotlight__field input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; font-size: 16.5px; }
.spotlight__field input::-webkit-search-cancel-button { display: none; }
.spotlight__field .icon-btn { border: 0; background: var(--surface-2); width: 34px; height: 34px; }
.spotlight__body { overflow-y: auto; padding: 8px; flex: 1; min-height: 120px; overscroll-behavior: contain; }
.spotlight__section { padding: 8px; }
.spotlight__label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; margin: 6px 4px 10px; }
.spotlight__label .icon { width: 14px; height: 14px; }
.spotlight__chips, .spotlight__recent { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.spotlight__recent button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
.spotlight__recent button:hover { border-color: var(--primary); color: var(--link); }
.spotlight__foot { display: none; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 11.5px; background: var(--bg-tint); }
.spotlight__foot kbd { margin-inline-end: 3px; }
@media (min-width: 720px) { .spotlight__foot { display: flex; } }
@media (max-width: 640px) {
  .spotlight { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; border: 0; }
}
.hit {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--text);
}
.hit:hover, .hit.is-active { background: var(--soft-2); color: var(--text); }
.hit.is-active { box-shadow: inset 0 0 0 1px var(--primary); }
.hit__icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; background: var(--soft); color: var(--link); }
.hit__icon .icon { width: 17px; height: 17px; }
.hit__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hit__title { font-weight: 600; font-size: 14px; line-height: 1.75; }
.hit__excerpt { color: var(--muted); font-size: 12.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hit__cat { color: var(--link); font-size: 11.5px; font-weight: 600; }
.hit--all { justify-content: center; font-weight: 600; font-size: 14px; color: var(--link); background: var(--bg-tint); margin-top: 4px; }
.hits-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.hits-loading { display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.hits-loading span { height: 54px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------ صفحه‌ی مطلب ------------------------------ */
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 100%; transform-origin: right; transform: scaleX(0); background: linear-gradient(90deg, #06b6a4, #2dd4bf); }

.post-head { position: relative; padding: 26px 0 30px; overflow: hidden; isolation: isolate; }
.post-head__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 320px at 80% -20%, color-mix(in srgb, var(--highlight) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-tint), var(--bg));
}
/* نقطه‌های محو در گوشه‌ی سرصفحه‌ی مطلب */
.post-head__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--primary) 32%, transparent) 1px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse 40% 90% at 6% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 40% 90% at 6% 0%, #000, transparent 70%);
  opacity: .7;
}
.post-head .breadcrumb { margin-bottom: 22px; }
.post-head .badge { margin-bottom: 14px; }
.post-head__title { font-size: clamp(23px, 3.9vw, 33px); line-height: 1.65; font-weight: 800; }
.post-head__lead { font-size: 15.5px; color: var(--muted); margin-top: 14px; line-height: 2.05; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.post-meta__author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.post-meta__item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.post-meta__item .icon { width: 15px; height: 15px; }
.post-meta__updated { color: var(--muted-2); font-size: 12.5px; }
@media (min-width: 900px) { .post-head { padding: 34px 0 36px; } }

.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #2dd4bf); color: #fff; font-weight: 700; font-size: 14px;
}
.avatar--lg { width: 52px; height: 52px; font-size: 20px; }

.post-cover { margin: 8px 0 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.post-cover img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }

.post-layout { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 20px; }
.post-layout--solo { max-width: 820px; }
.post-main { min-width: 0; }
.post-aside { min-width: 0; }
@media (min-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 270px; grid-template-areas: "main aside"; gap: 56px; max-width: 1140px; padding-top: 44px; }
  .post-layout--solo { grid-template-columns: 1fr; grid-template-areas: "main"; max-width: 820px; }
  .post-main { grid-area: main; }
  .post-aside { grid-area: aside; }
  .post-aside > * { position: sticky; top: calc(var(--header-h) + 20px); }
  .post-aside .aside-cta { position: static; }
  .post-aside { display: flex; flex-direction: column; gap: 16px; }
  .post-aside .toc { position: sticky; }
}

.toc__box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.toc__title { display: flex; align-items: center; gap: 8px; padding: 13px 16px; font-weight: 600; font-size: 13.5px; cursor: pointer; list-style: none; }
.toc__title::-webkit-details-marker { display: none; }
.toc__title::after { content: ""; margin-inline-start: auto; width: 7px; height: 7px; border-inline-start: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; }
.toc__box[open] .toc__title::after { transform: rotate(135deg); }
.toc__title .icon { color: var(--primary); width: 16px; height: 16px; }
.toc__list { list-style: none; margin: 0; padding: 0 10px 12px; max-height: 60vh; overflow-y: auto; counter-reset: toc; }
.toc__item a { position: relative; display: block; padding: 5px 12px; border-radius: 10px; color: var(--muted); font-size: 13px; line-height: 1.85; border-inline-start: 2px solid transparent; transition: color .2s, background-color .2s; }
.toc__item--3 a { padding-inline-start: 24px; font-size: 12.5px; }
.toc__item a:hover { color: var(--text); background: var(--surface-2); }
.toc__item a.is-active { color: var(--link); background: var(--soft-2); border-inline-start-color: var(--primary); font-weight: 600; }

.aside-cta { display: none; padding: 18px; border-radius: var(--radius); text-align: center; background: linear-gradient(160deg, var(--soft-2), var(--surface)); border: 1px solid var(--border); }
.aside-cta img { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 12px; }
.aside-cta p { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.aside-cta strong { display: block; color: var(--text); font-size: 14px; font-weight: 600; }
@media (min-width: 1100px) { .aside-cta { display: block; } }

/* متن مطلب */
.prose { font-size: 16px; line-height: 2.1; color: var(--text-2); overflow-wrap: break-word; }
@media (min-width: 900px) { .prose { font-size: 16.5px; } }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { position: relative; font-size: 1.3em; color: var(--text); margin-top: 2.2em; padding-inline-start: 16px; line-height: 1.7; }
.prose h2::before { content: ""; position: absolute; inset-inline-start: 0; top: .4em; bottom: .4em; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), var(--primary)); }
.prose h3 { font-size: 1.1em; color: var(--text); margin-top: 1.8em; }
.prose h4 { font-size: 1em; color: var(--text); margin-top: 1.5em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 5px; text-decoration-thickness: 1px; font-weight: 500; }
.prose a:hover { text-decoration-color: currentColor; }
.prose a.ext-link::after {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-inline-start: 3px; vertical-align: .05em;
  background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M20 4 10 14M18 14v5H5V6h5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M20 4 10 14M18 14v5H5V6h5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose strong { color: var(--text); font-weight: 700; }
.prose ul, .prose ol { padding-inline-start: 1.6em; }
.prose li + li { margin-top: .45em; }
.prose ul > li::marker { color: var(--accent); }
.prose ol { list-style: none; padding-inline-start: 0; counter-reset: step; }
.prose ol > li { position: relative; counter-increment: step; padding-inline-start: 2.6em; }
.prose ol > li::before {
  content: counter(step, persian); position: absolute; inset-inline-start: 0; top: .3em;
  display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
  background: var(--soft); color: var(--link); font-weight: 700; font-size: .82em; line-height: 1;
}
.prose blockquote { margin-inline: 0; padding: 16px 20px; border-inline-start: 3px solid var(--border-strong); border-radius: 0 14px 14px 0; background: var(--surface-2); color: var(--text-2); }
[dir="rtl"] .prose blockquote { border-radius: 14px 0 0 14px; }
.prose blockquote > * + * { margin-top: .6em; }
.prose .callout { position: relative; border: 1px solid; border-inline-start-width: 3px; padding: 16px 20px 16px 20px; padding-inline-start: 50px; font-size: .95em; }
.prose .callout::before {
  content: ""; position: absolute; inset-inline-start: 16px; top: 19px; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--callout-icon) center / contain no-repeat; mask: var(--callout-icon) center / contain no-repeat;
}
.prose .callout__label { display: inline; }
.prose .callout--tip { background: var(--soft-2); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text-2); --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1 2V16h5.2v-.2c0-.8.4-1.5 1-2A6 6 0 0 0 12 3Z'/%3E%3C/svg%3E"); }
.prose .callout--tip::before { color: var(--primary); }
.prose .callout--tip .callout__label { color: var(--link); }
.prose .callout--warning { background: var(--warn-bg); border-color: var(--warn-border); --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.prose .callout--warning::before, .prose .callout--warning .callout__label { color: var(--warn); }
.prose .callout--info, .prose .callout--example { background: var(--info-bg); border-color: var(--info-border); --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 16v-5M12 8h.01'/%3E%3C/svg%3E"); }
.prose .callout--info::before, .prose .callout--info .callout__label, .prose .callout--example::before, .prose .callout--example .callout__label { color: var(--info); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84em; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text); direction: ltr; unicode-bidi: isolate; }
.prose img { border-radius: 14px; }
.prose hr { border: 0; height: 1px; background: var(--border); margin-block: 2.2em; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: .88em; line-height: 1.9; min-width: 520px; }
.prose th, .prose td { padding: 11px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--bg-tint); color: var(--text); font-weight: 600; white-space: nowrap; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.prose tbody tr:last-child td { border-bottom: 0; }

.heading-anchor { margin-inline-start: 8px; font-weight: 400; color: var(--muted-2) !important; text-decoration: none !important; opacity: 0; transition: opacity .2s; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor, .heading-anchor:focus { opacity: 1; }

.prose .faq { display: flex; flex-direction: column; gap: 10px; }
.faq__item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq__item[open] { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: var(--shadow-sm); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; font-weight: 600; font-size: .95em; color: var(--text); cursor: pointer; list-style: none; line-height: 1.85; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--link); font-weight: 300; font-size: 18px; transition: transform .25s var(--ease); }
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 18px 16px; color: var(--text-2); font-size: .95em; }
.faq__a > * + * { margin-top: .7em; }

.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; }
.post-tags > .icon { color: var(--muted); width: 17px; height: 17px; }

.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.share__label { color: var(--muted); font-size: 13px; font-weight: 500; }
.share__buttons { display: flex; gap: 8px; }
.share-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); transition: all .2s; }
.share-btn .icon { width: 17px; height: 17px; }
.share-btn:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.share-btn__done { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 11.5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.share-btn.is-done .share-btn__done { opacity: 1; }

.post-cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  margin-top: 28px; padding: 26px; border-radius: var(--radius-lg);
  background:
    radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.3px) 0 0 / 18px 18px,
    linear-gradient(125deg, #0b5f58, #0f766e 45%, #06b6a4);
  color: #fff;
}
.post-cta::after { content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; border-radius: 50%; inset-inline-end: -80px; top: -120px; background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 40px rgba(255, 255, 255, .04); }
.post-cta__title { font-size: 17px; line-height: 1.7; }
.post-cta__desc { opacity: .88; margin-top: 6px; font-size: 14px; }
.post-cta__desc a { color: #fff; }
@media (min-width: 720px) { .post-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 30px 34px; } }

.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.author-box__label { display: block; font-size: 11.5px; color: var(--muted-2); font-weight: 500; }
.author-box__name { display: block; font-size: 15.5px; margin-bottom: 4px; }
.author-box p { color: var(--muted); font-size: 13.5px; }

.post-nav { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav__item { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.post-nav__item:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); box-shadow: var(--shadow); color: var(--text); }
.post-nav__item small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; font-size: 12px; }
.post-nav__item small .icon { width: 14px; height: 14px; }
.post-nav__item strong { line-height: 1.8; font-size: 14px; font-weight: 600; }
.post-nav__item--next { text-align: end; align-items: flex-end; }

.comments { margin-top: 44px; }
.comments__title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 18px; }
.comments__title .icon { color: var(--primary); }
.comments__count { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--link); font-size: 12.5px; font-weight: 600; }
.comment-form { padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); margin-bottom: 20px; }
.comment-form__intro { color: var(--muted); margin-bottom: 14px; font-size: 14px; }
.comment-form__row { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .comment-form__row { grid-template-columns: 1fr 1fr; } }
.comment-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.comment-form__note { color: var(--muted-2); font-size: 12.5px; }
.comment-form__note.is-success { color: var(--success); font-weight: 600; }
.comment-form__note.is-error { color: var(--danger); font-weight: 600; }
.comments__list { display: flex; flex-direction: column; gap: 12px; }
.comments__empty, .comments__closed { color: var(--muted); padding: 16px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); font-size: 14px; }
.comment { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.comment.is-new { animation: pop .35s var(--ease); border-color: var(--primary); }
.comment__body { flex: 1; min-width: 0; }
.comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 4px; font-size: 14px; }
.comment__head time { color: var(--muted-2); font-size: 11.5px; }
.comment__body p { color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; font-size: 14px; }

.post--page .post-head { padding-bottom: 8px; }

/* ------------------------------ تماس ------------------------------ */
.contact-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 300px; gap: 28px; } }
.contact-aside { display: flex; flex-direction: column; gap: 16px; }
.contact-aside .panel__title { font-size: 15px; }

/* ------------------------------ خطا و ورود ------------------------------ */
.error-page { padding: 60px 0 28px; }
.error-page__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; max-width: 620px; }
.error-page__code {
  font-size: clamp(80px, 18vw, 128px); line-height: 1; font-weight: 800;
  background: linear-gradient(135deg, #0f766e, #2dd4bf); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page__title { font-size: 21px; }
.error-page__message { color: var(--muted); font-size: 14.5px; }
.error-page .searchbar { width: 100%; margin-top: 8px; }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.auth-page { display: grid; place-items: center; padding: 48px var(--gutter); min-height: 60vh; }
.auth-card { width: min(410px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.auth-card__logo { width: 48px; height: 48px; border-radius: 14px; }
.auth-card__title { font-size: 19px; }
.auth-card__note { color: var(--muted); font-size: 13.5px; }
.auth-card form { display: flex; flex-direction: column; }

/* ------------------------------ فوتر ------------------------------
   فوتر در هر دو تم تیره است؛ توکن‌ها داخل آن بازتعریف می‌شوند تا
   اجزای مشترک (برند، دکمه‌ی شبکه‌ها) خودبه‌خود رنگ تیره بگیرند.  */
.site-footer {
  --text: #e8f3f1;
  --text-2: #c0d5d2;
  --muted: #8cada9;
  --muted-2: #668783;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .07);
  --soft: rgba(45, 212, 191, .14);
  --soft-2: rgba(45, 212, 191, .08);
  --primary: #2dd4bf;
  --primary-hover: #5eead4;
  --accent: #2dd4bf;
  --link: #5eead4;
  --on-primary: #042f2e;

  color-scheme: dark;
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 56px; color: var(--text);
  background: linear-gradient(180deg, #072a28 0%, #051c1b 100%);
}
html[data-theme="dark"] .site-footer { background: linear-gradient(180deg, #051c1b 0%, #031312 100%); }
.site-footer::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 1px; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, .65) 50%, transparent);
}
.site-footer .brand__zi { color: var(--accent); }

.footer__deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.footer__glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.footer__glow--a { width: 560px; height: 560px; top: -320px; inset-inline-start: -140px; background: rgba(20, 184, 166, .32); }
.footer__glow--b { width: 420px; height: 420px; bottom: -240px; inset-inline-end: 8%; background: rgba(34, 211, 238, .12); }
.footer__lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 15%, transparent 75%);
}

/* نوار بالای فوتر: پرسش و جستجو */
.footer__top { display: grid; gap: 20px; align-items: center; padding: 44px 0 36px; border-bottom: 1px solid var(--border); }
.footer__kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--link); font-size: 12px; font-weight: 500; }
.footer__kicker .icon { width: 14px; height: 14px; }
.footer__headline { font-size: clamp(17px, 2.3vw, 23px); font-weight: 700; line-height: 1.7; color: var(--text); }
.footer__headline span { display: block; font-weight: 300; color: var(--muted); }
.footer__search {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 6px; padding-inline-start: 18px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.footer__search:focus-within { border-color: var(--primary); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 4px rgba(45, 212, 191, .12); }
.footer__search > .icon { width: 18px; height: 18px; color: var(--muted); }
.footer__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.footer__search input::placeholder { color: var(--muted-2); }
.footer__search input:focus-visible { outline: 0; }
.footer__search-btn {
  display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); transition: background-color .2s, transform .25s var(--ease);
}
.footer__search-btn .icon { width: 18px; height: 18px; }
.footer__search-btn:hover { background: var(--primary-hover); transform: translateX(-3px); }
@media (min-width: 900px) {
  .footer__top { grid-template-columns: 1fr minmax(320px, 430px); gap: 56px; padding: 60px 0 50px; }
  .footer__search input { font-size: 14px; }
}

/* ستون‌ها */
.footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; padding: 40px 0 36px; }
.footer__about { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.7fr repeat(3, minmax(0, 1fr)); gap: 40px; padding: 54px 0 46px; }
  .footer__about { grid-column: auto; padding-inline-end: 32px; }
}
.footer__about .brand { margin-bottom: 16px; }
.footer__desc { color: var(--muted); font-size: 13.5px; line-height: 2.05; max-width: 370px; }
.footer__contact { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.footer__contact li { display: flex; align-items: flex-start; gap: 8px; }
.footer__contact .icon { width: 15px; height: 15px; color: var(--accent); margin-top: 5px; }
.footer__contact a { color: var(--text-2); }
.footer__contact a:hover { color: var(--link); }
.footer__socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.social-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: background-color .2s, border-color .2s, color .2s, transform .25s var(--ease);
}
.social-btn .icon { width: 16px; height: 16px; }
.social-btn:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); transform: translateY(-2px); }

.footer__title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.footer__title::before {
  content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(45, 212, 191, .16), 0 0 10px rgba(45, 212, 191, .6);
}
.footer__links { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }
.footer__links a { display: inline-flex; align-items: center; padding: 4px 0; color: var(--muted); font-size: 13px; transition: color .2s; }
.footer__links a::before {
  content: ""; width: 0; height: 1px; background: var(--accent);
  transition: width .3s var(--ease), margin .3s var(--ease);
}
.footer__links a:hover { color: var(--text); }
.footer__links a:hover::before { width: 12px; margin-inline-end: 8px; }
.footer__links a.is-external::after {
  content: ""; width: .8em; height: .8em; margin-inline-start: 6px; background: currentColor; opacity: .45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M8 16 16 8M9 8h7v7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M8 16 16 8M9 8h7v7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* نوار موضوع‌ها */
.footer__topics { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 22px 0; border-top: 1px solid var(--border); }
.footer__topics-label { color: var(--muted-2); font-size: 12px; font-weight: 500; }
.footer__topics ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.footer__topic {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; line-height: 1.8;
  transition: border-color .2s, background-color .2s, color .2s;
}
.footer__topic .icon { width: 14px; height: 14px; color: var(--accent); }
.footer__topic small { color: var(--muted-2); font-size: 11px; }
.footer__topic:hover { border-color: rgba(45, 212, 191, .45); background: rgba(45, 212, 191, .08); color: var(--text); }

/* واژه‌نگار بزرگ تزئینی که در نوار پایین فرو می‌رود */
.footer__wordmark { position: relative; height: clamp(58px, 11.5vw, 168px); margin-top: 8px; overflow: hidden; pointer-events: none; user-select: none; }
.footer__wordmark span {
  position: absolute; inset-inline: 0; top: -.16em; text-align: center;
  font-size: clamp(104px, 22vw, 320px); font-weight: 900; line-height: 1; white-space: nowrap;
  background: linear-gradient(180deg, rgba(94, 234, 212, .2) 30%, rgba(94, 234, 212, .02) 72%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(94, 234, 212, .14);
}

.footer__bar { position: relative; border-top: 1px solid var(--border); background: rgba(0, 0, 0, .2); }
.footer__bar-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px;
  padding-block: 14px calc(14px + env(safe-area-inset-bottom)); color: var(--muted-2); font-size: 12.5px;
}
.footer__copy { text-align: center; }
.footer__theme { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.footer__theme button {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); transition: background-color .2s, color .2s;
}
.footer__theme button .icon { width: 15px; height: 15px; }
.footer__theme button:hover { color: var(--text); }
.footer__theme button.is-active { background: rgba(45, 212, 191, .16); color: var(--link); }
.footer__ziroom { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; direction: ltr; transition: color .2s; }
.footer__ziroom:hover { color: var(--link); }
.footer__ziroom img { border-radius: 5px; }
@media (min-width: 720px) {
  .footer__bar-inner { justify-content: space-between; }
  .footer__copy { text-align: start; flex: 1; }
  .footer__ziroom { flex: 1; justify-content: flex-start; }
}

/* ------------------------------ بازگشت به بالا ------------------------------ */
.to-top {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); inset-inline-end: 20px; z-index: 40;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--link); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; }
.to-top[hidden] { display: none; }
.to-top .icon { width: 20px; height: 20px; }

/* ------------------------------ حرکت و چاپ ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .site-header, .drawer, .site-footer, .post-aside, .share, .post-cta, .comments, .post-nav, .to-top, .read-progress, .spotlight, .newsletter { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { color: #000; }
}
