/* ==========================================================================
   خودرونویس — استایل اصلی
   وبلاگ خودروهای مقرون‌به‌صرفه ایران
   ========================================================================== */

/* ---------- فونت ---------- */
@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");

/* ---------- متغیرها ---------- */
:root {
  --bg: #f6f4ef;
  --bg-alt: #efece4;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #131a1c;
  --ink-soft: #33403f;
  --muted: #6b7a79;
  --line: #e2ded4;
  --line-soft: #ece8de;

  --brand: #0e6b5e;
  --brand-ink: #0a4f45;
  --brand-soft: #e3f1ee;
  --accent: #c85a34;
  --accent-soft: #fbeee8;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(19, 26, 28, .05), 0 6px 18px -12px rgba(19, 26, 28, .18);
  --shadow-md: 0 2px 6px rgba(19, 26, 28, .06), 0 24px 48px -28px rgba(19, 26, 28, .35);
  --max: 1160px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="dark"] {
  --bg: #0c1113;
  --bg-alt: #101618;
  --surface: #141b1e;
  --surface-2: #172025;
  --ink: #e9efee;
  --ink-soft: #c3cecc;
  --muted: #8b9b99;
  --line: #243034;
  --line-soft: #1d272b;

  --brand: #4ec3ac;
  --brand-ink: #7ad9c5;
  --brand-soft: #102b28;
  --accent: #e88a63;
  --accent-soft: #2a1a14;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px -16px rgba(0, 0, 0, .8);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, .45), 0 28px 56px -30px rgba(0, 0, 0, .9);
}

/* ---------- ریست ---------- */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  font-feature-settings: "ss01";
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  line-height: 1.45;
  margin: 0 0 .5em;
  font-weight: 800;
  letter-spacing: -.2px;
}

p { margin: 0 0 1.15em; }

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.skip {
  position: absolute;
  top: -70px;
  inset-inline-start: 1rem;
  background: var(--brand);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 200;
  border-radius: 0 0 10px 10px;
  transition: top .22s var(--ease);
}
.skip:focus { top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- نوار بالای صفحه ---------- */
.topbar {
  background: var(--ink);
  color: #e9efee;
  font-size: .78rem;
  letter-spacing: .2px;
}
.topbar .wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: .5rem;
  flex-wrap: wrap;
}
.topbar span { opacity: .82; }
.topbar b { color: #fff; font-weight: 700; }
.topbar .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #46d3a9;
  margin-inline-end: .45rem;
  box-shadow: 0 0 0 3px rgba(70, 211, 169, .18);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(70, 211, 169, .18); }
  50% { box-shadow: 0 0 0 6px rgba(70, 211, 169, .04); }
}

/* ---------- هدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: .85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 900;
  font-size: 1.18rem;
  letter-spacing: -.4px;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--brand), var(--brand-ink));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 16px -8px var(--brand);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand small {
  display: block;
  font-size: .62rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .5px;
  margin-top: -4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-inline-start: auto;
  font-size: .92rem;
  font-weight: 600;
}
.nav a {
  padding: .45rem .8rem;
  border-radius: 9px;
  color: var(--ink-soft);
  transition: background-color .2s, color .2s;
}
.nav a:hover { background: var(--bg-alt); color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.header-tools { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, color .2s;
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.icon-sun { display: none; }

.menu-btn { display: none; }

/* ---------- هیرو ---------- */
.hero { padding-block: 3rem 1rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr .85fr;
  gap: 1.6rem;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: .7rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* کارت شاخص */
.feature {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.feature:hover { transform: translateY(-4px); }

.feature .thumb { height: 268px; border-radius: 0; }
.feature-body { padding: 1.6rem 1.7rem 1.7rem; }

.feature h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  margin-bottom: .55rem;
}
.feature h2 a { transition: color .2s; }
.feature h2 a:hover { color: var(--brand); }
.feature p { color: var(--muted); font-size: .97rem; margin-bottom: 1.1rem; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  font-size: .8rem;
  color: var(--muted);
}
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  letter-spacing: .2px;
}
.tag.alt { background: var(--accent-soft); color: var(--accent); }

/* تصویرهای گرادیانی */
.thumb {
  position: relative;
  display: block;
  height: 190px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-alt);
}
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(255, 255, 255, .32), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 9px);
  z-index: 2;
}
.thumb .car {
  position: absolute;
  inset-inline: 0;
  bottom: 14%;
  width: 66%;
  max-width: 360px;
  margin-inline: auto;
  color: rgba(255, 255, 255, .92);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .28));
  z-index: 3;
  transition: transform .5s var(--ease);
}
.feature .thumb .car { width: 56%; max-width: 480px; }
.card:hover .thumb .car, .feature:hover .thumb .car { transform: translateX(-6px) scale(1.02); }

.t-1 { background: linear-gradient(135deg, #0e6b5e, #0a3b3a 60%, #07262b); }
.t-2 { background: linear-gradient(135deg, #2b4a7a, #1b2b4d 65%, #101a2e); }
.t-3 { background: linear-gradient(135deg, #b4522f, #7d3320 65%, #3d1a12); }
.t-4 { background: linear-gradient(135deg, #4b5d3a, #2c3a24 65%, #1a2216); }
.t-5 { background: linear-gradient(135deg, #5c4470, #35263f 65%, #1c1422); }
.t-6 { background: linear-gradient(135deg, #7a6a2e, #4a3f18 65%, #26200c); }

/* ستون کنار هیرو */
.hero-side {
  display: grid;
  gap: 1.1rem;
  position: sticky;
  top: 96px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.panel h3 {
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px dashed var(--line);
}
.panel h3 svg { width: 17px; height: 17px; color: var(--accent); }

.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; display: grid; gap: .1rem; }
.rank li { counter-increment: r; }
.rank a {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: .6rem .3rem;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.6;
  transition: background-color .2s, color .2s;
}
.rank a::before {
  content: counter(r, persian);
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 800;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--muted);
  transition: background-color .2s, color .2s;
}
.rank a:hover { background: var(--surface-2); color: var(--brand); }
.rank a:hover::before { background: var(--brand); color: #fff; }

.mini-note {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.75;
  margin: .4rem 0 0;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
}

/* ---------- بخش‌ها ---------- */
.section { padding-block: 3.2rem; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin: 0;
  position: relative;
  padding-inline-start: .9rem;
}
.section-head h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .28em;
  bottom: .28em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--brand), var(--accent));
}
.section-head p { margin: 0; color: var(--muted); font-size: .88rem; max-width: 46ch; }

/* ---------- گرید کارت‌ها ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}
.card-body { padding: .9rem .6rem .5rem; flex: 1; display: flex; flex-direction: column; }
.card h3 {
  font-size: 1.06rem;
  line-height: 1.6;
  margin-bottom: .45rem;
}
.card h3 a { transition: color .2s; }
.card h3 a:hover { color: var(--brand); }
.card p { font-size: .87rem; color: var(--muted); margin-bottom: 1rem; }
.card .meta { margin-top: auto; font-size: .76rem; }

/* ---------- جدول مقایسه ---------- */
.table-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-scroll { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 680px;
}
thead th {
  background: var(--bg-alt);
  text-align: right;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--ink-soft);
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .2s; }
tbody tr:hover { background: var(--surface-2); }
td strong { font-weight: 800; }
td .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  white-space: nowrap;
}
.pill.good { background: var(--brand-soft); color: var(--brand); }
.pill.warn { background: var(--accent-soft); color: var(--accent); }

/* ---------- جعبه‌ها ---------- */
.callout {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem 1rem 1.2rem;
  margin: 1.6rem 0;
  font-size: .92rem;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brand);
  background: var(--surface-2);
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--brand); }
.callout.warn { border-inline-start-color: var(--accent); background: var(--accent-soft); }
.callout.warn strong { color: var(--accent); }

/* ---------- چک‌لیست ---------- */
.checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .9rem 1.6rem;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}
.checklist li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: .92rem;
  color: var(--ink-soft);
}
.checklist svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: .28rem;
  color: var(--brand);
}

/* ---------- خبرنامه ---------- */
.subscribe {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0e6b5e, #0a3f3c 55%, #08262c);
  color: #eaf6f3;
  padding: 2.4rem 2.2rem;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-md);
}
.subscribe::before {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
}
.subscribe h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); color: #fff; margin-bottom: .5rem; }
.subscribe p { color: rgba(234, 246, 243, .78); font-size: .9rem; margin: 0; }
.subscribe form { display: flex; gap: .5rem; position: relative; z-index: 2; }
.subscribe input {
  flex: 1;
  min-width: 0;
  padding: .8rem 1rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: inherit;
  font-size: .9rem;
}
.subscribe input::placeholder { color: rgba(255, 255, 255, .55); }
.subscribe input:focus { outline: 2px solid rgba(255, 255, 255, .5); outline-offset: 2px; }
.subscribe button {
  padding: .8rem 1.3rem;
  border: 0;
  border-radius: 11px;
  background: #fff;
  color: #0a4f45;
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s;
  white-space: nowrap;
}
.subscribe button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6); }

/* ---------- فوتر ---------- */
.site-footer {
  margin-top: 3.5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-block: 3rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-grid h4 {
  font-size: .85rem;
  letter-spacing: .3px;
  margin-bottom: 1rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-grid a { font-size: .87rem; color: var(--muted); transition: color .2s; }
.footer-grid a:hover { color: var(--brand); }
.footer-about p { font-size: .86rem; color: var(--muted); max-width: 34ch; }
.footer-bottom {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: .78rem;
  color: var(--muted);
}
.credit {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .38rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}
.credit::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.credit b {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: -.1px;
}

/* ==========================================================================
   صفحه مقاله
   ========================================================================== */

.progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  z-index: 200;
  transition: width .1s linear;
}

.article-hero { padding-block: 2.2rem 1.4rem; }
.breadcrumb {
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb svg { width: 12px; height: 12px; opacity: .5; }

.article-hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  line-height: 1.4;
  max-width: 22ch;
  margin-bottom: .9rem;
}
.lede {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.9;
  margin-bottom: 1.4rem;
}
.byline {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-size: .82rem;
  color: var(--muted);
}
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand), var(--brand-ink));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .95rem;
  flex-shrink: 0;
}
.byline b { color: var(--ink); display: block; font-size: .87rem; }

.article-cover {
  margin-block: 1.6rem 2.4rem;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.article-cover .thumb { height: clamp(220px, 34vw, 380px); border-radius: 0; }
.article-cover .thumb .car { width: 58%; bottom: 14%; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 3rem;
  padding-bottom: 3rem;
}

.prose { font-size: 1.02rem; color: var(--ink-soft); }

/* متن برای خوانایی محدود می‌شود، اما جدول‌ها و شکل‌ها تمام عرض ستون را می‌گیرند */
.prose > p,
.prose > ul,
.prose > ol,
.prose > h2,
.prose > h3,
.prose > blockquote,
.prose > .callout,
.prose > .faq,
.prose > .meters,
.prose > .author-box { max-width: 68ch; }
.prose > p:first-of-type::first-letter { font-size: 1em; }
.prose h2 {
  font-size: 1.4rem;
  margin: 2.4rem 0 .9rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  scroll-margin-top: 100px;
}
.prose h3 {
  font-size: 1.1rem;
  margin: 1.7rem 0 .6rem;
  color: var(--ink);
  scroll-margin-top: 100px;
}
.prose ul, .prose ol { padding-inline-start: 1.3rem; margin: 0 0 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose strong { color: var(--ink); font-weight: 800; }
.prose a:not(.btn) { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--accent); }

.prose blockquote {
  margin: 1.8rem 0;
  padding: 1.1rem 1.3rem;
  border-inline-start: 3px solid var(--brand);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .97rem;
  color: var(--ink-soft);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure { margin: 2rem 0; }
.prose figure .table-wrap { margin: 0; }
.prose figcaption {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .7rem;
  text-align: center;
}

/* فهرست مطالب */
.toc {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.toc h4 {
  font-size: .78rem;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: .9rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.toc h4 svg { width: 15px; height: 15px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; display: grid; gap: .1rem; }
.toc li { counter-increment: t; }
.toc a {
  display: block;
  font-size: .84rem;
  line-height: 1.6;
  padding: .42rem .5rem .42rem .55rem;
  border-radius: 8px;
  color: var(--muted);
  border-inline-start: 2px solid transparent;
  transition: color .2s, background-color .2s, border-color .2s;
}
.toc a::before {
  content: counter(t, persian) ". ";
  font-weight: 700;
  opacity: .55;
}
.toc a:hover { color: var(--ink); background: var(--surface-2); }
.toc a.active {
  color: var(--brand);
  background: var(--brand-soft);
  border-inline-start-color: var(--brand);
  font-weight: 700;
}

.toc-cta {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.7;
}

/* باکس نویسنده */
.author-box {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  margin-top: 2.6rem;
}
.author-box .avatar { width: 54px; height: 54px; font-size: 1.05rem; }
.author-box h4 { font-size: .95rem; margin-bottom: .3rem; }
.author-box p { font-size: .84rem; color: var(--muted); margin: 0; line-height: 1.8; }

/* سوالات متداول */
.faq { margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .1rem 1.1rem;
  transition: border-color .25s, box-shadow .25s;
}
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer;
  padding: .9rem 0;
  font-weight: 700;
  font-size: .93rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform .25s var(--ease);
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { font-size: .89rem; color: var(--muted); margin: 0 0 .95rem; padding-bottom: .2rem; }

/* مقاله‌های مرتبط */
.related { padding-block: 2.6rem; border-top: 1px solid var(--line); }

/* ---------- نوار امتیاز ---------- */
.meters { display: grid; gap: .8rem; margin: 1.6rem 0 1rem; }
.meter-row {
  display: grid;
  grid-template-columns: 160px 1fr 42px;
  gap: .9rem;
  align-items: center;
  font-size: .86rem;
}
.meter-label { color: var(--ink-soft); font-weight: 600; }
.meter-track {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-alt);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.meter-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-ink), var(--brand));
}
.meter-fill.alt { background: linear-gradient(90deg, var(--accent), #e8a06a); }
.meter-val {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--muted);
  text-align: left;
  font-size: .82rem;
}

/* ---------- دکمه ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem 1.3rem;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s, background-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px var(--brand); background: var(--brand-ink); }
.btn svg { width: 16px; height: 16px; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); box-shadow: none; }

/* ---------- انیمیشن ورود ---------- */
/* بدون جاوااسکریپت، محتوا همیشه دیده می‌شود؛ انیمیشن فقط وقتی js فعال است اعمال می‌شود */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   واکنش‌گرا
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { position: static; grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .toc { position: static; order: -1; }
  .toc ol { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .subscribe { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .topbar .wrap { justify-content: center; text-align: center; font-size: .72rem; }
  .topbar .hide-sm { display: none; }

  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    padding: .5rem 1.25rem 1.15rem;
    gap: .15rem;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: .8rem .9rem; font-size: 1rem; border-radius: 12px; }

  .menu-btn { display: grid; }
  .header-inner { gap: .7rem; }
  .header-tools { margin-inline-start: auto; }
  .brand small { display: none; }

  .hero { padding-block: 1.8rem .5rem; }
  .feature .thumb { height: 200px; }
  .feature-body { padding: 1.2rem 1.15rem 1.35rem; }

  .hero-side { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .checklist { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .footer-about { grid-column: 1 / -1; }
  .subscribe { padding: 1.7rem 1.3rem; }
  .subscribe form { flex-direction: column; }
  .subscribe button { width: 100%; }
  .toc ol { grid-template-columns: 1fr; }
  .meter-row { grid-template-columns: 1fr 42px; gap: .5rem .7rem; }
  .meter-label { grid-column: 1 / -1; margin-bottom: -.2rem; }
  .section { padding-block: 2.2rem; }

  /* نشانه اسکرول افقی جدول در موبایل */
  .table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 36px;
    background: linear-gradient(to right, var(--surface), transparent);
    pointer-events: none;
  }
  .article-hero { padding-block: 1.4rem 1rem; }
  .author-box { flex-direction: column; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ورود / ثبت‌نام
   ========================================================================== */

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .2s var(--ease), border-color .2s, color .2s, background-color .2s;
}
.btn-login:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--brand);
}
.btn-login[aria-current="page"] { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn-login svg { width: 17px; height: 17px; flex-shrink: 0; }

.auth-wrap { padding-block: 2.6rem 4rem; }

.auth-shell {
  display: grid;
  grid-template-columns: 452px minmax(0, 1fr);
  max-width: 1010px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.auth-card { padding: 2.2rem 2.1rem 2rem; }

.auth-title { font-size: 1.45rem; margin-bottom: .35rem; }
.auth-sub { font-size: .88rem; color: var(--muted); margin-bottom: 1.6rem; }

.tabs {
  display: flex;
  gap: .3rem;
  background: var(--bg-alt);
  padding: .28rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: .58rem .5rem;
  border-radius: 9px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: .42rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: .72rem .9rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field input::placeholder { color: var(--muted); opacity: .7; }
.field input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field .hint { font-size: .74rem; color: var(--muted); margin-top: .35rem; }
.field .err { font-size: .74rem; color: var(--accent); margin-top: .35rem; display: none; }
.field.invalid input { border-color: var(--accent); }
.field.invalid input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid .err { display: block; }

.pw-wrap { position: relative; }
/* ورودی رمز dir=ltr است؛ دکمه چشم همیشه سمت چپ فیزیکی قرار می‌گیرد */
.field .pw-wrap input[type="password"],
.field .pw-wrap input[type="text"] { padding-right: .9rem; padding-left: 2.9rem; }
.pw-toggle {
  position: absolute;
  inset-inline-end: .35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
}
.pw-toggle:hover { color: var(--brand); background: var(--bg-alt); }
.pw-toggle svg { width: 17px; height: 17px; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .2rem 0 1.3rem;
  font-size: .82rem;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  cursor: pointer;
}
.check input {
  appearance: none;
  width: 17px; height: 17px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after {
  content: "";
  width: 9px; height: 5px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translate(1px, -1px);
}
.link-muted { color: var(--brand); font-weight: 700; }
.link-muted:hover { text-decoration: underline; }

.btn-block {
  width: 100%;
  justify-content: center;
  padding: .82rem 1rem;
  font-size: .92rem;
}

.auth-status {
  margin-top: 1.2rem;
  border-radius: 12px;
  padding: .9rem 1rem;
  font-size: .84rem;
  line-height: 1.8;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.auth-status:empty { display: none; }
.auth-status.ok { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: var(--brand-soft); color: var(--brand-ink); }
.auth-status.bad { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.auth-status b { display: block; margin-bottom: .4rem; font-size: .9rem; letter-spacing: -.1px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.4rem 0;
  font-size: .74rem;
  color: var(--muted);
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-aside {
  position: relative;
  overflow: hidden;
  padding: 2.4rem 2.1rem;
  background: linear-gradient(150deg, #0e6b5e, #0a3f3c 55%, #08262c);
  color: #eaf6f3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}
.auth-aside::before {
  content: "";
  position: absolute;
  inset-inline-start: -80px;
  bottom: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 65%);
}
.auth-aside h2 { font-size: 1.5rem; color: #fff; margin-bottom: .6rem; }
.auth-aside p { color: rgba(234, 246, 243, .8); font-size: .9rem; }
.auth-aside .eyebrow { color: #ffd2bf; }
.auth-aside .eyebrow::before { background: #ffd2bf; }

.auth-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; position: relative; z-index: 2; }
.auth-list li {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .87rem;
  color: rgba(234, 246, 243, .9);
}
.auth-list svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: .25rem; color: #7fe0c9; }

.auth-note {
  font-size: .76rem !important;
  color: rgba(234, 246, 243, .62) !important;
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 1rem;
  margin: 0;
  position: relative;
  z-index: 2;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .auth-aside { order: 2; padding: 1.7rem 1.6rem; gap: 1.4rem; }
  .auth-aside h2 { font-size: 1.2rem; }
  .auth-list { display: none; }
  .auth-card { padding: 1.7rem 1.5rem 1.6rem; }
}

@media (max-width: 860px) {
  .btn-login { padding: .5rem; width: 38px; height: 38px; justify-content: center; }
  .btn-login span { display: none; }
  .auth-wrap { padding-block: 1.4rem 2.5rem; }
}

/* ---------- ورود با گوگل ---------- */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .8rem 1rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, background-color .2s;
}
.btn-google:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: color-mix(in srgb, var(--ink) 20%, var(--line));
}
.btn-google:active { transform: none; }
.btn-google .g-icon { width: 18px; height: 18px; flex-shrink: 0; }
[data-theme="dark"] .btn-google {
  background: #131314;
  color: #e3e3e3;
  border-color: #3c4043;
}

/* کارت حساب پس از ورود موفق */
.signed-in {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  background: var(--brand-soft);
  border-radius: 13px;
  margin-bottom: 1.2rem;
}
.signed-in img,
.signed-in .initials {
  width: 42px; height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
}
.signed-in b { display: block; font-size: .9rem; color: var(--ink); }
.signed-in span { font-size: .78rem; color: var(--muted); }
.signed-in .out {
  margin-inline-start: auto;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  background: var(--surface);
  color: var(--brand);
  border-radius: 9px;
  padding: .38rem .7rem;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.signed-in .out:hover { background: var(--brand); color: #fff; }
