/* ============================================================================
   ظاهر سایت تیم آزاد
   راست‌به‌چپ · فونت وزیرمتن (هاست‌شده) · تم روشن و تاریک · بدون وابستگی بیرونی
   ========================================================================= */

/* --- فونت ---------------------------------------------------------------- */
/* وزیرمتن، subset‌شده به فارسی و لاتین. `swap` یعنی متن بلافاصله دیده می‌شود
   و وقتی فونت رسید جایگزین می‌شود — نه صفحهٔ خالی، نه پرش چیدمان. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --- توکن‌های رنگ --------------------------------------------------------
   پالت روشن روی `:root` تعریف می‌شود. تاریک دو بار می‌آید: یک‌بار برای
   حالت «سیستم» و یک‌بار برای وقتی کاربر صریحاً تاریک را انتخاب کرده.
   هیچ رنگی فقط داخل بلوک تاریک تعریف نمی‌شود. */
:root {
  --bg:        #ffffff;
  --bg-soft:   #f6f8fb;
  --bg-elev:   #ffffff;
  --fg:        #0d1219;
  --fg-muted:  #5a6672;
  --line:      #e4e9f0;
  --line-soft: #eef2f7;

  --accent:      #2563eb;
  --accent-2:    #7c3aed;
  --accent-fg:   #ffffff;
  --accent-soft: #eaf1ff;

  --ok:     #0f7a45;
  --warn:   #9a5b06;
  --danger: #c0342b;

  --radius:    16px;
  --radius-sm: 10px;
  --wrap:      1140px;

  --shadow-sm: 0 1px 2px rgb(13 18 25 / 6%);
  --shadow:    0 2px 4px rgb(13 18 25 / 4%), 0 12px 32px rgb(13 18 25 / 7%);
  --shadow-lg: 0 4px 8px rgb(13 18 25 / 5%), 0 24px 56px rgb(13 18 25 / 12%);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: .18s;
  --slow: .5s;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0b0f15;
    --bg-soft:   #10151d;
    --bg-elev:   #151b25;
    --fg:        #e9eef5;
    --fg-muted:  #93a1b1;
    --line:      #222c3a;
    --line-soft: #1a2230;

    --accent:      #6098ff;
    --accent-2:    #a78bfa;
    --accent-fg:   #080d14;
    --accent-soft: #152340;

    --ok:     #4ecf8e;
    --warn:   #e5a94f;
    --danger: #ff8080;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow:    0 2px 4px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 35%);
    --shadow-lg: 0 4px 8px rgb(0 0 0 / 35%), 0 24px 56px rgb(0 0 0 / 45%);
  }
}

:root[data-theme="dark"] {
  --bg:        #0b0f15;
  --bg-soft:   #10151d;
  --bg-elev:   #151b25;
  --fg:        #e9eef5;
  --fg-muted:  #93a1b1;
  --line:      #222c3a;
  --line-soft: #1a2230;

  --accent:      #6098ff;
  --accent-2:    #a78bfa;
  --accent-fg:   #080d14;
  --accent-soft: #152340;

  --ok:     #4ecf8e;
  --warn:   #e5a94f;
  --danger: #ff8080;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow:    0 2px 4px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 35%);
  --shadow-lg: 0 4px 8px rgb(0 0 0 / 35%), 0 24px 56px rgb(0 0 0 / 45%);
}

/* --- پایه ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

/* عنصری که `display` صریح دارد، `[hidden]` پیش‌فرض مرورگر را می‌پوشاند. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Vazirmatn", "IRANSans", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  /* عمداً `ss01` وزیرمتن را روشن نمی‌کنیم: آن ست، هر رقم لاتین را با گلیف
     فارسی نشان می‌دهد و کد تیکت `TK2DD91F` را به شکل `TK۲DD۹۱F` درمی‌آورد —
     متن درست است ولی خواندن و مقایسه‌اش گیج‌کننده می‌شود. ارقامی که باید
     فارسی دیده شوند، در خود کد تبدیل می‌شوند (فیلتر `fa` و تابع `fa()`). */
  -webkit-font-smoothing: antialiased;
  transition: background var(--fast) linear, color var(--fast) linear;
}

a { color: var(--accent); text-decoration: none; transition: color var(--fast) var(--ease); }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.4; margin: 0 0 .6rem; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.06rem; }
p  { margin: 0 0 1rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .45em;
  font-size: .87em;
  /* بدون `isolate`، متن لاتین داخل جملهٔ فارسی جابه‌جا رندر می‌شود. */
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(2rem, 4.5vw, 3.25rem); }
.muted { color: var(--fg-muted); }
.prose { max-width: 68ch; }
.empty { padding: 2rem 0; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head p { margin: 0; }

.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus {
  inset-inline-start: 1rem; top: 1rem; z-index: 20;
  background: var(--accent); color: var(--accent-fg);
  padding: .5rem 1rem; border-radius: var(--radius-sm);
}

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

/* --- حرکت ----------------------------------------------------------------
   ظاهرشدن با اسکرول. اسکریپت کلاس `.in` را اضافه می‌کند؛ اگر جاوااسکریپت
   خاموش باشد `.reveal` هرگز مخفی نمی‌شود (پایین ببینید). */
.reveal { opacity: 0; transform: translateY(18px); }
.js .reveal { transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* روی موبایل کوتاه‌تر و کم‌جابه‌جایی‌تر: با اسکرول سریعِ انگشت، انیمیشن نیم‌ثانیه‌ای
   یعنی کاربر لحظه‌ای صفحهٔ خالی می‌بیند. */
@media (max-width: 640px) {
  .reveal { transform: translateY(10px); }
  .js .reveal { transition-duration: .32s; }
}

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

/* --- نوار بالا ------------------------------------------------------------ */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast) linear, background var(--fast) linear;
}
.topbar.stuck { border-bottom-color: var(--line); }
.topbar-in { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 66px; }
.topbar-in > .logo { margin-inline-end: auto; }

.logo { display: flex; align-items: center; gap: .6rem; color: var(--fg); font-weight: 700; white-space: nowrap; }
.logo:hover { text-decoration: none; }
/* لوگو خودش شکل دارد و کادر نمی‌خواهد — کادر گرد قبلی فقط دور یک حرف بود. */
.logo-mark {
  display: grid; place-items: center;
  transition: transform var(--fast) var(--ease);
}
.logo-mark svg { display: block; }
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) {
  .logo:hover .logo-mark { transform: none; }
}

.nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.nav > a:not(.btn) {
  color: var(--fg-muted); font-size: .94rem; font-weight: 500;
  padding: .4rem .7rem; border-radius: var(--radius-sm);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.nav > a:not(.btn):hover { color: var(--fg); background: var(--bg-soft); text-decoration: none; }
.nav > a[aria-current="page"] { color: var(--accent); }

.top-actions { display: flex; align-items: center; gap: .4rem; flex: none; }

.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--fg-muted);
  cursor: pointer; padding: 0;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

[data-theme-toggle] .icon-dark { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .icon-dark { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .icon-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .icon-dark { display: block; }
  :root:not([data-theme="light"]) [data-theme-toggle] .icon-light { display: none; }
}

/* دکمهٔ منو فقط روی موبایل. خط‌های همبرگر با باز شدن به ضربدر تبدیل می‌شوند. */
.nav-toggle { display: none; }
.nav-toggle svg path { transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease); transform-origin: center; }
.nav-toggle[aria-expanded="true"] .bar-top { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar-mid { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar-bot { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 780px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; inset-block-start: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--bg-elev);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: .6rem; margin-top: .4rem;
    box-shadow: var(--shadow-lg);
    /* بسته: نه دیده می‌شود نه فوکوس می‌گیرد. */
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease), visibility var(--fast);
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
  .nav > a:not(.btn) { padding: .6rem .8rem; font-size: .98rem; }
  .nav > .btn { margin-top: .35rem; justify-content: center; }
}

/* --- دکمه‌ها -------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--fg);
  border-radius: var(--radius-sm);
  padding: .65rem 1.3rem;
  font: inherit; font-weight: 600; line-height: 1.5;
  cursor: pointer; white-space: nowrap;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
              border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2)));
  color: var(--accent-fg); border-color: transparent;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 32%, transparent);
}
.btn-primary:hover { box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 42%, transparent); border-color: transparent; }
.btn-sm { padding: .38rem .85rem; font-size: .88rem; }
.btn-lg { padding: .85rem 1.8rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* --- هیرو ---------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
/* هالهٔ رنگی پس‌زمینه — آرام می‌چرخد، در reduced-motion ثابت می‌ماند. */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0;
  border-radius: 50%; filter: blur(90px); opacity: .5;
  pointer-events: none;
}
.hero::before {
  width: 46rem; height: 32rem; inset-block-start: -14rem; inset-inline-end: -10rem;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  animation: drift 22s var(--ease) infinite alternate;
}
.hero::after {
  width: 34rem; height: 26rem; inset-block-start: 4rem; inset-inline-start: -12rem;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 68%);
  opacity: .32;
  animation: drift 26s var(--ease) infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4rem, 3rem, 0) scale(1.12); }
}
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px; padding: .28rem .9rem;
  font-size: .84rem; font-weight: 600; margin-bottom: 1rem;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--fg-muted); max-width: 58ch; }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-block: 1.75rem; }

/* --- آمار ---------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 2.25rem 0 0; }
.stats > div {
  background: color-mix(in srgb, var(--bg-elev) 85%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  backdrop-filter: blur(8px);
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.stats > div:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.stats dt { color: var(--fg-muted); font-size: .87rem; }
.stats dd { margin: .2rem 0 0; font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* --- آیکون‌ها ------------------------------------------------------------- */

.icon { display: block; flex: none; }

/* قاب آیکون: مربع نرم با پس‌زمینهٔ کم‌رنگ. اندازه‌اش همه‌جا یکی است، برخلاف
   ایموجی که هر کدام عرض و ارتفاع خودش را داشت. */
.icon-box {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.icon-box.lg { width: 60px; height: 60px; border-radius: 18px; }
.card:hover .icon-box, .feature:hover .icon-box { transform: scale(1.06); }

/* --- کارت‌ها -------------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.card-icon { font-size: 1.7rem; display: block; margin-bottom: .55rem; }
.card p:last-child { margin-bottom: 0; }

/* --- مراحل --------------------------------------------------------------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.steps li { position: relative; border-inline-start: 2px solid var(--line); padding-inline-start: 1.1rem; }
.steps li::before {
  content: ""; position: absolute; inset-inline-start: -2px; top: 0; width: 2px; height: 2.2rem;
  background: linear-gradient(var(--accent), transparent);
}
.step-n { display: block; color: var(--accent); font-weight: 700; font-size: 1.25rem; line-height: 1.6; }
.steps p { margin: .2rem 0 0; }

/* --- چیپ‌ها -------------------------------------------------------------- */

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.chip {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: .35rem .95rem; font-size: .9rem;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
a.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* --- سوالات متداول -------------------------------------------------------- */

.faq { display: grid; gap: .6rem; }
.faq details {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .95rem 1.15rem;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.faq details:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
/* علامت باز/بسته با CSS کشیده می‌شود، نه با گلیف — تا به فونت وابسته نباشد. */
.faq summary::after {
  content: ""; flex: none; position: relative;
  width: 13px; height: 13px;
  background:
    linear-gradient(var(--accent), var(--accent)) center/13px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center/2px 13px no-repeat;
  transition: transform var(--fast) var(--ease);
}
.faq details[open] summary::after { background-size: 13px 2px, 0 0; }
.faq details[open] summary { margin-bottom: .6rem; }
.faq details > p { margin: 0; color: var(--fg-muted); animation: fade-in var(--slow) var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* --- پروژه‌ها ------------------------------------------------------------ */

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.1rem; }

.project {
  position: relative; display: flex; flex-direction: column; gap: .85rem;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem;
  color: inherit; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.project::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--slow) var(--ease);
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); text-decoration: none; }
.project:hover::before { transform: scaleX(1); }

.project.flagship { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.project.flagship::before { transform: scaleX(1); }

/* کارت خودش `gap` دارد؛ حاشیهٔ پیش‌فرض `p` و `ul` روی آن سوار می‌شد و هر
   فاصله را سه برابر می‌کرد (۱۶ + ۱۳٫۶ + ۱۶ به‌جای ۱۳٫۶). روی موبایل که
   کارت‌ها تک‌ستونی می‌شوند، همین چند صد پیکسل به طول صفحه اضافه می‌کرد. */
.project > * { margin-block: 0; }

.project-top { display: flex; align-items: flex-start; gap: .8rem; }
.project-icon {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-soft); font-size: 1.4rem;
}
.project-title { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.project-title strong { font-size: 1.1rem; font-weight: 700; }
.project-title span { font-size: .87rem; color: var(--fg-muted); }

/* عمداً در جریان عادی است، نه `position: absolute`. قبلاً روی گوشهٔ بالا
   می‌نشست — دقیقاً همان‌جا که آیکون و عنوان کارت هستند — و رویشان می‌افتاد.
   با هر عرضی و هر طول متنی، حالا هیچ‌وقت روی چیزی نمی‌افتد. */
.badge-pill {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-radius: 999px;
  padding: .12rem .6rem; font-size: .72rem; font-weight: 600;
}
.badge-soft {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--fg-muted);
  border-radius: 999px; padding: .12rem .6rem; font-size: .74rem; font-weight: 600;
}
.badge-trial { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); border-color: transparent; }

.project-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.project-tags li { list-style: none; }
.tag {
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: .18rem .55rem; font-size: .78rem; color: var(--fg-muted);
}

.project-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding-top: .3rem; }
.price { font-size: 1.22rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price small { font-size: .78rem; font-weight: 500; color: var(--fg-muted); margin-inline-start: .2rem; }
.price-old { color: var(--fg-muted); text-decoration: line-through; font-size: .88rem; font-weight: 500; margin-inline-end: .4rem; }
.project-more { color: var(--accent); font-size: .88rem; font-weight: 600; }

/* صفحهٔ جزئیات پروژه */
.project-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem); }
.project-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(60rem 22rem at 80% -20%, var(--accent-soft), transparent 65%);
}
.project-hero .wrap { position: relative; z-index: 1; }
.project-hero-top { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.project-hero-icon {
  display: grid; place-items: center; width: 66px; height: 66px; border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 18%, transparent));
  font-size: 2rem; flex: none;
}
.meta-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }

.buy-box {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.35rem 1.6rem;
  box-shadow: var(--shadow);
}
.buy-price { display: flex; flex-direction: column; gap: .15rem; }
.buy-price .price { font-size: 1.7rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.1rem; }
.feature {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.35rem;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.feature:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); transform: translateY(-2px); }
.feature h3 { margin-bottom: .3rem; display: flex; align-items: center; gap: .55rem; }
/* لوزی کوچک، با CSS نه با گلیف. */
.feature h3::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: rotate(45deg);
}
.feature p { margin: 0; color: var(--fg-muted); font-size: .95rem; }

/* --- پشتیبان‌ها و قواعد --------------------------------------------------- */

.agents { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.agents li {
  display: flex; align-items: center; gap: 1rem; justify-content: space-between; flex-wrap: wrap;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .75rem 1.15rem;
  transition: border-color var(--fast) var(--ease);
}
.agents li:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.agent-name { font-weight: 600; }
.rating { font-variant-numeric: tabular-nums; }

.rules { color: var(--fg-muted); padding-inline-start: 1.2rem; }
.rules li { margin-bottom: .45rem; }

.notice {
  max-width: 62rem;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius); padding: 1.4rem 1.6rem;
}
.notice h2 { margin-top: 0; }

.band {
  position: relative; overflow: hidden; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 3rem;
  padding: clamp(2rem, 5vw, 3.25rem) 1.5rem;
}
.band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40rem 16rem at 50% 120%, var(--accent-soft), transparent 70%);
}
.band > * { position: relative; }

.link { font-weight: 600; }
.link::after { content: " ←"; transition: margin var(--fast) var(--ease); }
.link:hover::after { margin-inline-start: .2rem; }

/* --- ثبت‌نام و ورود ------------------------------------------------------- */

.auth-wrap { max-width: 34rem; margin-inline: auto; }
.auth-card { margin-block: 1.5rem; }

.form {
  display: grid; gap: 1rem;
  /* بدون `minmax(0, …)` ستون تا اندازهٔ محتوا کش می‌آید و جدول سرویس‌ها روی
     موبایل کل کارت را از صفحه بیرون می‌زند — نوار اسکرافل افقیِ داخل جدول
     وقتی کار می‌کند که ظرفش اجازهٔ کوچک‌شدن داشته باشد. */
  grid-template-columns: minmax(0, 1fr);
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.form h3 { margin: 0; }
.form .btn { justify-self: start; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .92rem; font-weight: 600; }
.hint { font-size: .82rem; color: var(--fg-muted); }

input[type="text"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .68rem .85rem;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.otp { font-size: 1.55rem; text-align: center; letter-spacing: .55em; padding-inline-start: .55em; }

.progress { display: flex; gap: .4rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.progress li {
  flex: 1; font-size: .78rem; color: var(--fg-muted);
  border-top: 3px solid var(--line); padding-top: .45rem; text-align: center;
  transition: color var(--slow) var(--ease), border-color var(--slow) var(--ease);
}
.progress li.on { color: var(--accent); border-top-color: var(--accent); font-weight: 600; }

/* --- راهنمای گام‌به‌گامِ ثبت‌نام ---
   قبلاً فقط یک جملهٔ کوچک بود («در ربات /start را بزنید») و کسی که با ربات
   تلگرام کار نکرده بود همان‌جا می‌ماند: نه می‌دانست کدام ربات، نه اینکه
   «دستور زدن» یعنی چه. حالا کادر خودش را دارد، بالای فیلد. */
.howto {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  display: grid;
  gap: .7rem;
}
.howto-title { font-size: .98rem; }
.howto-steps {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: grid;
  gap: .55rem;
  font-size: .92rem;
  line-height: 1.85;
}
.howto-steps li::marker { color: var(--accent); font-weight: 700; }
.howto-steps code { font-size: .88em; }
/* دکمهٔ رفتن به ربات باید تمام‌عرض و غیرقابل‌ازدست‌دادن باشد — همان کاری است
   که کاربر در این مرحله باید بکند. */
.howto-cta { justify-self: stretch; text-align: center; }

/* «کد را گم کردم» جواب دارد ولی نباید مرحلهٔ اصلی را شلوغ کند. */
.faq-mini { font-size: .88rem; color: var(--fg-muted); }
.faq-mini summary { cursor: pointer; color: var(--accent); }
.faq-mini p { margin: .5rem 0 0; line-height: 1.9; }

.waiting { display: flex; gap: 1rem; align-items: flex-start; }
.waiting p { margin: .25rem 0 0; }
.pulse {
  flex: none; width: 14px; height: 14px; margin-top: .45rem; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: ping 1.8s ease-out infinite;
}
.countdown { font-variant-numeric: tabular-nums; margin: 0; font-size: .85rem; }

.error, .ok {
  border-radius: var(--radius-sm); padding: .75rem 1rem; margin-top: 1rem; font-size: .92rem;
  animation: fade-in var(--fast) var(--ease);
}
.error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.ok    { background: color-mix(in srgb, var(--ok) 14%, transparent);     color: var(--ok); }

/* --- حساب کاربری --------------------------------------------------------- */

.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; }
.kv dt { color: var(--fg-muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 600; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.ticket-rows { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.ticket-rows a {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem 1.15rem; color: inherit;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.ticket-rows a:hover { border-color: var(--accent); transform: translateX(-3px); text-decoration: none; }
.ticket-subject { font-weight: 600; }

.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }

/* --- پاورقی -------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-block: 2.5rem; margin-top: 3rem; }
.footer-in { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer p { margin: .25rem 0 0; }
.footer-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: var(--fg-muted); font-size: .93rem; }
.footer-nav a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .topbar-in { min-height: 58px; }
  .buy-box { flex-direction: column; align-items: stretch; }
  .buy-box .btn { width: 100%; }
  .cta .btn { flex: 1; }

  /* --- ریتم عمودی روی موبایل ---------------------------------------------
     روی دسکتاپ محتوا در دو یا سه ستون پخش می‌شود و این فاصله‌ها «هوا» است.
     روی موبایل همه‌چیز در یک ستون می‌افتد و همان فاصله‌ها صفحه را چند برابر
     بلند می‌کنند — یعنی کاربر برای دیدن همان محتوا چند برابر اسکرول می‌کند. */

  body { line-height: 1.72; }
  h1, h2, h3 { line-height: 1.28; }
  p { margin-block-end: .8rem; }

  .section { padding-block: 1.75rem; }
  .section-head { margin-bottom: .9rem; }

  /* هیرو روی موبایل بلندتر از خودِ صفحه می‌شد (۹۲۹ در برابر ۸۴۴)، یعنی
     کاربر بدون اسکرول هیچ محتوایی نمی‌دید. */
  .hero { padding-block: 2.25rem 1.75rem; }

  .card, .project, .feature { padding: 1.15rem; }
  .cards, .projects, .features { gap: .8rem; }

  .stats { gap: .7rem; margin-block-start: 1.5rem; }
  .stats > div { padding: .8rem .95rem; }
  .stats dd { font-size: 1.5rem; }
}

/* --- نوار پنل نمایندگی ---------------------------------------------------- */
/* بخش جداست، نه یکی از کارت‌های شبکه — پس شکلش هم عمداً فرق دارد. */
.panel-band {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  background: var(--bg-elev);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.panel-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(36rem 14rem at 100% 0%, var(--accent-soft), transparent 70%);
}
.panel-band:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.panel-band > * { position: relative; }
.panel-band-body { display: flex; flex-direction: column; gap: .45rem; flex: 1; min-width: 15rem; }
.panel-band-body strong { font-size: 1.2rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.panel-band-cta { display: flex; flex-direction: column; align-items: stretch; gap: .6rem; text-align: center; }
.panel-band-cta .price { font-size: 1rem; }

/* --- مقایسه ------------------------------------------------------------- */
.compare { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.compare li {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1.2rem;
  transition: border-color var(--fast) var(--ease);
}
.compare li:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.compare-before { color: var(--fg-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.compare-arrow { color: var(--accent); font-weight: 700; }
.compare-after { font-weight: 600; }

@media (max-width: 640px) {
  .compare li { grid-template-columns: 1fr; gap: .25rem; text-align: start; }
  .compare-arrow { display: none; }
  .compare-after::before { content: "← "; color: var(--accent); }
  .panel-band { padding: 1.3rem; }
  .panel-band-cta { width: 100%; }
}

/* عنوان کادر نکته، با آیکون هم‌تراز */
.notice-head { margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; color: var(--accent); }

/* آیکون داخل دکمه و برچسب */
.btn .icon { margin-inline-end: -.15rem; }
.badge-soft .icon { display: inline-block; vertical-align: -2px; }

/* --- جدول سرویس‌ها ------------------------------------------------------- */
.svc-balance {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .7rem 1rem;
}
.svc-balance strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* جدول روی موبایل باید داخل خودش اسکرول شود، نه اینکه صفحه را پهن کند. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.svc-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.svc-table th, .svc-table td { text-align: start; padding: .55rem .6rem; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
/* ستون وضعیت طولانی‌ترین متن را دارد («قطع (اتمام موجودی)») و اگر نشکند،
   جدول را روی موبایل بی‌دلیل پهن می‌کند. */
.svc-table td:last-child { white-space: normal; }
/* روی موبایل چهار ستون جا نمی‌شود و ستون وضعیت — که مهم‌ترین است — له
   می‌شود. پس تاریخ انقضا حذف می‌شود (چون ستون وضعیت همان را خواناتر می‌گوید)
   و «نوع» زیرِ نام می‌رود. */
.svc-table .row-sub { display: none; }
@media (max-width: 560px) {
  .svc-table .col-expire, .svc-table .col-type { display: none; }
  .svc-table .row-sub {
    display: block; font-size: .82rem; color: var(--fg-muted);
    margin-top: .15rem; white-space: normal;
  }
}
.svc-table th { color: var(--fg-muted); font-weight: 600; font-size: .85rem; }
.svc-table tr:last-child td { border-bottom: 0; }
.good { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--danger); }

.svc-block { margin-bottom: 1rem; }
.svc-block .row-between h3 { margin: 0; }
