/* Public site colours on top of the panel's tokens (app.css). Light first; the dark look follows the device or the
   visitor's choice in the header (owner's request 2026-11-08), on screen only, so printing always stays light. */
:root { --solid: #1E40AF; --solid-dark: #1E3A8A; --foot-bg: #0F172A; --ok-ink: #166534; --warn-ink: #92400E;
  --tint-ink: #1E40AF; --card-line: #E2E8F0; --band: #F8FAFC; }
/* «گزینه ۱، فیروزه‌ای» (owner's choice 2026-11-08): a third colour for the page ground, section bands, icon circles and
   card borders; the admin picks it or the old look in «بخش‌ها و امکانات» (data-palette on <html>). */
:root[data-palette="teal"] { --bg: #F0FDFA; --primary-soft: #CCFBF1; --tint-ink: #0F766E; --card-line: #99F6E4; --band: #F0FDFA; }
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1220; --surface: #101A2C; --surface-muted: #0D1626;
    --text: #E6ECF5; --text-label: #CBD5E1; --text-muted: #A7B4C8;
    --primary: #8DB0FF; --primary-dark: #C5D6FF; --primary-soft: #1B2C50; --primary-line: #3D5FAE;
    --accent: #C2410C; --accent-soft: #3B2010;
    --border: #22314D; --border-input: #2E4166; --border-chip: #364A70; --divider: #182339; --chevron: #64748B;
    --success: #4ADE80; --success-soft: #0E2A1A; --success-line: #166534;
    --warning: #FBBF24; --warning-soft: #2E220A; --warning-line: #92400E;
    --danger: #F87171; --danger-soft: #2E1215; --danger-line: #7F1D1D;
    --neutral: #CBD5E1; --neutral-soft: #1A2436;
    --solid: #2F5BEA; --solid-dark: #2449C7; --foot-bg: #070C16; --ok-ink: #86EFAC; --warn-ink: #FCD34D;
    --tint-ink: #8DB0FF; --card-line: #22314D; --band: #0D1626;
    color-scheme: dark;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --bg: #0B1220; --surface: #101A2C; --surface-muted: #0D1626;
    --text: #E6ECF5; --text-label: #CBD5E1; --text-muted: #A7B4C8;
    --primary: #8DB0FF; --primary-dark: #C5D6FF; --primary-soft: #1B2C50; --primary-line: #3D5FAE;
    --accent: #C2410C; --accent-soft: #3B2010;
    --border: #22314D; --border-input: #2E4166; --border-chip: #364A70; --divider: #182339; --chevron: #64748B;
    --success: #4ADE80; --success-soft: #0E2A1A; --success-line: #166534;
    --warning: #FBBF24; --warning-soft: #2E220A; --warning-line: #92400E;
    --danger: #F87171; --danger-soft: #2E1215; --danger-line: #7F1D1D;
    --neutral: #CBD5E1; --neutral-soft: #1A2436;
    --solid: #2F5BEA; --solid-dark: #2449C7; --foot-bg: #070C16; --ok-ink: #86EFAC; --warn-ink: #FCD34D;
    --tint-ink: #8DB0FF; --card-line: #22314D; --band: #0D1626;
    color-scheme: dark;
  }
}

/* صفحه اول سایت، قوانین و حریم خصوصی. Tokens and buttons come from app.css. */

body.site { background: var(--surface); }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.wrap.narrow { width: min(860px, calc(100% - 32px)); }
.site-head { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.head-row { min-height: 72px; display: flex; align-items: center; gap: 20px; }
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary-dark); font-size: 19px; font-weight: 800; }
.site-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--solid); color: var(--on-dark); display: flex; align-items: center; justify-content: center; }
.site-nav { flex: 1; display: flex; gap: 4px; }
.site-nav a { min-height: 44px; display: flex; align-items: center; padding: 0 12px; color: var(--text-label); text-decoration: none; font-weight: 500; border-radius: var(--r-small); }
.site-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
/* Menu groups (owner 2026-11-07): on a computer the submenu opens on hover, focus or its arrow button. */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-sub-btn { min-width: 32px; min-height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0;
  color: var(--text-label); cursor: pointer; border-radius: var(--r-small); }
.nav-sub-btn:hover { background: var(--primary-soft); }
.nav-sub { display: none; position: absolute; top: 100%; inset-inline-start: 0; z-index: 20; min-width: 200px; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 6px; box-shadow: 0 12px 24px rgba(15,23,42,0.12); }
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub, .nav-group.open .nav-sub { display: flex; }
.head-actions { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; }
@media (max-width: 899px) {
  .head-row { gap: 8px; min-height: 64px; }
  .site-brand { font-size: 17px; }
  .site-nav { display: none; position: absolute; top: 64px; inset-inline: 0; background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 8px 16px 16px; box-shadow: 0 12px 24px rgba(15,23,42,0.12); }
  .site-nav.open { display: flex; }
  .site-nav a { min-height: 48px; font-size: 16px; }
  /* In the phone menu each group's items show indented under it. */
  .nav-group { flex-direction: column; align-items: stretch; }
  .nav-sub-btn { display: none; }
  .nav-sub { display: flex; position: static; min-width: 0; border: 0; box-shadow: none; padding: 0; padding-inline-start: 20px; }
  .nav-sub a { font-size: 15px; color: var(--text-muted); }
}

.hero { background: var(--bg); padding: 56px 0; }
.hero-row { display: flex; align-items: center; gap: 48px; }
.hero-text { flex: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pill { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--tint-ink); background: var(--primary-soft); border-radius: 999px; padding: 4px 12px; }
.hero h1 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.55; font-weight: 800; color: var(--primary-dark); }
.hero p { font-size: 17px; line-height: 2; color: var(--text-label); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.big { height: var(--cta); font-size: 17px; padding: 0 24px; border-radius: var(--r-button); }
.small-note { font-size: 13px; color: var(--text-muted); }
.hero-mock { width: 440px; flex-shrink: 0; background: var(--surface); border-radius: 24px; box-shadow: 0 20px 48px rgba(30,64,175,0.18); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.mock-head { display: flex; justify-content: space-between; color: var(--primary-dark); }
.mock-head span { font-size: 12px; color: var(--text-muted); }
.mock-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.mock-card div { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.mock-card strong { color: var(--text); font-size: 15px; }
@media (max-width: 899px) {
  .hero { padding: 28px 0; }
  .hero-row { flex-direction: column; align-items: stretch; }
  .hero p { font-size: 15px; }
  .hero-actions .btn { width: 100%; }
}

.home-ad { margin-top: 24px; }
.band { padding: 56px 0; }
.muted-band { background: var(--band); }
.band-title { font-size: 26px; font-weight: 800; color: var(--primary-dark); text-align: center; margin-bottom: 24px; }
.band-title.start { text-align: start; margin-bottom: 12px; }
@media (max-width: 899px) { .band { padding: 32px 0; } .band-title { font-size: 21px; margin-bottom: 16px; } }

.kinds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.kinds li { border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 14px; font-weight: 700; }
.kind-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--tint-ink); display: flex; align-items: center; justify-content: center; }
@media (max-width: 1000px) { .kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .kinds li { padding: 12px 4px; font-size: 13px; } .kind-icon { width: 44px; height: 44px; } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.features article { background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.features svg { color: var(--tint-ink); }
.features h3 { font-size: 17px; font-weight: 700; }
.features p { font-size: 14px; line-height: 1.9; color: var(--text-muted); }
@media (max-width: 899px) { .features { grid-template-columns: minmax(0, 1fr); } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.steps li div { display: flex; flex-direction: column; gap: 4px; }
.steps strong { font-size: 16px; }
.steps span:not(.step-num) { font-size: 14px; line-height: 1.9; color: var(--text-muted); }
.step-num { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--on-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
@media (max-width: 899px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.safe-band { background: var(--solid-dark); color: var(--on-dark); padding: 40px 0; }
.safe-row { display: flex; gap: 28px; align-items: center; }
.safe-row h2 { font-size: 22px; font-weight: 800; }
.safe-row p { font-size: 15px; line-height: 2; color: var(--on-dark-muted); }
.safe-row svg { flex-shrink: 0; }
@media (max-width: 560px) { .safe-row { flex-direction: column; align-items: flex-start; gap: 12px; } }

.app-band { border-bottom: 1px solid var(--border); padding: 40px 0; }
.app-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.app-row p { color: var(--text-muted); }
.soon { font-size: 14px; padding: 8px 14px; }

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; }
.faq-item summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item p { font-size: 15px; line-height: 2; color: var(--text-muted); padding-bottom: 14px; }
.text-view.big { font-size: 16px; line-height: 2.1; }
.text-view.big .text-head { font-size: 19px; margin-top: 12px; }

.contact-row { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.contact-info { flex: 1 1 300px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list svg { color: var(--primary); margin-top: 3px; }
.contact-form { flex: 1 1 420px; background: var(--bg); border-radius: var(--r-large); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.contact-form h3 { font-size: 17px; font-weight: 700; }
.trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { color: var(--success); font-size: 13px; font-weight: 700; }

.legal { padding-top: 8px; }
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }

.site-foot { background: var(--foot-bg); color: #CBD5E1; padding: 32px 0 20px; }
.foot-row { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.foot-about { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.9; }
.foot-about strong { color: var(--on-dark); font-size: 17px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-nav a { color: #CBD5E1; min-height: 44px; display: flex; align-items: center; font-size: 14px; }
.foot-nav a:hover { color: var(--on-dark); }
.foot-line { border-top: 1px solid #1E293B; margin-top: 18px; padding-top: 14px; display: flex; gap: 12px; justify-content: space-between; font-size: 13px; }
.foot-line strong { color: var(--on-dark); }

/* ---------- server-built pages: brand, trade pages, stats, preview banner ---------- */
.preview-banner { background: var(--warning-soft); color: var(--warn-ink); text-align: center; font-weight: 700; font-size: 14px; padding: 10px 16px; }
.site-brand .logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.hero-img { width: 440px; max-width: 100%; height: auto; border-radius: 24px; box-shadow: 0 20px 48px rgba(30,64,175,0.18); flex-shrink: 0; }
.kinds li { padding: 0; }
.kinds li a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; text-decoration: none; color: var(--text); border-radius: var(--r-card); height: 100%; }
.kinds li a:hover { background: var(--primary-soft); }
.band-note { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 30px; font-weight: 800; color: var(--primary-dark); }
.stat span { color: var(--text-muted); font-size: 14px; }
.foot-contact { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.foot-contact li { display: flex; gap: 8px; align-items: center; }
.foot-contact a { color: #CBD5E1; }
.faq-item summary svg { flex-shrink: 0; transition: transform 0.15s; }
.trade-hero .crumbs a { color: var(--primary); }
.trade-title { display: flex; align-items: center; gap: 14px; }
.trade-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--solid); color: var(--on-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trade-img { width: 420px; max-width: 100%; height: auto; border-radius: 22px; flex-shrink: 0; }
.trade-row { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.trade-row > .grow { flex: 1 1 420px; min-width: 0; }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.jobs li { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; gap: 10px; align-items: center; font-weight: 700; }
.work-preview { flex: 0 1 330px; display: flex; flex-direction: column; gap: 8px; }
.small-head { font-size: 16px; font-weight: 800; color: var(--primary-dark); }
.phone-mock { border-radius: 32px; border: 9px solid var(--text); background: var(--bg); overflow: hidden; }
.pm-bar { height: 48px; background: var(--solid); color: var(--on-dark); display: flex; align-items: center; padding: 0 14px; font-weight: 700; font-size: 14px; }
.pm-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.pm-field { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.pm-field span { color: var(--text-muted); font-size: 12px; }
.pm-field.extra { border-color: #FDBA74; }
.pm-extra-head { font-size: 11px; font-weight: 700; color: var(--accent); margin-top: 2px; }
.pm-save { height: 44px; border-radius: 12px; background: var(--accent); color: var(--on-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tech-top { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.tech-filter { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.tech-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-label); }
.tech-filter .select { width: 170px; height: var(--touch); }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tech-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tech-card.join { border-style: dashed; align-items: center; justify-content: center; text-align: center; color: var(--text-muted); }
.tech-card.join strong { color: var(--text); }
.tech-head { display: flex; gap: 10px; align-items: center; width: 100%; }
.tech-head div { display: flex; flex-direction: column; }
.tech-head span:not(.tech-initial) { font-size: 12px; color: var(--text-muted); }
.tech-initial { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--tint-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.others .row { gap: 8px; }
@media (max-width: 899px) { .trade-title h1 { font-size: 24px; } .trade-icon { width: 52px; height: 52px; } .tech-filter .select { width: 140px; } }

/* ابزارهای کاربردی دوربین و دزدگیر */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tool-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-card); background: var(--surface);
  border: 1px solid var(--border); color: var(--text); text-decoration: none; min-height: 48px; }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--primary-line); background: var(--primary-soft); }
.tool-card strong { display: block; color: var(--primary-dark); margin-bottom: 4px; }
.tool-card span span, .tool-card > span:last-child > span { font-size: 13px; line-height: 1.9; color: var(--text-muted); }
.ti { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--tint-ink); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; }
.ti.alarm { background: #FFEDD5; color: #9A3412; }
.tool-head { background: var(--bg); padding: 28px 0 8px; }
.tool-head h1 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; color: var(--primary-dark); line-height: 1.6; }
.tool-head p { font-size: 16px; line-height: 2; color: var(--text-label); }
.tool-band { background: var(--bg); padding-top: 12px; }
.tool-row { display: flex; gap: 20px; align-items: flex-start; }
.tool-form { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.tool-result { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 2px solid var(--primary); position: sticky; top: 84px; }
@media (max-width: 899px) { .tool-row { flex-direction: column; align-items: stretch; } .tool-result { width: auto; position: static; } }
.form-grid.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 599px) { .form-grid.three { grid-template-columns: 1fr; } }
.tool-seg { min-width: 0; }
.tool-seg legend { font-size: 13px; font-weight: 500; color: var(--text-label); margin-bottom: 2px; }
.tool-seg-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.tool-seg-row .seg-choice { height: auto; min-height: var(--touch); padding: 6px 8px; text-align: center; line-height: 1.6; }
.big-result { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big-result strong { font-size: 42px; line-height: 1.2; color: var(--primary); }
.big-result span { font-size: 17px; font-weight: 700; }
.tool-advice { border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; line-height: 1.9; }
.tool-advice.ok { background: var(--success-soft); color: var(--ok-ink); }
.tool-advice.warn { background: var(--warning-soft); color: var(--warn-ink); }
.tool-result .kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tool-result .kv strong { text-align: end; }
.tool-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dori { display: flex; direction: ltr; height: 24px; border-radius: 8px; overflow: hidden; background: var(--border); }
.dori i { display: block; height: 100%; }
.dori i:nth-child(1), .dori-list .d0 { background: #166534; }
.dori i:nth-child(2), .dori-list .d1 { background: #15803D; }
.dori i:nth-child(3), .dori-list .d2 { background: var(--solid); }
.dori i:nth-child(4), .dori-list .d3 { background: #93C5FD; }
.dori-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dori-list li { display: flex; align-items: center; gap: 8px; }
.dori-list i { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.dori-list strong { margin-inline-start: auto; white-space: nowrap; }
.tools-cta { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--r-large); background: var(--solid-dark); color: var(--on-dark); }
.tools-cta strong { display: block; font-size: 18px; }
.tools-cta span { font-size: 14px; line-height: 1.9; color: var(--on-dark-muted); }
@media (max-width: 599px) { .tools-cta { flex-direction: column; align-items: stretch; } }
.checklist { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.checks { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.fill-line { display: block; border-bottom: 1px dashed var(--text-muted); height: 32px; }
@media print {
  .site-head, .site-foot, .no-print, .tool-actions, .crumbs, .home-ad, .tools-cta { display: none !important; }
  body.site, .tool-band, .tool-head { background: #FFFFFF; }
  .tool-row { flex-direction: column; }
  .tool-result { width: 100%; position: static; border-width: 1px; }
}

.tech-head .stars { margin-inline-start: auto; white-space: nowrap; font-weight: 800; color: var(--warn-ink); }
.tech-head .stars span { font-weight: 400; color: var(--text-muted); font-size: 13px; }
.tech-head .chip { margin-inline-start: auto; }

/* پیش‌فاکتور (صفحه‌ای که مشتری باز می‌کند) */
.quote { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.quote-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.quote-head h1 { font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.quote-head strong, .quote-head span, .quote-meta span { display: block; line-height: 1.9; }
.quote-meta { font-size: 14px; color: var(--text-label); }
.quote-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.quote-table th, .quote-table td { padding: 8px; border-bottom: 1px solid var(--border); text-align: start; }
.quote-table th { font-size: 12px; color: var(--text-muted); }
.quote-sums .kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.quote-sums .total { font-size: 17px; color: var(--primary-dark); border-bottom: none; }
@media print { .quote { box-shadow: none; border: none; } }
.quote-list { display: none; list-style: none; }
.quote-list li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.quote-list li span { color: var(--text-label); }
@media (max-width: 599px) { .quote .table-box { display: none; } .quote-list { display: block; } .quote { padding: 16px; } }

/* app download and footer badges (2026-11-01) */
.app-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: 420px; }
.app-meta { margin: 0; font-size: 13px; line-height: 1.8; opacity: 0.9; }
.app-meta .sha { font-family: ui-monospace, Consolas, monospace; font-size: 11px; word-break: break-all; unicode-bidi: isolate; }
.foot-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; padding-top: 16px; padding-bottom: 8px; }
.foot-badges a, .foot-badges span { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  background: #FFFFFF; border-radius: 12px; padding: 6px; }
.foot-badges img { display: block; max-height: 88px; max-width: 120px; width: auto; height: auto; }

/* Tools of the other trades (owner's request 2026-11-01: one tools page per trade). */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--primary-dark); font-weight: 700; font-size: 14px; text-decoration: none; }
.chip-link:hover { border-color: var(--primary); }

/* «حالت نمایش» in the header: روشن، تیره، مثل گوشی. */
/* Keep the site name on one line next to the theme button on narrow phones. */
.site-brand { white-space: nowrap; }

/* «گزینه ۱» in the dark look: the same teal, deepened for dark grounds. */
@media screen and (prefers-color-scheme: dark) {
  :root[data-palette="teal"]:not([data-theme="light"]) { --primary-soft: #0F3B37; --tint-ink: #5EEAD4; --card-line: #134E4A; --band: #0B1A1E; }
}
@media screen {
  :root[data-palette="teal"][data-theme="dark"] { --primary-soft: #0F3B37; --tint-ink: #5EEAD4; --card-line: #134E4A; --band: #0B1A1E; }
}

/* The customer's invoice at /f/<token>: the quote page's look, plus the logo and the payment state. */
.quote-head .inv-logo { width: 72px; height: 72px; object-fit: contain; }
.quote-meta .inv-state { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; }
.quote-meta .inv-state.ok { background: var(--success-soft); color: var(--ok-ink); }
.quote-meta .inv-state.warn { background: var(--warning-soft); color: var(--warn-ink); }
.quote-meta .inv-state.bad { background: var(--danger-soft); color: var(--danger); }

/* «کد رنگی مقاومت»: the resistor drawn with the chosen bands. */
.resistor { display: block; width: 100%; max-width: 320px; height: auto; margin: 4px auto 0; color: var(--text); }

/* «نمونه قراردادها»: the text with each blank named. */
.contract-sample { padding: 20px; }
.contract-sample .blank { color: var(--text-muted); border-bottom: 1px dashed var(--text-muted); padding: 0 4px; font-size: 0.92em; }
/* On paper each blank is an empty dotted line for the hand, never the sample words (owner 2026-11-12). */
@media print {
  .contract-sample { border: none; box-shadow: none; padding: 0; }
  .contract-sample .blank { color: transparent !important; border-bottom: 1px dotted #000; display: inline-block; min-width: 30mm;
    line-height: 1.4; user-select: none; }
}


/* ---------- Motion (owner 2026-11-09: «سایت خیلی خشکه، یه مقدار موشن حرکتی داخلش بزار») ----------
   Only transform and opacity move. Visitors who ask their device for less motion get none (end of this block),
   and without JavaScript everything simply shows. */
:root { --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --rise: 18px; --lift-shadow: 0 14px 32px rgba(30, 64, 175, 0.14); }

@keyframes rise-in { from { opacity: 0; transform: translateY(var(--rise)); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-40px, 30px, 0) scale(1.12); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* The top of each page: its lines come in one after another, the picture a moment later. */
.hero-text > * { animation: rise-in 0.7s var(--ease-out) both; }
.hero-text > :nth-child(2) { animation-delay: 0.08s; }
.hero-text > :nth-child(3) { animation-delay: 0.16s; }
.hero-text > :nth-child(4) { animation-delay: 0.24s; }
.hero-text > :nth-child(n+5) { animation-delay: 0.32s; }
.hero-img, .hero-mock, .hero .phone-mock { animation: pop-in 0.8s var(--ease-out) 0.25s both; }
.hero-img { animation: pop-in 0.8s var(--ease-out) 0.25s both, bob 5s ease-in-out 1.1s infinite alternate; }

/* Two soft colour shapes drift slowly behind the top of the page. */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  filter: blur(8px); animation: drift 18s ease-in-out infinite alternate; }
.hero::before { width: 420px; height: 420px; inset-inline-start: -120px; top: -160px;
  background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%); }
.hero::after { width: 320px; height: 320px; inset-inline-end: -90px; bottom: -150px; animation-duration: 22s; animation-delay: -6s;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%); }

/* Sections and cards rise into view while scrolling (site.js marks them; `.motion` only when it runs). */
.motion .reveal { opacity: 0; transform: translateY(var(--rise)); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .reveal.d1 { transition-delay: 0.07s; }
.motion .reveal.d2 { transition-delay: 0.14s; }
.motion .reveal.d3 { transition-delay: 0.21s; }
.motion .reveal.d4 { transition-delay: 0.28s; }
.motion .reveal.d5 { transition-delay: 0.35s; }

/* The bar at the top gets a soft shadow once the page scrolls. */
.site-head { transition: box-shadow 0.3s ease; }
.site-head.scrolled { box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }

/* Buttons answer the press; cards lift a little under the mouse (only where there is a mouse). */
.btn { transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
.btn:active { transform: scale(0.97); }
.faq-item[open] p { animation: rise-in 0.35s var(--ease-out) both; }
.faq-item summary svg { transition: transform 0.25s var(--ease-out); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: scale(0.97); }
  .features article, .steps li, .stat, .tech-card, .tool-card, .kinds li, .faq-item {
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s ease; }
  .features article:hover, .steps li:hover, .stat:hover, .tech-card:hover, .tool-card:hover, .kinds li:hover {
    transform: translateY(-4px); box-shadow: var(--lift-shadow); border-color: var(--primary-line); }
  .faq-item:hover { border-color: var(--primary-line); }
  .features article svg, .kind-icon, .trade-icon { transition: transform 0.3s var(--ease-out); }
  .features article:hover svg, .kinds li:hover .kind-icon, .trade-row:hover .trade-icon { transform: translateY(-3px) scale(1.06); }
}

/* Printing (contracts, invoices) always shows everything. */
/* Print: no motion at all. A fade started by the switch to print mode was caught at opacity 0, so pages such as a
   contract sample printed blank (owner 2026-11-12). */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion .reveal, .hero-text > * { opacity: 1 !important; transform: none !important; }
}

/* Less motion asked for: everything still, in its final place. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion .reveal { opacity: 1; transform: none; }
}

/* «مقاله‌ها» (owner 2026-11-11): card grid, category filter, article with a side column, related articles */
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.blog-card { min-width: 0; }
.blog-card-link { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--card-line);
  border-radius: var(--r-card); overflow: hidden; color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.blog-card-link:hover, .blog-card-link:focus-visible { border-color: var(--primary-line); transform: translateY(-2px); }
.blog-card-img { aspect-ratio: 16 / 9; max-width: 100%; background: var(--surface-muted); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-noimg { display: flex; align-items: center; justify-content: center; color: var(--primary-line); }
.blog-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.blog-card-body h3 { font-size: 17px; line-height: 1.8; font-weight: 800; color: var(--primary-dark); text-wrap: balance; }
.blog-card-body p { font-size: 14px; line-height: 1.9; color: var(--text-muted); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-chip { align-self: flex-start; display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--tint-ink); font-size: 12px; font-weight: 700; text-decoration: none; }
.blog-meta { font-size: 13px; color: var(--text-muted); }
.blog-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.blog-article { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.blog-article h1 { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.6; font-weight: 800; color: var(--primary-dark); text-wrap: balance; }
.blog-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; color: var(--text-muted); }
.blog-cover { margin: 0; border-radius: var(--r-large); overflow: hidden; background: var(--surface-muted); }
.blog-cover img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.blog-lead { font-size: 17px; line-height: 2; color: var(--text-label); font-weight: 500; }
.blog-body { font-size: 16px; line-height: 2.15; color: var(--text); max-width: 72ch; }
.blog-body > * + * { margin-top: 14px; }
.blog-body h2 { font-size: 22px; font-weight: 800; color: var(--primary-dark); margin-top: 28px; line-height: 1.7; }
.blog-body h3 { font-size: 18px; font-weight: 800; color: var(--text); margin-top: 22px; }
.blog-body ul, .blog-body ol { padding-inline-start: 24px; display: flex; flex-direction: column; gap: 6px; }
.blog-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.blog-body blockquote { border-inline-start: 4px solid var(--primary-line); background: var(--surface-muted); padding: 12px 16px;
  border-radius: var(--r-small); color: var(--text-label); }
.blog-body figure { margin: 18px 0; }
.blog-body figure img { width: 100%; height: auto; border-radius: var(--r-card); display: block; }
.blog-body figcaption { font-size: 13px; color: var(--text-muted); margin-top: 6px; text-align: center; }
.blog-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.blog-tags li { border: 1px solid var(--border-chip); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--text-label); }
.blog-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.blog-box { border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; background: var(--surface); }
.blog-box h2 { font-size: 16px; font-weight: 800; color: var(--primary-dark); margin-bottom: 10px; }
.blog-box ul { list-style: none; padding: 0; display: flex; flex-direction: column; }
.blog-box li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--divider); font-size: 14px; }
.blog-box li:first-child { border-top: 0; }
.blog-box a { color: var(--text-label); text-decoration: none; min-width: 0; }
.blog-box a:hover { color: var(--primary); }
.blog-recent li { flex-direction: column; gap: 2px; }
.blog-recent span, .blog-cat-list span { font-size: 12px; color: var(--text-muted); }
@media (max-width: 960px) { .blog-layout { grid-template-columns: minmax(0, 1fr); } .blog-side { position: static; } }
@media (prefers-reduced-motion: reduce) { .blog-card-link { transition: none; } .blog-card-link:hover { transform: none; } }
@media print { .blog-side, .blog-cats, .blog-pager { display: none; } }

/* «حالت پیشرفته» of the CCTV and alarm tools (owner 2026-11-11) */
.tool-adv:not([hidden]) { display: flex; flex-direction: column; gap: 16px; padding-top: 4px; border-top: 1px dashed var(--border); }
.tool-adv-out:not([hidden]) { display: flex; flex-direction: column; }
.tool-group { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px; margin: 0; }
.tool-group legend { font-size: 13px; font-weight: 700; color: var(--text-label); padding: 0 6px; }
