/* iKral Platform — پوسته صفحه‌های عمومی قابل خزش (درباره، شرکت، خدمات، وبلاگ، وضعیت، کارت ویزیت…)
   فقط منابع محلی؛ روشن و تیره خودکار؛ راست‌به‌چپ و چپ‌به‌راست با ویژگی‌های منطقی (inline-start/end) */
@font-face { font-family: 'Vazirmatn'; src: url(/fonts/Vazirmatn.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #f6f4f0; --bg2: #efece6; --card: #fff; --line: #e6e2da; --line2: #d9d4ca; --ink: #23252f; --ink2: #555867; --mut: #8a8c99;
  --acc: #23252f; --acc-ink: #fff; --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #2563eb;
  --r: 18px; --r2: 12px; --sh: 0 1px 2px rgba(20, 22, 30, .04), 0 8px 24px -12px rgba(20, 22, 30, .12);
  --max: 1120px; --gut: clamp(16px, 5vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #101218; --bg2: #161922; --card: #181b24; --line: #262a35; --line2: #333846; --ink: #eceef4; --ink2: #b6bac8; --mut: #868b9c; --acc: #eceef4; --acc-ink: #101218; --sh: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #101218; --bg2: #161922; --card: #181b24; --line: #262a35; --line2: #333846; --ink: #eceef4; --ink2: #b6bac8; --mut: #868b9c; --acc: #eceef4; --acc-ink: #101218; --sh: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.site { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 15.5px/1.95 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif; overflow-x: hidden; }
a { color: inherit; text-underline-offset: 4px; text-decoration-color: var(--line2); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 6px; }
img, svg, video { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 4.4vw, 44px); }
h2 { font-size: clamp(19px, 2.4vw, 26px); margin-top: 1.6em; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--acc); color: var(--acc-ink); padding: 8px 14px; border-radius: 10px; z-index: 50; text-decoration: none; }
.skip:focus { top: 10px; }

/* سربرگ */
.s-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px var(--gut); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.s-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 16px; white-space: nowrap; }
.s-brand img { border-radius: 9px; }
.s-nav { display: flex; gap: 2px; margin-inline-start: auto; flex-wrap: wrap; }
.s-nav a, .s-langs a { text-decoration: none; padding: 4px 11px; border-radius: 99px; font-size: 13.5px; color: var(--ink2); transition: background .2s, color .2s; }
.s-nav a:hover, .s-langs a:hover { background: var(--bg2); color: var(--ink); }
.s-nav a[aria-current] { background: var(--acc); color: var(--acc-ink); }
.s-langs { display: flex; gap: 2px; border-inline-start: 1px solid var(--line); padding-inline-start: 10px; }
.s-langs a[aria-current] { color: var(--ink); font-weight: 700; }
.s-burger { display: none; margin-inline-start: auto; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; cursor: pointer; padding: 10px 9px; flex-direction: column; justify-content: space-between; }
.s-burger i { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.s-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.s-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.s-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 860px) {
  .s-burger { display: flex; }
  .s-top { flex-wrap: wrap; }
  .s-nav { order: 3; flex-basis: 100%; display: none; flex-direction: column; gap: 2px; padding: 8px 0 4px; margin: 0; }
  .s-nav.open { display: flex; }
  .s-nav a { padding: 9px 12px; font-size: 15px; border-radius: 12px; }
  .s-langs { border: 0; padding: 0; }
}
@media (max-width: 520px) { .s-langs { display: none; } .s-nav.open ~ .s-langs { display: flex; order: 4; flex-basis: 100%; padding: 4px 0 8px; } }

.s-crumb { max-width: var(--max); width: 100%; margin: 14px auto 0; padding: 0 var(--gut); font-size: 13px; color: var(--mut); display: flex; gap: 8px; flex-wrap: wrap; }
.s-crumb a { text-decoration: none; }
.s-main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 22px var(--gut) 64px; }
body.wide .s-main { max-width: 1320px; }
.s-foot { border-top: 1px solid var(--line); padding: 22px var(--gut); text-align: center; color: var(--mut); font-size: 13px; }
.s-foot p { margin: 4px 0; }
.s-fl { display: flex; gap: 6px 14px; justify-content: center; flex-wrap: wrap; }
.s-fl a { text-decoration: none; }

/* اجزای مشترک */
.s-hero { padding: clamp(18px, 5vw, 46px) 0 10px; }
.s-hero .lead { font-size: clamp(15.5px, 1.8vw, 18.5px); color: var(--ink2); max-width: 780px; }
.s-kick { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 2px 12px; margin-bottom: 12px; }
.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.s-grid.g2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.s-grid.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.s-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sh); position: relative; min-width: 0; }
a.s-card { text-decoration: none; display: block; transition: border-color .2s, transform .2s; }
a.s-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.s-card h3 { margin-bottom: 6px; }
.s-card .mut, .mut { color: var(--mut); font-size: 13.5px; }
.s-card img.cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r2); border: 1px solid var(--line); margin-bottom: 10px; display: block; }
.s-sec { margin-top: 34px; }
.s-sec > h2:first-child { margin-top: 0; }
.s-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 18px; border-radius: 13px; border: 1px solid var(--acc); background: var(--acc); color: var(--acc-ink); font: inherit; font-weight: 700; font-size: 14.5px; text-decoration: none; cursor: pointer; transition: opacity .2s, transform .1s; }
.s-btn:hover { opacity: .9; }
.s-btn:active { transform: translateY(1px); }
.s-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.s-btn.sm { min-height: 34px; padding: 4px 12px; font-size: 13px; border-radius: 10px; }
.s-btn[disabled] { opacity: .5; cursor: default; }
.s-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.s-tag { display: inline-block; border: 1px solid var(--line2); border-radius: 99px; padding: 1px 11px; font-size: 12.5px; color: var(--ink2); text-decoration: none; background: var(--card); }
.s-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 99px; background: var(--bg2); color: var(--ink2); }
.s-badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.s-badge.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.s-badge.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.s-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mut); display: inline-block; flex: none; }
.s-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.s-dot.bad { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 18%, transparent); }
.s-dot.warn { background: var(--warn); }
.s-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.s-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.s-stat b { display: block; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.3; font-weight: 900; }
.s-stat span { color: var(--mut); font-size: 13px; }
.s-note { border: 1px solid var(--line); background: var(--bg2); border-radius: var(--r2); padding: 10px 14px; font-size: 14px; color: var(--ink2); }
.s-note.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.s-note.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.s-prose { max-width: 760px; font-size: 16.5px; line-height: 2.1; }
.s-prose img { border-radius: var(--r2); height: auto; }
.s-prose blockquote { margin: 1em 0; padding: 4px 16px; border-inline-start: 3px solid var(--line2); color: var(--ink2); }
.s-prose pre, .s-prose code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; direction: ltr; unicode-bidi: isolate; font-size: 13.5px; }
.s-prose pre { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r2); padding: 12px 14px; overflow: auto; text-align: left; }
.s-prose :not(pre) > code { background: var(--bg2); border-radius: 6px; padding: 1px 6px; }
.s-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.s-table th, .s-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.s-table th { color: var(--mut); font-weight: 600; font-size: 13px; }
.s-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.s-steps { counter-reset: st; display: grid; gap: 10px; padding: 0; list-style: none; }
.s-steps li { counter-increment: st; position: relative; padding-inline-start: 46px; }
.s-steps li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: 2px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); font-weight: 800; font-size: 14px; }
.s-faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.s-faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.s-faq summary::after { content: '+'; color: var(--mut); font-weight: 400; }
.s-faq details[open] summary::after { content: '−'; }
.s-faq details p { margin: 8px 0 0; color: var(--ink2); }
.s-quote { font-size: 15.5px; }
.s-quote footer { margin-top: 10px; display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 13px; }
.s-quote footer img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.s-media { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16/9; }
.s-media video, .s-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* فرم‌ها */
.s-form { display: grid; gap: 12px; }
.s-form .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.s-form label { display: grid; gap: 4px; font-size: 13.5px; color: var(--ink2); font-weight: 600; }
.s-form label small { font-weight: 400; color: var(--mut); }
.s-in, .s-form input:not([type=checkbox]):not([type=radio]), .s-form select, .s-form textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 1px solid var(--line2); border-radius: var(--r2); padding: 9px 12px; min-height: 44px; transition: border-color .2s, box-shadow .2s; }
.s-form textarea { min-height: 110px; resize: vertical; line-height: 1.9; }
.s-form input:focus, .s-form select:focus, .s-form textarea:focus, .s-in:focus { outline: none; border-color: var(--ink2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 18%, transparent); }
.s-form [dir="ltr"] { text-align: left; }
.s-form .chk { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.s-form .msg { min-height: 1.5em; font-size: 14px; }
.s-form .msg.ok { color: var(--ok); }
.s-form .msg.bad { color: var(--bad); }
.s-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.s-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.s-chips input { position: absolute; opacity: 0; pointer-events: none; }
.s-chips label { display: inline-flex; font-weight: 500; border: 1px solid var(--line2); border-radius: 99px; padding: 6px 14px; cursor: pointer; background: var(--card); color: var(--ink); }
.s-chips input:checked + span, .s-chips label:has(input:checked) { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.s-chips input:focus-visible + span { outline: 2px solid var(--info); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .s-top, .s-foot, .s-crumb, .skip, .no-print { display: none !important; }
  body.site { background: #fff; color: #000; }
  .s-main { padding: 0; max-width: none; }
  .s-card { box-shadow: none; break-inside: avoid; }
}
/* ۳.۵: نمایش درون پنجره میز کار (‎?embed=1‎) — بی‌سربرگ و پابرگ، فاصله‌ها کمتر */
body.site.embed { min-height: 0; background: var(--bg); }
body.site.embed .s-main { max-width: 1040px; padding: 18px clamp(14px, 3vw, 28px) 34px; }
body.site.embed .skip { display: none; }
