/*
Theme Name: IranGeek
Theme URI: https://irangeek.com
Author: IranGeek
Author URI: https://irangeek.com
Description: قالب تخصصی اخبار و مقالات فناوری اطلاعات برای irangeek.com — راست‌چین (RTL)، دارک‌فرست با تم روشن اختیاری، سایدبار سمت راست و محتوا سمت چپ. طراحی «گیک و حرفه‌ای»: تایپوگرافی مونواسپیس برای متادیتا، بلوک کد با دکمه‌ی کپی، فهرست مطالب خودکار، نوار پیشرفت مطالعه و کارت‌های پنل‌مانند.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: irangeek
Tags: rtl-language-support, blog, news, technology, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready, dark-mode
*/

/* ==========================================================================
   1. متغیرها / Design Tokens
   ========================================================================== */
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* فونت مونو فقط برای لاتین، اعداد و نشانه‌ها تعریف می‌شود.
   بدون این unicode-range، فونت‌های مونو حروف فارسی را بدون اتصال
   («د و ا پ س» به‌جای «دواپس») رندر می‌کنند. حروف فارسی به Vazirmatn می‌افتند. */
@font-face {
  font-family: "IG Mono";
  src: local("SFMono-Regular"), local("SF Mono"), local("Menlo"),
       local("JetBrains Mono"), local("Fira Code"), local("Cascadia Mono"),
       local("Consolas"), local("DejaVu Sans Mono"), local("Liberation Mono"),
       local("Courier New");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F,
                 U+2070-209F, U+20A0-20BF, U+2190-21FF, U+2200-22FF;
}

:root {
  /* ---- تم تیره (پیش‌فرض) ---- */
  --primary:        #35d39a;   /* mint terminal */
  --primary-600:    #24bd86;
  --primary-700:    #17a173;
  --primary-50:     rgba(53,211,154,.10);
  --primary-100:    rgba(53,211,154,.22);
  --link:           #56c8f5;
  --link-hover:     #8ad9f9;
  --accent:         #fbbf24;

  --bg:             #080b11;
  --bg-grid:        rgba(148,163,184,.055);
  --surface:        #0f141d;
  --surface-2:      #141b26;
  --surface-3:      #1a2331;
  --text:           #e6edf6;
  --text-soft:      #97a4b8;
  --text-faint:     #64748b;
  --border:         #1e2836;
  --border-soft:    #18202c;
  --border-strong:  #2b384a;

  /* رنگ دسته‌ها */
  --cat-news:       #56c8f5;
  --cat-ai:         #a78bfa;
  --cat-dev:        #35d39a;
  --cat-security:   #f87171;
  --cat-os:         #fbbf24;
  --cat-hardware:   #fb923c;
  --cat-web:        #60a5fa;

  --success:        #34d399;
  --error:          #f87171;

  --code-bg:        #0b1017;
  --code-border:    #1c2635;
  --code-text:      #cbd5e1;

  --radius:         14px;
  --radius-sm:      9px;
  --radius-lg:      18px;
  --radius-pill:    999px;
  --shadow-sm:      0 1px 2px rgba(0,0,0,.35);
  --shadow:         0 6px 18px rgba(0,0,0,.4);
  --shadow-lg:      0 20px 46px rgba(0,0,0,.55);
  --ring:           0 0 0 3px rgba(53,211,154,.28);

  --sidebar-w:      300px;
  --container:      1280px;
  --header-h:       60px;

  --ff:    "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  --ff-mono: "IG Mono", "Vazirmatn", ui-monospace, monospace;
  --ff-code: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", "Fira Code", Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: dark;
}

/* ---- تم روشن ---- */
:root[data-theme="light"] {
  --primary:        #0d9f70;
  --primary-600:    #0b8a61;
  --primary-700:    #077352;
  --primary-50:     rgba(13,159,112,.08);
  --primary-100:    rgba(13,159,112,.18);
  --link:           #0b7fc7;
  --link-hover:     #0a679f;
  --accent:         #b45309;

  --bg:             #f4f6f9;
  --bg-grid:        rgba(15,23,42,.045);
  --surface:        #ffffff;
  --surface-2:      #f8fafc;
  --surface-3:      #eef2f7;
  --text:           #101828;
  --text-soft:      #576274;
  --text-faint:     #8b96a8;
  --border:         #e2e8f0;
  --border-soft:    #edf1f6;
  --border-strong:  #cbd5e1;

  --cat-news:       #0b7fc7;
  --cat-ai:         #7c3aed;
  --cat-dev:        #0d9f70;
  --cat-security:   #dc2626;
  --cat-os:         #b45309;
  --cat-hardware:   #ea580c;
  --cat-web:        #2563eb;

  --success:        #059669;
  --error:          #dc2626;

  --code-bg:        #0d1219;
  --code-border:    #1c2635;
  --code-text:      #dbe4ef;

  --shadow-sm:      0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow:         0 4px 14px rgba(16,24,40,.07);
  --shadow-lg:      0 18px 40px rgba(16,24,40,.11);
  --ring:           0 0 0 3px rgba(13,159,112,.22);

  color-scheme: light;
}

/* ==========================================================================
   2. ریست و پایه
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 34px 34px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.45; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
button svg, .btn svg, a.btn svg { pointer-events: none; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* واحد پایه‌ی «مونو» — امضای بصری قالب */
.mono, .card-meta, .hero-meta, .entry-meta, .breadcrumb, .badge,
.mini-meta, .comment-date, .pagination, .widget-title, .section-head h2::before {
  font-family: var(--ff-mono);
  font-feature-settings: "ss01", "zero";
}

/* ==========================================================================
   3. نوار ابزار بالا (utility bar)
   ========================================================================== */
.preview-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  font-family: var(--ff-mono);
  font-size: .78rem;
  padding-block: 9px;
  padding-inline: max(20px, calc((100vw - var(--container)) / 2 + 20px));
  display: flex;
  align-items: center;
  gap: 4px 0;
  flex-wrap: wrap;
}
.preview-bar::before {
  content: "$";
  color: var(--primary);
  font-weight: 700;
  margin-inline-end: 10px;
}
.preview-bar a {
  color: var(--text-soft);
  margin: 0 7px;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.preview-bar a:hover,
.preview-bar a.active { color: var(--primary); border-bottom-color: var(--primary); }
.preview-bar .sep { color: var(--border-strong); }
.preview-bar .bar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

/* کلید تغییر تم */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 8px; color: var(--text-soft);
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ==========================================================================
   4. چیدمان اصلی — سایدبار راست، محتوا چپ
   ========================================================================== */
.site-inner { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  padding-block: 28px 56px;
}
.content-area { min-width: 0; }

@media (max-width: 1023px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-block: 18px 40px; }
}

/* ==========================================================================
   5. هدر موبایل
   ========================================================================== */
.topbar {
  display: none;
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--container); margin-inline: auto; height: 100%;
  padding-inline: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 10px; color: var(--text-soft);
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { width: 21px; height: 21px; }

@media (max-width: 1023px) {
  .topbar { display: block; }
  .topbar-inner { justify-content: flex-start; direction: ltr; }
  .topbar [data-menu-toggle] { order: 1; }
  .topbar [data-search-toggle] { order: 2; }
  .topbar .logo { order: 3; margin-left: auto; direction: rtl; min-width: 0; }
}

/* ==========================================================================
   6. لوگو — پنجره‌ی ترمینال
   ========================================================================== */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 46px; height: 46px; flex: none;
  border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.logo-mark svg,
.logo-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.logo-name {
  font-family: var(--ff-mono);
  font-size: 1.3rem; font-weight: 700; color: var(--text);
  letter-spacing: -.02em; white-space: nowrap;
}
.logo-name b { color: var(--primary); font-weight: 700; }
.logo-caret {
  color: var(--primary); font-weight: 400;
  animation: ig-caret 1.15s steps(1) infinite;
}
@keyframes ig-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.logo-tld {
  font-size: .72rem; color: var(--text-faint); font-weight: 600;
  white-space: nowrap; letter-spacing: 0;
}
.topbar .logo-mark { width: 38px; height: 38px; border-radius: 10px; }
.topbar .logo-name { font-size: 1.1rem; }
.topbar .logo-tld  { font-size: .64rem; }

@media (prefers-reduced-motion: reduce) {
  .logo-caret { animation: none; }
}

/* ==========================================================================
   7. سایدبار
   ========================================================================== */
/* سایدبار در دسکتاپ اسکرول داخلی ندارد و همراه صفحه حرکت می‌کند،
   تا همه‌ی ابزارک‌ها بدون نوار اسکرول جداگانه در دسترس بمانند. */
.sidebar { position: relative; align-self: start; }
@media (min-width: 1024px) {
  .sidebar { position: static; max-height: none; overflow: visible; }
  .sidebar-sticky { position: static; }
}

.sidebar-logo { padding: 6px 4px 18px; }
@media (min-width: 1024px) {
  .sidebar-logo .logo { gap: 13px; }
  .sidebar-logo .logo-mark { width: 60px; height: 60px; border-radius: 16px; }
  .sidebar-logo .logo-name { font-size: 1.72rem; }
  .sidebar-logo .logo-tld { font-size: .78rem; white-space: normal; line-height: 1.55; }
}

.widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 17px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: .82rem; font-weight: 700; margin: 0 0 13px;
  color: var(--text-soft); letter-spacing: .02em;
  display: flex; align-items: center; gap: 7px;
  text-transform: none;
}
.widget-title::before {
  content: "//";
  color: var(--primary);
  font-weight: 700;
}

/* ناوبری دسته‌ها */
.cat-nav > li + li { border-top: 1px solid var(--border-soft); }
.cat-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 8px; color: var(--text); font-weight: 700; font-size: .93rem;
  border-radius: 8px; transition: background .15s, color .15s;
}
.cat-nav a:hover { background: var(--surface-2); color: var(--primary); }
.cat-nav .cat-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; background: var(--primary); transform: rotate(45deg); }
.cat-nav .menu-item-has-children > a::after,
.cat-nav .has-sub > a::after {
  content: ""; margin-inline-start: auto; width: 7px; height: 7px;
  border-inline-end: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg); transition: transform .2s ease;
}
.cat-nav .open > a::after { transform: rotate(-135deg); }
.cat-nav .sub-menu, .cat-nav .children { display: none; padding: 0 20px 7px; }
.cat-nav .open > .sub-menu, .cat-nav .open > .children { display: block; }
.cat-nav .sub-menu a, .cat-nav .children a {
  padding: 6px 8px; font-size: .86rem; font-weight: 600; color: var(--text-soft);
  font-family: var(--ff);
}
.cat-nav .sub-menu a::before, .cat-nav .children a::before {
  content: "└"; color: var(--border-strong); font-family: var(--ff-mono); font-size: .8em;
}
.cat-nav .sub-menu a:hover, .cat-nav .children a:hover { background: none; color: var(--primary); }
@media (min-width: 1024px) {
  .cat-nav .sub-menu, .cat-nav .children { display: block; }
  .cat-nav .menu-item-has-children > a::after, .cat-nav .has-sub > a::after { display: none; }
}

/* لیست مقالات کوچک */
.mini-list li + li { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border-soft); }
.mini-post { display: flex; gap: 11px; align-items: flex-start; }
.mini-thumb { width: 54px; height: 54px; flex: none; border-radius: 9px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); }
.mini-post a { font-weight: 700; font-size: .88rem; color: var(--text); line-height: 1.65; }
.mini-post a:hover { color: var(--primary); }
.mini-meta { font-size: .72rem; color: var(--text-faint); margin-top: 3px; }
.mini-rank {
  font-family: var(--ff-mono); font-size: .72rem; font-weight: 700;
  color: var(--primary); flex: none; padding-top: 2px; min-width: 1.6em;
}

/* ویجت CTA */
.widget--cta {
  background:
    radial-gradient(120% 120% at 100% 0%, var(--primary-50), transparent 60%),
    var(--surface);
  border-color: var(--primary-100);
}
.widget--cta p { font-size: .87rem; color: var(--text-soft); margin: 0 0 14px; line-height: 1.8; }

/* بنر معرفی طراح — با توکن‌های خود قالب ساخته می‌شود، نه تصویر،
   تا در هر دو تم هم‌رنگ بماند و وزنی به صفحه اضافه نکند. */
.sidebar-promo {
  position: relative; display: flex; flex-direction: column; gap: 7px;
  padding: 16px 17px 15px; border-radius: var(--radius);
  background:
    radial-gradient(130% 120% at 100% 0%, color-mix(in srgb, var(--link) 12%, transparent), transparent 62%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sidebar-promo::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 2px;
  background: linear-gradient(90deg, var(--link), var(--primary));
  opacity: .8;
}
.sidebar-promo:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.sidebar-promo__eyebrow {
  font-family: var(--ff-mono); font-size: .66rem; font-weight: 700;
  color: var(--text-faint); letter-spacing: .02em;
}
.sidebar-promo__eyebrow::before { content: "// "; color: var(--link); }
.sidebar-promo__title { font-size: 1.02rem; font-weight: 800; color: var(--text); line-height: 1.5; }
.sidebar-promo__desc { font-size: .82rem; color: var(--text-soft); line-height: 1.8; }
.sidebar-promo__cta {
  margin-top: 4px; font-size: .82rem; font-weight: 700; color: var(--link);
  display: inline-flex; align-items: center; gap: 5px;
}
.sidebar-promo:hover .sidebar-promo__cta { color: var(--link-hover); }

/* ==========================================================================
   8. جستجو
   ========================================================================== */
.search-form { position: relative; display: flex; }
.search-form input[type="search"] {
  width: 100%; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 10px 40px 10px 14px;
  font-family: var(--ff-mono); font-size: .85rem; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.search-form input::placeholder { color: var(--text-faint); }
.search-form input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.search-form button {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-faint); display: grid; place-items: center;
  transition: color .15s;
}
.search-form button:hover { color: var(--primary); }
.search-form button svg { width: 16px; height: 16px; }

/* ==========================================================================
   9. کارت‌های مقاله
   ========================================================================== */
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: 6px 0 18px;
}
.section-head h2 {
  margin: 0; font-size: 1.28rem; display: flex; align-items: baseline; gap: 9px;
}
.section-head h2::before {
  content: "##";
  color: var(--primary); font-size: .95rem; font-weight: 700;
}
.section-head .more-link {
  font-family: var(--ff-mono); font-size: .8rem; font-weight: 600;
  color: var(--text-soft); white-space: nowrap;
}
.section-head .more-link:hover { color: var(--primary); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; gap: 16px; } }

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0;
  height: 2px; background: var(--primary); z-index: 3;
  transform: scaleX(0); transform-origin: right; transition: transform .28s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card:hover::before { transform: scaleX(1); }
.card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); display: block; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.04rem; font-weight: 800; line-height: 1.62; margin: 0 0 8px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-excerpt {
  font-size: .875rem; color: var(--text-soft); margin: 0 0 14px; line-height: 1.85;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px;
  margin-top: auto; font-size: .74rem; color: var(--text-faint);
}
.card-meta .meta { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .meta + .meta::before { content: "·"; color: var(--border-strong); margin-inline-end: 4px; }
.card-meta svg { width: 13px; height: 13px; opacity: .75; }

/* برچسب دسته */
.badge {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 700; line-height: 1;
  padding: 5px 10px; border-radius: var(--radius-pill);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}
.badge::before { content: "#"; opacity: .6; margin-inline-end: 2px; }
.card-thumb .badge {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 2;
  backdrop-filter: blur(10px) saturate(160%);
  background: color-mix(in srgb, var(--primary) 20%, rgba(8,11,17,.72));
  color: #fff; border-color: color-mix(in srgb, var(--primary) 55%, transparent);
}
.badge--news     { --primary: var(--cat-news); }
.badge--ai       { --primary: var(--cat-ai); }
.badge--dev      { --primary: var(--cat-dev); }
.badge--security { --primary: var(--cat-security); }
.badge--os       { --primary: var(--cat-os); }
.badge--hardware { --primary: var(--cat-hardware); }
.badge--web      { --primary: var(--cat-web); }

/* ==========================================================================
   10. Hero / مقاله شاخص
   ========================================================================== */
.hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 30px; min-height: 340px; display: flex; align-items: flex-end;
  border: 1px solid var(--border); background: var(--surface);
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(6,9,14,.94) 0%, rgba(6,9,14,.74) 42%, rgba(6,9,14,.18) 100%);
}
.hero-body { position: relative; z-index: 2; padding: 28px 30px; max-width: 760px; }
.hero-body h2 { font-size: 1.72rem; line-height: 1.55; margin: 12px 0 10px; }
.hero-body h2 a { color: #fff; }
.hero-body h2 a:hover { color: var(--primary); }
.hero-body p {
  color: #c3cdda; margin: 0 0 14px; font-size: .95rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; font-size: .74rem; color: #93a2b5; }
.hero-meta .meta { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta .meta + .meta::before { content: "·"; color: #5a687b; margin-inline-end: 4px; }
@media (max-width: 560px) {
  .hero { min-height: 260px; }
  .hero-body { padding: 20px 18px; }
  .hero-body h2 { font-size: 1.28rem; }
}

/* ==========================================================================
   11. تک‌نوشته / برگه
   ========================================================================== */
.reading-progress {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 90;
  height: 3px; background: transparent; pointer-events: none;
}
.reading-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--link));
  transition: width .1s linear;
}

.entry {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.entry-hero { aspect-ratio: 21/9; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.entry-hero img { width: 100%; height: 100%; object-fit: cover; }
.entry-inner { padding: 26px 32px 34px; }
@media (max-width: 640px) { .entry-inner { padding: 20px 17px 26px; } }

.entry-header { margin-bottom: 18px; }
.entry-title { font-size: 1.95rem; line-height: 1.5; margin: 12px 0 14px; }
@media (max-width: 640px) { .entry-title { font-size: 1.42rem; } }
.entry-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  font-size: .78rem; color: var(--text-soft);
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.entry-meta .meta { display: inline-flex; align-items: center; gap: 6px; }
.entry-meta svg { width: 15px; height: 15px; opacity: .7; }
.entry-author-avatar { width: 24px; height: 24px; border-radius: 6px; }

/* فهرست مطالب خودکار */
.toc {
  margin: 0 0 26px; padding: 16px 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); border-inline-start: 3px solid var(--primary);
}
.toc-title {
  font-family: var(--ff-mono); font-size: .82rem; font-weight: 700;
  color: var(--text-soft); margin: 0 0 10px;
  display: flex; align-items: center; gap: 7px;
}
.toc-title::before { content: "//"; color: var(--primary); }
.toc ol { counter-reset: toc; }
.toc li { counter-increment: toc; margin: 5px 0; }
.toc li a { color: var(--text-soft); font-size: .9rem; font-weight: 600; line-height: 1.75; }
.toc li a::before {
  content: counter(toc, decimal) ".";
  font-family: var(--ff-mono); color: var(--primary);
  margin-inline-end: 7px; font-size: .82rem;
}
.toc li a:hover { color: var(--primary); }
.toc .toc-h3 { padding-inline-start: 20px; }
.toc .toc-h3 a::before { content: "-"; }

/* محتوای نوشته */
.entry-content {
  max-width: 780px; margin-inline: auto;
  font-size: 1.05rem; line-height: 2.12; color: var(--text);
  overflow-wrap: break-word; word-break: normal;
}
.entry-content > * { margin-block: 0; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content p { text-align: justify; text-justify: inter-word; color: var(--text-soft); }
.entry-content > p:first-of-type {
  position: relative; margin-bottom: 1.3em; padding: 10px 16px 10px 0;
  border-inline-start: 3px solid var(--primary);
  color: var(--text); font-size: 1.1rem; font-weight: 600; line-height: 2;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
  position: relative; color: var(--text); line-height: 1.6; scroll-margin-top: 86px;
}
.entry-content h2 { font-size: 1.42rem; margin-top: 2em; padding-inline-start: 22px; }
.entry-content h2::before {
  content: "#"; position: absolute; inset-inline-start: 0; top: 0;
  font-family: var(--ff-mono); color: var(--primary); font-weight: 700; font-size: 1.15rem;
}
.entry-content h3 { font-size: 1.18rem; margin-top: 1.6em; padding-inline-start: 24px; }
.entry-content h3::before {
  content: "##"; position: absolute; inset-inline-start: 0; top: .1em;
  font-family: var(--ff-mono); color: var(--primary); opacity: .65; font-weight: 700; font-size: .92rem;
}
.entry-content h4 { font-size: 1.05rem; margin-top: 1.35em; }
.entry-content h2 + *, .entry-content h3 + *, .entry-content h4 + * { margin-top: .6em; }
.entry-content a {
  color: var(--link); font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent);
}
.entry-content a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.2em; margin: 1.2em 0; color: var(--text-soft); }
.entry-content ul { list-style: none; }
.entry-content ul li { position: relative; padding-inline-start: 1.2em; }
.entry-content ul li::before {
  content: "▹"; position: absolute; inset-inline-start: 0; top: 0;
  color: var(--primary); font-size: .9em;
}
.entry-content ol { list-style: none; counter-reset: li; }
.entry-content ol li { position: relative; padding-inline-start: 1.7em; }
.entry-content ol li::before {
  counter-increment: li; content: counter(li) ".";
  position: absolute; inset-inline-start: 0; top: 0;
  font-family: var(--ff-mono); color: var(--primary); font-size: .88em; font-weight: 700;
}
.entry-content li { margin: .5em 0; }
.entry-content strong, .entry-content b { color: var(--text); font-weight: 800; }
.entry-content mark {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text); padding: 1px 6px; border-radius: 5px;
}
.entry-content hr, .entry-content .wp-block-separator {
  width: 100%; max-width: 200px; height: 1px; border: 0;
  margin: 2em auto; background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.entry-content img { border-radius: var(--radius-sm); margin-inline: auto; border: 1px solid var(--border); }
.entry-content figure { margin: 1.6em auto; }
.entry-content figcaption, .entry-content .wp-caption-text {
  margin-top: .6em; text-align: center; font-family: var(--ff-mono);
  font-size: .78rem; color: var(--text-faint); line-height: 1.8;
}
.entry-content blockquote {
  margin: 1.7em 0; padding: 16px 20px;
  border-inline-start: 3px solid var(--primary);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text); font-weight: 600; line-height: 2;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* کد درون‌خطی و بلوک کد */
.entry-content code {
  background: var(--surface-3); color: var(--primary);
  padding: 2px 7px; border-radius: 5px; font-size: .87em;
  font-family: var(--ff-code); direction: ltr; unicode-bidi: embed;
  border: 1px solid var(--border);
}
.entry-content pre {
  position: relative;
  background: var(--code-bg); color: var(--code-text);
  padding: 40px 18px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--code-border);
  overflow-x: auto; direction: ltr; text-align: left;
  font-family: var(--ff-code); font-size: .87rem; line-height: 1.75;
  tab-size: 2;
}
.entry-content pre::before {
  content: "";
  position: absolute; inset-block-start: 0; inset-inline: 0; height: 30px;
  background: var(--surface-3); border-bottom: 1px solid var(--code-border);
}
.entry-content pre::after {
  content: "";
  position: absolute; inset-block-start: 11px; left: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #f87171;
  box-shadow: 15px 0 0 #fbbf24, 30px 0 0 #35d39a;
}
.entry-content pre code {
  background: none; padding: 0; color: inherit; border: 0; font-size: inherit;
}
/* دکمه‌ی کپی در سمت راستِ نوار عنوان بلوک کد می‌نشیند؛
   چراغ‌های ترافیکی سمت چپ‌اند و نباید روی هم بیفتند. */
.code-copy {
  position: absolute; top: 4px; left: auto; right: 10px;
  z-index: 3;
  font-family: var(--ff-code); font-size: .68rem; font-weight: 600;
  line-height: 1; padding: 5px 10px; border-radius: 6px;
  background: var(--code-bg); border: 1px solid var(--code-border);
  color: var(--text-faint); transition: color .15s, border-color .15s;
}
.code-copy:hover { color: var(--primary); border-color: var(--primary); }
.code-copy.is-done { color: var(--primary); border-color: var(--primary); }

.entry-content table {
  width: 100%; border-collapse: collapse; margin: 1.3em 0;
  font-size: .93rem; display: block; overflow-x: auto;
}
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 9px 12px; text-align: start; }
.entry-content th { background: var(--surface-2); font-weight: 700; color: var(--text); }
.entry-content td { color: var(--text-soft); }

@media (max-width: 640px) {
  .entry-content { max-width: none; font-size: 1rem; line-height: 2.05; }
  .entry-content > p:first-of-type { padding-inline-start: 12px; font-size: 1.02rem; }
  .entry-content h2 { font-size: 1.22rem; }
  .entry-content h3 { font-size: 1.08rem; }
}

/* پاورقی نوشته */
.entry-footer {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.entry-footer-label {
  font-family: var(--ff-mono); font-size: .78rem; color: var(--text-faint);
}
.share { display: flex; gap: 7px; }
.share a, .share button {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
  transition: color .15s, border-color .15s; padding: 0;
}
.share a:hover, .share button:hover { color: var(--primary); border-color: var(--primary); }
.share button.is-done { color: var(--primary); border-color: var(--primary); }
.share svg { width: 17px; height: 17px; }
.hero-meta svg { width: 13px; height: 13px; opacity: .8; }

.author-box {
  display: flex; gap: 15px; margin-top: 24px; padding: 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.author-box img { width: 56px; height: 56px; border-radius: 12px; flex: none; border: 1px solid var(--border); }
.author-box h4 { margin: 0 0 5px; font-size: 1rem; }
.author-box p { margin: 0; font-size: .87rem; color: var(--text-soft); line-height: 1.85; }

/* ==========================================================================
   12. نظرات
   ========================================================================== */
.comments {
  margin-top: 26px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 28px 30px; box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) { .comments { padding: 20px 17px; } }
.comments-title { font-size: 1.2rem; margin-bottom: 20px; display: flex; align-items: center; gap: 9px; }
.comments-title .count {
  font-family: var(--ff-mono); background: var(--surface-2); color: var(--primary);
  font-size: .8rem; padding: 3px 11px; border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.comment-list .children {
  margin-inline-start: 36px; padding-inline-start: 16px;
  border-inline-start: 1px dashed var(--border-strong);
}
@media (max-width: 640px) { .comment-list .children { margin-inline-start: 14px; padding-inline-start: 10px; } }

.comment-body { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.comment-avatar img { width: 44px; height: 44px; border-radius: 10px; flex: none; background: var(--surface-2); border: 1px solid var(--border); }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; flex-wrap: wrap; }
.comment-author { font-weight: 800; color: var(--text); font-size: .94rem; }
.comment-author.is-author { color: var(--primary); }
.comment-author.is-author::after {
  content: "نویسنده"; font-family: var(--ff);
  font-size: .66rem; background: var(--primary-50); color: var(--primary);
  border: 1px solid var(--primary-100);
  padding: 1px 8px; border-radius: var(--radius-pill); margin-inline-start: 6px; font-weight: 700;
}
.comment-date { font-size: .74rem; color: var(--text-faint); }
.comment-text { font-size: .93rem; color: var(--text-soft); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-actions { margin-top: 5px; }
.comment-reply-link, .comment-actions a {
  font-family: var(--ff-mono); font-size: .78rem; font-weight: 600; color: var(--text-faint);
  display: inline-flex; align-items: center; gap: 5px;
}
.comment-reply-link::before { content: "↩"; }
.comment-reply-link:hover { color: var(--primary); }
.comment-awaiting-moderation { font-size: .8rem; color: var(--accent); }
.bypostauthor > .comment-body { background: var(--surface-2); border-radius: var(--radius); padding-inline: 14px; }

/* فرم‌ها */
.comment-respond, .irangeek-form { margin-top: 24px; }
.comment-respond .comment-reply-title { font-size: 1.1rem; margin-bottom: 6px; }
.comment-notes, .form-intro { font-size: .85rem; color: var(--text-soft); margin-bottom: 16px; line-height: 1.9; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 15px; }
.form-field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.form-field label .req { color: var(--error); }
.form-control,
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"],
.comment-form textarea {
  width: 100%; font-family: inherit; font-size: .93rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea.form-control, .comment-form textarea { min-height: 130px; resize: vertical; line-height: 1.9; }
.form-control:focus, .comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; padding-inline-start: 36px;
}
.form-hint { font-size: .76rem; color: var(--text-faint); margin-top: 6px; font-family: var(--ff-mono); }

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: .92rem;
  padding: 11px 22px; border: 1px solid var(--primary); border-radius: var(--radius-sm);
  background: var(--primary); color: #05130d;
  transition: background .15s, transform .1s, box-shadow .15s, color .15s;
}
:root[data-theme="light"] .btn { color: #fff; }
.btn:hover { background: var(--primary-600); border-color: var(--primary-600); color: #05130d; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 28%, transparent); }
:root[data-theme="light"] .btn:hover { color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border-strong); box-shadow: none; }
.btn--ghost:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary); box-shadow: none; }
.btn--block { width: 100%; }
.btn svg { width: 17px; height: 17px; }

/* پیام‌ها */
.notice {
  padding: 13px 17px; border-radius: var(--radius-sm); margin-bottom: 20px;
  font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 10px;
  border: 1px solid;
}
.notice svg { width: 19px; height: 19px; flex: none; }
.notice--success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.notice--error   { background: color-mix(in srgb, var(--error) 12%, transparent);   color: var(--error);   border-color: color-mix(in srgb, var(--error) 35%, transparent); }

/* ==========================================================================
   13. آرشیو / عنوان صفحه
   ========================================================================== */
.page-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 28px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline-end: 0;
  width: 240px; height: 240px; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, var(--primary-50), transparent 68%);
}
.page-hero > * { position: relative; }
.page-hero h1 { margin: 0 0 8px; font-size: 1.7rem; }
.page-hero .desc { color: var(--text-soft); margin: 0; max-width: 70ch; font-size: .93rem; }
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: .76rem; color: var(--text-faint); margin-bottom: 11px;
}
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border-strong); }

/* صفحه‌بندی */
.pagination { display: flex; justify-content: center; gap: 7px; margin-top: 32px; flex-wrap: wrap; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; width: 100%; }
.pagination .screen-reader-text { display: none; }
.pagination .page-numbers {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  font-weight: 600; color: var(--text-soft); font-size: .88rem;
  transition: color .15s, border-color .15s;
}
.pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page-numbers.current { background: var(--primary-50); color: var(--primary); border-color: var(--primary); }
.pagination .dots { border: 0; background: none; }

/* ==========================================================================
   14. فوتر
   ========================================================================== */
.site-footer {
  background: var(--surface); color: var(--text-soft);
  margin-top: 30px; border-top: 1px solid var(--border);
}
.footer-top {
  max-width: var(--container); margin-inline: auto; padding: 42px 20px 28px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 34px;
}
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 600px) {
  .footer-top { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-col h4 { font-size: .85rem; margin-bottom: 12px; }
  .footer-col ul a, .footer-contact .row, .footer-contact p { font-size: .8rem; }
  .footer-contact .row { gap: 6px; align-items: flex-start; }
}
.footer-col h4 {
  color: var(--text); font-size: .84rem; margin-bottom: 15px;
  font-family: var(--ff-mono); font-weight: 700; letter-spacing: .02em;
  display: flex; align-items: center; gap: 7px;
}
.footer-col h4::before { content: "//"; color: var(--primary); }
.footer-about p { color: var(--text-soft); font-size: .87rem; line-height: 1.95; margin: 14px 0 0; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul a { color: var(--text-soft); font-size: .87rem; }
.footer-col ul a:hover { color: var(--primary); }
.footer-contact .row { display: flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: .87rem; margin-bottom: 11px; }
.footer-contact .row a { color: inherit; }
.footer-contact .row a:hover { color: var(--primary); }
.footer-contact svg { width: 17px; height: 17px; flex: none; color: var(--primary); }
.footer-social { display: flex; gap: 9px; margin-top: 16px; }
.footer-social a, .footer-social-icon {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
  transition: color .15s, border-color .15s;
}
.footer-social a:hover { color: var(--primary); border-color: var(--primary); }
.footer-social svg { width: 17px; height: 17px; }

.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom-inner {
  max-width: var(--container); margin-inline: auto; padding: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  font-family: var(--ff-mono); font-size: .78rem; color: var(--text-faint);
}
.footer-bottom-inner b { color: var(--primary); font-weight: 700; }
.footer-credit { color: var(--text-faint); }
.footer-credit a { color: inherit; }
.footer-credit a:hover { color: var(--primary); }

/* ==========================================================================
   15. منوی کشویی موبایل
   ========================================================================== */
.menu-overlay {
  position: fixed; inset: 0; background: rgba(3,6,11,.66); z-index: 70;
  opacity: 0; visibility: hidden; transition: opacity .25s;
  backdrop-filter: blur(2px);
}
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }

.drawer-head { display: none; }
.drawer-head h3 { margin: 0; font-size: .95rem; font-family: var(--ff-mono); }

@media (max-width: 1023px) {
  .sidebar {
    position: fixed; top: 0; bottom: auto; right: 0; z-index: 80;
    height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh;
    width: min(86vw, 340px); background: var(--bg);
    transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
    box-shadow: var(--shadow-lg); padding: 16px 15px calc(40px + env(safe-area-inset-bottom));
    border-inline-start: 1px solid var(--border);
  }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar .sidebar-logo { display: none; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
}

/* ==========================================================================
   16. متفرقه
   ========================================================================== */
.back-to-top {
  position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 50;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface); color: var(--primary); border: 1px solid var(--border-strong);
  display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--primary); }
.back-to-top svg { width: 20px; height: 20px; }

.empty-state {
  text-align: center; padding: 56px 20px; color: var(--text-soft);
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.empty-state svg { width: 56px; height: 56px; color: var(--border-strong); margin-bottom: 14px; display: inline-block; }
.empty-state h2 { margin-bottom: 8px; font-size: 1.2rem; }
.empty-state p { font-size: .9rem; margin: 0; }

.skip-link {
  position: absolute; inset-block-start: -60px; inset-inline-start: 16px; z-index: 200;
  background: var(--primary); color: #05130d; padding: 10px 18px;
  border-radius: 0 0 10px 10px; transition: top .2s; font-weight: 700;
}
.skip-link:focus { inset-block-start: 0; color: #05130d; }

/* صفحه‌ی ۴۰۴ */
.error-404 { text-align: center; padding: 56px 24px; }
.error-404 .code {
  font-family: var(--ff-mono); font-size: 4.6rem; font-weight: 800;
  color: var(--primary); line-height: 1; letter-spacing: -.04em;
}
.error-404 .shell {
  font-family: var(--ff-mono); font-size: .85rem; color: var(--text-faint);
  margin: 10px 0 4px;
}

/* ادمین‌بار وردپرس */
@media (max-width: 1023px) { .admin-bar .topbar { top: 46px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
