/* ==============================================================================
   دخلو — سایتِ معرفی، راهنما و دانلود (راند ۱۱۴)
   یک فایلِ مشترک برای dakhlo.ir، help.dakhlo.ir و download.dakhlo.ir (از /assets/ ِ هر سه سرو می‌شود).
   هیچ استایلِ درون‌خطی در HTMLها نیست: CSP ِ این دامنه‌ها style-src 'self' است.
   رنگ‌ها همان برنامه: سرمه‌ای (#0f172a) + سبزِ زمرّدی (#10b981).
   ============================================================================== */

@font-face { font-family: 'Vazirmatn'; src: url('fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0f172a;
  --accent: #10b981;
  --accent-ink: #047857;
  --accent-soft: #e7f8f1;
  --warn-soft: #fff7e6;
  --warn-ink: #92400e;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2c;
    --surface-2: #17223a;
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --line: #233149;
    --brand: #f8fafc;
    --accent: #34d399;
    --accent-ink: #6ee7b7;
    --accent-soft: #0b3328;
    --warn-soft: #3a2a0c;
    --warn-ink: #fcd34d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: 'ss01';
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
.num, [dir="ltr"] { unicode-bidi: isolate; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- سربرگ ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo small { font-weight: 400; font-size: 13px; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.nav a { color: var(--ink-2); padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.top-actions { display: flex; gap: 8px; margin-inline-start: auto; align-items: center; }
.top .menu-toggle, .help-side .help-toc-toggle { display: none; }

/* ---------- دکمه ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; line-height: 1.6;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--bg); }
.btn-primary:hover { opacity: .92; }
.btn-accent { background: var(--accent); color: #04261b; }
.btn-accent:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 13px 24px; font-size: 16px; }

/* ---------- صفحه‌ی اصلی: hero ---------- */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.45; letter-spacing: -.3px; }
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 34em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* نمونه‌ی فاکتور (فقط HTML/CSS؛ تصویر نیست) */
.mock {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 18px 18px 52px; font-size: 14px; position: relative;
}
.mock-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-title { margin-inline-start: 8px; font-weight: 700; }
.mock-chip { margin-inline-start: auto; font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); padding: 2px 10px; border-radius: 999px; }
.mock table { width: 100%; border-collapse: collapse; }
.mock th { text-align: start; font-weight: 400; color: var(--muted); font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.mock td { padding: 8px 4px; border-bottom: 1px dashed var(--line); }
.mock td.n { text-align: end; font-variant-numeric: tabular-nums; }
.mock-total { display: flex; justify-content: space-between; margin-top: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-weight: 700; }
.mock-pay { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.mock-pay span { font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; color: var(--ink-2); }
.mock-float {
  position: absolute; inset-inline-start: -18px; bottom: -22px; background: var(--brand); color: var(--bg);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow);
}
.mock-float b { display: block; font-size: 17px; }

/* ---------- بخش‌ها ---------- */
section { padding: 64px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { color: var(--ink-2); font-size: 17px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
section.alt .card { background: var(--bg); }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { color: var(--ink-2); margin: 0; font-size: 15px; }
.card .ic {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.card .ic svg { width: 22px; height: 22px; }
.card ul { margin: 8px 0 0; padding-inline-start: 18px; color: var(--ink-2); font-size: 15px; }
.card ul li { margin-bottom: 2px; }

/* برای چه کسانی */
.who .card { display: flex; flex-direction: column; }
.who .tag { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 12px; }

/* گام‌ها */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { list-style: none; counter-increment: s; position: relative; padding: 20px 20px 20px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  content: counter(s, persian); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: var(--bg); font-weight: 700; margin-bottom: 10px;
}
.steps { padding: 0; margin: 0; }
.steps h3 { font-size: 17px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- تعرفه ---------- */
.pricing { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.price-card .big { font-size: 40px; font-weight: 700; line-height: 1.3; }
.price-card .big small { font-size: 16px; font-weight: 400; color: var(--muted); }
.price-card ul { padding-inline-start: 20px; color: var(--ink-2); }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.calc label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.calc-out { margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.calc-out .total { font-size: 28px; font-weight: 700; }
.calc-out .per { font-size: 14px; color: var(--muted); }
.badge-save { display: inline-block; font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 1px 8px; margin-inline-start: 6px; }

/* ---------- پرسش‌ها ---------- */
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px;
}
section.alt .faq details { background: var(--bg); }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: left; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--ink-2); }

/* ---------- نوارِ پایانی ---------- */
.band { background: var(--brand); color: var(--bg); border-radius: 20px; padding: 36px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band h2 { color: var(--bg); margin: 0 0 6px; }
.band p { margin: 0; opacity: .85; }
.band .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }

/* ---------- پانویس ---------- */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
footer h4 { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 4px; }
footer a { color: var(--ink-2); }
.enamad-slot { margin-top: 12px; min-height: 0; }
.copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }

/* ---------- صفحه‌های متنی (قوانین) ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: 40px 16px 64px; }
.doc h1 { font-size: 30px; }
.doc h2 { font-size: 21px; margin-top: 32px; }
.doc ul { padding-inline-start: 22px; color: var(--ink-2); }
.doc li { margin-bottom: 6px; }
.doc .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; }
.doc .toc ol { margin: 0; padding-inline-start: 20px; }

/* ---------- راهنما ---------- */
.help { display: grid; grid-template-columns: 270px 1fr; gap: 32px; padding-top: 24px; padding-bottom: 64px; }
.help-side { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; padding-bottom: 16px; }
.help-search { width: 100%; font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.help-toc { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14.5px; }
.help-toc > li { margin-bottom: 10px; }
.help-toc > li > span { font-weight: 700; color: var(--ink); display: block; margin-bottom: 2px; }
.help-toc ul { list-style: none; margin: 0; padding: 0 10px 0 0; border-inline-start: 2px solid var(--line); }
.help-toc a { display: block; color: var(--ink-2); padding: 3px 10px; border-radius: 6px; }
.help-toc a:hover { background: var(--surface-2); text-decoration: none; }
.help-toc a.active { color: var(--accent-ink); font-weight: 700; }
.help-toc .hidden { display: none; }
.help-main { min-width: 0; }
.help-main article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 18px; scroll-margin-top: 80px; }
.help-main article.hidden { display: none; }
.help-main article h2 { font-size: 22px; }
.help-main article h3 { font-size: 17px; margin-top: 20px; }
.help-main article p, .help-main article li { color: var(--ink-2); }
.help-main article ol, .help-main article ul { padding-inline-start: 22px; }
.help-main article li { margin-bottom: 4px; }
.help-group-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 28px 0 10px; letter-spacing: .2px; }
.help-group-title:first-child { margin-top: 0; }
.tip, .note {
  border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: 15px;
}
.tip { background: var(--accent-soft); color: var(--accent-ink); }
.note { background: var(--warn-soft); color: var(--warn-ink); }
.tip p, .note p { color: inherit; margin: 0; }
kbd {
  font-family: inherit; font-size: 13px; direction: ltr; unicode-bidi: isolate; display: inline-block;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--surface-2); color: var(--ink);
}
.path { font-weight: 700; color: var(--ink); }
.empty-search { display: none; padding: 24px; text-align: center; color: var(--muted); }
.empty-search.show { display: block; }
.feature-req { display: inline-block; font-size: 12px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-inline-start: 6px; vertical-align: middle; font-weight: 400; }
table.keys { border-collapse: collapse; width: 100%; font-size: 15px; }
table.keys td, table.keys th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: start; }
table.keys th { color: var(--muted); font-weight: 400; font-size: 13px; }

/* ---------- دانلود ---------- */
.dl-hero { padding: 48px 0 24px; text-align: center; }
.dl-hero h1 { font-size: clamp(28px, 4vw, 40px); }
.dl-hero p { color: var(--ink-2); font-size: 17px; max-width: 40em; margin: 0 auto; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 32px; }
.dl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; }
.dl-card h2 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.dl-card h2 svg { width: 24px; height: 24px; color: var(--accent-ink); }
.dl-card ol { padding-inline-start: 20px; color: var(--ink-2); font-size: 15px; }
.dl-card .soon { margin-top: auto; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.dl-card.featured { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dl-files { padding-bottom: 64px; }
.dl-files table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dl-files th, .dl-files td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: start; font-size: 15px; }
.dl-files th { color: var(--muted); font-weight: 400; font-size: 13px; background: var(--surface-2); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 960px) {
  .hero .wrap, .pricing { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps, .dl-grid { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  .help { grid-template-columns: 1fr; }
  .help-side { position: static; max-height: none; }
  .help-toc { display: none; }
  .help-side .help-toc-toggle { display: inline-flex; width: 100%; margin-top: 8px; }
  .help-side.open .help-toc { display: block; }
  .mock-float { inset-inline-start: 8px; }
}
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 12px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 8px; }
  .top .menu-toggle { display: inline-flex; }
  .top-actions .btn-ghost.hide-sm { display: none; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .hero { padding-top: 36px; }
  .band { padding: 24px; }
  .help-main article { padding: 18px 16px; }
  .mock { font-size: 13px; }
}
@media (max-width: 420px) {
  .logo small { display: none; }
  .top-actions .btn { padding: 8px 12px; font-size: 14px; }
}
@media print {
  .top, footer, .help-side { display: none; }
  .help { display: block; }
  .help-main article { break-inside: avoid; border: 0; }
}
.cta-center { justify-content: center; }
.copy:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
