/* سایت عریضه‌یار؛ همان رنگ‌ها و فونت اپ (web/src/styles.css).
 * همه‌ی اندازه‌ها از توکن‌های پایین می‌آیند: مقیاس فونت (--fs-*) با clamp بین گوشی و دسکتاپ،
 * فاصله‌ها (--sp-*) روی شبکه‌ی ۴ پیکسلی، و گوشه‌ها (--r-*). عدد خام فقط داخل همین توکن‌هاست. */
@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(/assets/fonts/vazirmatn_regular.ttf) format('truetype'); }
@font-face { font-family: Vazirmatn; font-weight: 500; font-display: swap; src: url(/assets/fonts/vazirmatn_medium.ttf) format('truetype'); }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url(/assets/fonts/vazirmatn_bold.ttf) format('truetype'); }

:root {
  /* رنگ */
  --ink: #1A1A1A; --gold: #C0A062; --gold-dark: #8C6F33; --gold-soft: #F6EEDD;
  --surface: #FFFFFF; --muted-bg: #F3F1EC; --bg: #FAFAF8; --outline: #E6E2D9;
  --text: #1A1A1A; --text-2: #5F5B53; --on-ink: #FFFFFF; --hero: #2A2722; --on-hero: #F1EEE7; --on-hero-2: #CFC8BA;
  --success: #2E7D4F; --success-soft: #E3F2E8; --warning: #8A5A00; --warning-soft: #FFF1D6; --danger: #B3261E;

  /* مقیاس فونت: گوشه‌ی کوچک (۳۶۰) تا بزرگ (۱۲۰۰) */
  --fs-xs: 0.8125rem;                                   /* ۱۳ */
  --fs-sm: 0.875rem;                                    /* ۱۴ */
  --fs-base: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);   /* ۱۵ → ۱۶ */
  --fs-md: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);     /* ۱۶ → ۱۸ */
  --fs-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);    /* ۱۷ → ۲۰ */
  --fs-h3: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);   /* ۱۷ → ۱۹ */
  --fs-h2: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);   /* ۲۲ → ۳۰ */
  --fs-h1: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem);     /* ۲۸ → ۴۴ */
  --fs-num: clamp(1.5rem, 1.3rem + 0.9vw, 1.875rem);    /* عددهای بزرگ: ۲۴ → ۳۰ */
  --lh-body: 1.9; --lh-tight: 1.45;

  /* فاصله (شبکه‌ی ۴) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --section: clamp(48px, 6vw, 80px);
  --gutter: 16px;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;
  --tap: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EDE7DA; --gold: #CDAE70; --gold-dark: #DCC08A; --gold-soft: #3A3122;
    --surface: #1E1D1A; --muted-bg: #2A2824; --bg: #141311; --outline: #38352E;
    --text: #F1EEE7; --text-2: #B3ADA1; --on-ink: #1A1A1A; --hero: #2A2722;
    --success: #7FC79B; --success-soft: #1F3326; --warning: #F0C46B; --warning-soft: #3A2E14; --danger: #F2B8B5;
  }
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Vazirmatn, Tahoma, sans-serif; font-size: var(--fs-base); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-dark); }
svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
h1, h2, h3 { line-height: var(--lh-tight); margin: 0; font-weight: 700; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0; }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.center { text-align: center; }
.sub { color: var(--text-2); font-size: var(--fs-md); margin: var(--sp-2) auto var(--sp-8); max-width: 640px; text-align: center; }
.muted { color: var(--text-2); }
.note { color: var(--text-2); font-size: var(--fs-sm); text-align: center; margin-top: var(--sp-4); }
section { padding-block: var(--section); }
.band { background: var(--surface); border-block: 1px solid var(--outline); }
.section-title { text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--tap); padding: 0 var(--sp-6); border-radius: var(--r-md);
  background: var(--ink); color: var(--on-ink); font: inherit; font-size: var(--fs-base); font-weight: 700; text-decoration: none; border: 1.5px solid var(--ink); cursor: pointer; }
.btn.outline { background: transparent; color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* نوار بالا و منوی گوشی */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--outline); }
.top-row { display: flex; align-items: center; gap: var(--sp-6); min-height: 64px; }
.logo { display: flex; align-items: center; gap: var(--sp-2); font-weight: 700; font-size: var(--fs-lg); color: var(--text); text-decoration: none; }
.logo img { width: 36px; height: 36px; border-radius: var(--r-sm); }
.nav { display: flex; gap: var(--sp-6); flex: 1; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: var(--fs-base); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.menu-btn { display: none; width: var(--tap); height: var(--tap); border: 0; background: none; color: var(--text); border-radius: var(--r-sm); cursor: pointer; }
.mobile-nav { display: none; }

/* معرفی */
.hero { padding-block: var(--sp-12) var(--section); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--sp-12); align-items: center; }
.eyebrow { display: inline-block; background: var(--gold-soft); color: var(--gold-dark); font-weight: 700; font-size: var(--fs-sm); padding: var(--sp-1) var(--sp-4); border-radius: var(--r-full); margin-bottom: var(--sp-4); }
.lead { font-size: var(--fs-lg); color: var(--text-2); margin: var(--sp-5) 0 var(--sp-8); max-width: 560px; }
.cta-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.ticks { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); color: var(--text-2); font-size: var(--fs-sm); }
.ticks li { display: flex; align-items: center; gap: var(--sp-1); }
.ticks svg { width: 18px; height: 18px; color: var(--success); }

.phone { justify-self: center; width: min(300px, 80vw); aspect-ratio: 9 / 19; border-radius: 40px; background: #1A1A1A; padding: 10px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); }
/* موکاپ صفحه‌ی «خانه»ی اپ (web/src/screens/Home.tsx)؛ اندازه‌ها ثابت‌اند چون گوشی همیشه یک اندازه است */
.screen { position: relative; height: 100%; border-radius: 31px; background: var(--bg); overflow: hidden; font-size: 10px; line-height: 1.75; }
.screen svg { width: 14px; height: 14px; }
.p-body { padding: 26px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.p-top { display: flex; align-items: center; gap: 8px; }
.p-top b { flex: 1; font-size: 15px; }
.p-plan { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border-radius: var(--r-full); background: var(--gold); color: #1A1A1A; font-weight: 700; }
.p-plan svg { width: 12px; height: 12px; }
.p-top > svg { width: 18px; height: 18px; }
.p-card { border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--outline); }
.p-card b { font-size: 12px; }
.p-hero { background: var(--hero); color: var(--on-hero); border: 0; }
.p-hero span { color: var(--on-hero-2); }
.p-btns { display: flex; gap: 6px; margin-top: 4px; }
.p-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-style: normal; font-weight: 700; padding: 6px 0; border-radius: 10px; background: #fff; color: #1A1A1A; }
.p-btn.ghost { background: none; color: var(--on-hero); border: 1px solid rgba(255,255,255,.35); }
.p-h { font-size: 12px; margin-top: 2px; }
.p-deadline { background: var(--success-soft); border: 0; }
.p-deadline small { color: var(--text-2); font-size: 9px; }
.p-big { font-size: 18px; line-height: 1.5; font-weight: 700; color: var(--success); }
.p-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.p-tiles i { font-style: normal; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: var(--surface); border: 1px solid var(--outline); border-radius: 14px; padding: 9px 10px; font-weight: 700; }
.p-tiles span, .p-nav span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-dark); }
.p-nav { position: absolute; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 4px 12px; background: var(--surface); border-top: 1px solid var(--outline); }
.p-nav i { font-style: normal; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--text-2); font-size: 9px; }
.p-nav span { width: 40px; height: 22px; border-radius: var(--r-full); background: none; color: var(--text-2); }
.p-nav i.on { color: var(--text); font-weight: 700; }
.p-nav i.on span { background: var(--gold-soft); color: var(--gold-dark); }

/* کارت‌ها */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.feature { position: relative; background: var(--bg); border: 1px solid var(--outline); border-radius: var(--r-lg); padding: var(--sp-6); }
.feature h3 { margin: var(--sp-3) 0 var(--sp-1); }
.feature p { color: var(--text-2); font-size: var(--fs-sm); }
.ic { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-md); background: var(--gold-soft); color: var(--gold-dark); }
.free { position: absolute; top: var(--sp-5); left: var(--sp-5); font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--success); background: var(--success-soft); padding: 0 var(--sp-3); border-radius: var(--r-full); }

.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.tool { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--outline); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--gold); transform: translateY(-2px); }
.tool svg { color: var(--gold-dark); margin-bottom: var(--sp-2); }
.tool b { font-size: var(--fs-h3); }
.tool span { color: var(--text-2); font-size: var(--fs-sm); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: var(--sp-8) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-6); border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--outline); }
.steps li::before { content: counter(s, persian); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-weight: 700; }
.steps b { font-size: var(--fs-h3); }
.steps span { color: var(--text-2); font-size: var(--fs-sm); }
.privacy-note { display: flex; gap: var(--sp-3); align-items: flex-start; margin-top: var(--sp-6); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); background: var(--gold-soft); }
.privacy-note svg { color: var(--gold-dark); margin-top: var(--sp-1); }

/* قیمت‌ها */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--outline); }
.plan.featured { border: 2px solid var(--gold); }
.plan .badge { position: absolute; top: -13px; right: var(--sp-5); background: var(--gold); color: #1A1A1A; font-size: var(--fs-xs); font-weight: 700; padding: 0 var(--sp-3); border-radius: var(--r-full); }
.price { font-size: var(--fs-num); font-weight: 700; }
.price small { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.plan ul { list-style: none; padding: 0; margin: var(--sp-2) 0 var(--sp-4); color: var(--text-2); font-size: var(--fs-sm); flex: 1; display: flex; flex-direction: column; gap: var(--sp-1); }
.plan li { display: flex; gap: var(--sp-2); align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; color: var(--success); margin-top: 5px; }

.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.dl { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-6); border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--outline); }
.dl p, .dl ol { color: var(--text-2); font-size: var(--fs-sm); flex: 1; }
.dl ol { padding-inline-start: var(--sp-5); margin: 0; }
.dl .btn { align-self: flex-start; }

.faq { display: flex; flex-direction: column; gap: var(--sp-3); }
.faq details { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--r-md); padding: 0 var(--sp-5); }
.faq summary { cursor: pointer; font-weight: 700; padding: var(--sp-3) 0; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3); min-height: var(--tap); align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold-dark); font-size: var(--fs-lg); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--text-2); padding-bottom: var(--sp-4); }

/* فرم‌ها (تماس و ماشین‌حساب‌ها) */
.form { display: flex; flex-direction: column; gap: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: var(--sp-1); font-weight: 500; }
.field .help { color: var(--text-2); font-size: var(--fs-xs); font-weight: 400; }
.input, .select { font: inherit; font-size: 16px; font-weight: 400; min-height: var(--tap); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--outline); background: var(--bg); color: var(--text); width: 100%; }
textarea.input { min-height: 120px; line-height: 1.8; }
.input:focus, .select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.input.ltr { direction: ltr; text-align: right; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: var(--tap); cursor: pointer; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--gold-dark); flex: none; }
.form .btn { align-self: flex-start; }
.form-status { min-height: 1.9em; font-weight: 500; }
.ok { color: var(--success); }
.err { color: var(--danger); }

/* راهنماها: کارت دسته، فهرست فشرده و جستجو */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-3); }
.cat-card { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--outline); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.cat-card .ic { flex: none; width: 48px; height: 48px; }
.cat-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.cat-head b { font-size: var(--fs-h3); }
.cat-head small { flex: none; padding: 2px var(--sp-2); border-radius: var(--r-full); background: var(--gold-soft); color: var(--gold-dark); font-size: var(--fs-xs); font-weight: 700; }
.cat-intro { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-go svg { width: 20px; height: 20px; color: var(--text-2); transition: transform .15s, color .15s; }
.cat-card:hover .cat-go svg { color: var(--gold-dark); transform: translateX(-3px); }
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-3); }
.guide-row { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--outline); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.guide-row:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.guide-row b { font-size: var(--fs-md); line-height: 1.6; }
.g-cat { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-2) 2px var(--sp-3); border-radius: var(--r-full); background: var(--gold-soft); color: var(--gold-dark); font-size: var(--fs-xs); font-weight: 700; }
.g-cat svg { width: 14px; height: 14px; }
.g-sum { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-more { margin-top: auto; padding-top: var(--sp-1); display: inline-flex; align-items: center; gap: 2px; color: var(--gold-dark); font-size: var(--fs-sm); font-weight: 700; }
.g-more svg { width: 18px; height: 18px; transition: transform .15s; }
.guide-row:hover .g-more svg { transform: translateX(-3px); }
.guide-row[hidden], .guide-list[hidden], .guide-browse[hidden], .guide-empty[hidden] { display: none; }
.guide-search { max-width: 560px; margin: 0 auto var(--sp-6); }
.guide-empty { margin: var(--sp-4) 0; }

/* دیدگاه‌ها */
.comments { display: flex; flex-direction: column; gap: var(--sp-3); }
.comment { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--r-md); padding: var(--sp-4); }
.comment header { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--sp-2); }
.comment header b { color: var(--text); }
.comment p { white-space: pre-line; color: var(--text); }
.comment .answer { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); background: var(--gold-soft); }
.comment .answer b { display: block; font-size: var(--fs-sm); color: var(--gold-dark); margin-bottom: var(--sp-1); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

/* انتخابگر و برگه‌ی پایین (به‌جای فهرست بومی مرورگر؛ همان شکل اپ) */
.picker { display: flex; align-items: center; gap: var(--sp-2); text-align: start; cursor: pointer; }
.picker > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker.empty > span:first-child { color: var(--text-2); }
.picker-chevron { transform: rotate(90deg); color: var(--text-2); font-size: var(--fs-lg); line-height: 1; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 560px; max-height: 80vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 0 var(--sp-1) var(--sp-3); font-size: var(--fs-md); }
.sheet-close { width: 40px; height: 40px; border: 0; border-radius: var(--r-sm); background: var(--muted-bg); color: var(--text); font-size: var(--fs-lg); cursor: pointer; }
.sheet-list { overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--outline); border-radius: var(--r-md); }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); width: 100%; min-height: 52px; padding: var(--sp-2) var(--sp-4); border: 0; border-top: 1px solid var(--outline); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-base); text-align: start; cursor: pointer; }
.sheet-list > .sheet-row:first-child { border-top: 0; }
.sheet-row:hover { background: var(--muted-bg); }
.sheet-row[aria-selected="true"] { background: var(--gold-soft); color: var(--gold-dark); font-weight: 700; }
.sheet-group { padding: var(--sp-3) var(--sp-4) var(--sp-1); font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); background: var(--muted-bg); }
@media (min-width: 641px) { .scrim { align-items: center; } .sheet { border-radius: var(--r-lg); max-height: 70vh; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); } }

/* صفحه‌ی ابزار */
.crumbs { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--sp-4); }
.crumbs a { color: var(--text-2); }
.tool-hero { padding-block: var(--sp-10) var(--sp-6); }
.tool-hero p { color: var(--text-2); font-size: var(--fs-md); margin-top: var(--sp-3); max-width: 680px; }
.tool-hero .meta { font-size: var(--fs-sm); }
.calc { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--r-lg); padding: var(--sp-6); }
.result { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.result:empty { display: none; }
.headline { background: var(--gold-soft); border-radius: var(--r-md); padding: var(--sp-4); }
.headline small { display: block; color: var(--text-2); font-size: var(--fs-sm); }
.headline b { font-size: var(--fs-num); }
.r-sec h3 { font-size: var(--fs-sm); color: var(--text-2); margin: var(--sp-2) 0 0; }
.r-row { padding-block: var(--sp-2); border-bottom: 1px solid var(--outline); }
.r-row > div { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
.r-row .v { font-weight: 700; text-align: left; flex: none; max-width: 55%; }
.r-row .n { display: block; color: var(--text-2); font-size: var(--fs-xs); margin-top: 2px; }
.r-row.strong { font-size: var(--fs-md); }
.box { border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); }
.box.warn { background: var(--warning-soft); color: var(--warning); }
.box.info { background: var(--muted-bg); }
.box ul { margin: var(--sp-1) 0 0; padding-inline-start: var(--sp-5); }
.doc { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--outline); border-radius: var(--r-md); padding: var(--sp-4); font-size: var(--fs-base); }
.picks { display: flex; flex-direction: column; gap: var(--sp-2); }
.pick { display: flex; align-items: center; gap: var(--sp-2); background: var(--bg); border: 1px solid var(--outline); border-radius: var(--r-md); padding: var(--sp-1) var(--sp-3); }
.pick span { flex: 1; }
.pick button { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--outline); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.article { display: flex; flex-direction: column; gap: var(--sp-4); }
.article h2 { font-size: var(--fs-lg); margin-top: var(--sp-4); }
.article p, .article li { color: var(--text-2); }
.article ol { list-style: persian; }
.article ol li::marker { font-weight: 700; color: var(--gold-dark); }
.article ul, .article ol { margin: 0; padding-inline-start: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-1); }
.example { background: var(--gold-soft); border-radius: var(--r-md); padding: var(--sp-4); color: var(--text); }
.related { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.related a { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--r-full); padding: var(--sp-1) var(--sp-4); text-decoration: none; color: var(--text); font-size: var(--fs-sm); }
.cta-box { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); text-align: center; background: var(--hero); color: var(--on-hero); border-radius: var(--r-lg); padding: var(--sp-8) var(--sp-6); }
.cta-box p { color: var(--on-hero-2); }
.cta-box .btn { background: var(--on-hero); color: #1A1A1A; border-color: var(--on-hero); }

.legal p { color: var(--text-2); margin-bottom: var(--sp-4); }
.legal h1 { margin: var(--sp-6) 0 var(--sp-5); }

.foot { padding-block: var(--sp-8); color: var(--text-2); font-size: var(--fs-sm); }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.foot nav { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.foot a { color: var(--text-2); text-decoration: none; }

@media (max-width: 960px) {
  .grid, .tools { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .nav, .top .btn.small { display: none; }
  .menu-btn { display: inline-grid; place-items: center; margin-inline-start: auto; }
  .mobile-nav[data-open="true"] { display: flex; flex-direction: column; padding: var(--sp-2) var(--gutter) var(--sp-4); border-top: 1px solid var(--outline); }
  .mobile-nav a { min-height: var(--tap); display: flex; align-items: center; color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--outline); }
  .mobile-nav .btn { margin-top: var(--sp-3); color: var(--on-ink); border: 0; }
}
@media (max-width: 640px) {
  .grid, .tools, .steps, .downloads, .row2 { grid-template-columns: 1fr; }
  .cta-row .btn, .form .btn { flex: 1 1 100%; align-self: stretch; }
  .calc { padding: var(--sp-4); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tool { transition: none; } }
