/* ==========================================================================
   MetaExpert — main stylesheet (RTL, dark-first with light theme)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #070b12;
  --bg-2: #0b111b;
  --surface: #0f1723;
  --surface-2: #142030;
  --line: rgba(148, 170, 200, .12);
  --line-strong: rgba(148, 170, 200, .22);
  --text: #e8eef7;
  --text-2: #a9b6c9;
  --text-3: #74849b;
  --brand: #2ee6a6;
  --brand-ink: #03251a;
  --brand-soft: rgba(46, 230, 166, .12);
  --accent: #7b96ff;
  --accent-soft: rgba(123, 150, 255, .14);
  --up: #2ee6a6;
  --down: #ff5c7a;
  --gold: #f5c25b;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1200px;
  --grid-line: rgba(148, 170, 200, .05);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --font: "Vazirmatn", Tahoma, system-ui, sans-serif;
  --header-h: 72px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-2: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f2f5f9;
  --line: rgba(20, 35, 60, .09);
  --line-strong: rgba(20, 35, 60, .17);
  --text: #0c1524;
  --text-2: #3f4e66;
  --text-3: #66758c;
  --brand: #048a5f;
  --brand-ink: #ffffff;
  --brand-soft: rgba(4, 138, 95, .10);
  --accent: #3552e6;
  --accent-soft: rgba(53, 82, 230, .10);
  --up: #048a5f;
  --down: #d32f53;
  --gold: #a86f00;
  --shadow: 0 30px 70px -30px rgba(20, 35, 60, .25);
  --grid-line: rgba(20, 35, 60, .045);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap.narrow { --wrap: 820px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.link { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); }
.icon { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.pt-0 { padding-top: 0 !important; }
.section { padding-block: clamp(72px, 10vw, 120px); position: relative; }
.section-sm { padding-block: clamp(32px, 5vw, 56px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--brand); line-height: 1.6;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  padding: 4px 12px; border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.grad { background: linear-gradient(100deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding-inline: 26px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 15.5px; white-space: nowrap; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -14px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-ghost { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { border-color: var(--text-3); }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.section-head h2 { margin-top: 14px; }
.section-head p { color: var(--text-2); margin: 10px 0 0; max-width: 560px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
/* The frosted background sits on a pseudo-element: backdrop-filter on .header itself would make
   it the containing block for position: fixed children, trapping the mobile menu drawer inside
   the 64px header. */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}
.admin-bar .header { top: 32px; }
.header.scrolled { border-bottom-color: var(--line); }
.header > .wrap { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; line-height: 1.3; flex: none; }
.logo-img { width: 36px; height: 36px; object-fit: contain; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--accent)); display: grid; place-items: center; flex: none; }
.logo-mark .icon { width: 22px; height: 22px; color: #04120d; }
.logo small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); letter-spacing: .1em; }

.nav { margin-inline-start: 8px; }
/* Drawer-only parts; ".nav" in the selector so ".nav a { display: flex }" cannot re-show them. */
.nav .nav-head, .nav .nav-cta { display: none; }
.nav .menu, .nav .sub-menu { list-style: none; margin: 0; padding: 0; }
.nav .menu { display: flex; gap: 2px; }
.nav li { position: relative; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 15px; transition: color .2s, background .2s; }
.nav a:hover, .nav .current-menu-item > a, .nav .current-menu-ancestor > a { color: var(--text); background: var(--surface-2); }
.nav .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg) translateY(-2px); opacity: .7; }
.nav .sub-menu {
  position: absolute; inset-inline-start: 0; top: 100%; min-width: 230px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.nav .sub-menu .sub-menu { inset-inline-start: 100%; top: -8px; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { padding: 9px 12px; font-size: 14.5px; }
.nav .sub-menu .menu-item-has-children > a::after { margin-inline-start: auto; transform: rotate(45deg); }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text-2); transition: color .2s, border-color .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.header .btn { height: 42px; padding-inline: 18px; font-size: 14.5px; border-radius: 12px; }
.cart-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; }
.cart-count[hidden] { display: none; }
.menu-btn { display: none; }
.icon.sun { display: none; }
:root[data-theme="light"] .icon.sun { display: block; }
:root[data-theme="light"] .icon.moon { display: none; }
.search-panel { border-top: 1px solid var(--line); padding-block: 16px; background: var(--bg); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 40; }

/* ---------- Search form ---------- */
.search-form { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px 6px 6px 6px; padding-inline-start: 16px; }
.search-form > .icon { color: var(--text-3); }
.search-form input { flex: 1; min-width: 0; height: 42px; border: 0; background: transparent; outline: 0; font-size: 15.5px; }
.search-form .btn { height: 42px; padding-inline: 20px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: 64px 96px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 900px; height: 900px; inset-inline-end: -300px; top: -420px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 20%, transparent), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.2vw, 52px); font-weight: 900; margin-top: 22px; line-height: 1.35; }
.hero .lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--text-2); margin: 22px 0 34px; max-width: 580px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 34px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14.5px; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--brand); }
.hero-visual { position: relative; }

.terminal { position: relative; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); overflow: hidden; direction: ltr; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.term-dots { display: flex; gap: 6px; flex: none; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; }
.term-dots i:nth-child(1) { background: #ff5f57; } .term-dots i:nth-child(2) { background: #febc2e; } .term-dots i:nth-child(3) { background: #28c840; }
.term-title { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.term-live { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--up); flex: none; }
.term-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 1.6s infinite; }
.term-head { display: flex; align-items: baseline; gap: 14px; padding: 16px 18px 4px; }
.term-sym { font-weight: 700; font-size: 15px; }
.term-price { font-size: 26px; font-weight: 600; }
.term-chg { font-size: 13px; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.term-chg.neg { background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); }
#chart { width: 100%; height: 250px; }
.term-foot { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.term-foot div { padding: 12px 16px; border-left: 1px solid var(--line); }
.term-foot div:first-child { border-left: 0; }
.term-foot span { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.term-foot b { font-size: 15px; font-weight: 600; }
.term-foot .up { color: var(--up); }
.signal { position: absolute; right: -14px; bottom: 96px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.6; animation: float 6s ease-in-out infinite; }
.signal .badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.signal small { display: block; color: var(--text-3); font-size: 11.5px; }
@keyframes float { 50% { transform: translateY(-8px); } }
.demo-note { margin: 12px 0 0; font-size: 12px; color: var(--text-3); text-align: center; }

/* ---------- Platforms strip ---------- */
.strip { border-block: 1px solid var(--line); background: var(--bg-2); }
.strip .wrap { display: flex; align-items: center; gap: 36px; padding-block: 20px; overflow-x: auto; scrollbar-width: none; }
.strip .wrap::-webkit-scrollbar { display: none; }
.strip-label { color: var(--text-3); font-size: 14px; white-space: nowrap; }
.strip ul { display: flex; gap: 36px; margin: 0; padding: 0; list-style: none; }
.strip li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 600; white-space: nowrap; direction: ltr; }
.strip .icon { width: 22px; height: 22px; opacity: .8; }

/* ---------- Cards / services ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; overflow: hidden; transition: border-color .25s, transform .25s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 20px; font-weight: 700; margin: 18px 0 10px; }
.card p { color: var(--text-2); margin: 0; font-size: 15px; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.ico.alt { background: var(--accent-soft); color: var(--accent); }
.ico .icon { width: 24px; height: 24px; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--brand); font-weight: 600; font-size: 14.5px; }
.more .icon { width: 16px; height: 16px; transition: transform .2s; }
.card:hover .more .icon { transform: translateX(-4px); }
.span-2 { grid-column: span 2; } .span-4 { grid-column: span 4; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { font-size: 12.5px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
a.tag:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.code-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; }
.code { direction: ltr; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; margin: 0; padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; overflow-x: auto; white-space: pre; color: var(--text-2); }
.code .k { color: var(--accent); } .code .f { color: var(--brand); } .code .s { color: var(--gold); } .code .c { color: var(--text-3); } .code .n { color: #ff9f6e; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; list-style: none; margin: 0; padding: 0; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.step::before { counter-increment: s; content: "۰" counter(s, persian); font-weight: 700; font-size: 13px; color: var(--brand); display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--brand-soft); }
.step::after { content: ""; position: absolute; inset-inline: 24px; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: .5; }
.step h3 { font-size: 18px; margin: 16px 0 8px; }
.step p { margin: 0; color: var(--text-2); font-size: 14.5px; }

/* ---------- Strategy robots ---------- */
.robots { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.robots h2 { margin-top: 14px; }
.lead2 { color: var(--text-2); margin: 16px 0 26px; }
.ind-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; direction: ltr; list-style: none; margin: 0; padding: 0; }
.ind { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; height: 100%; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s, transform .2s; }
.ind:hover { border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); transform: translateY(-2px); }
.ind b { font-size: 14px; font-weight: 600; line-height: 1.4; }
.ind svg { width: 100%; height: 26px; color: var(--brand); }
.ind-grid li:nth-child(3n) svg { color: var(--accent); }

/* ---------- Proof ---------- */
.proof { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.proof div { padding: 28px 24px; border-inline-start: 1px solid var(--line); }
.proof div:first-child { border-inline-start: 0; }
.proof b { display: block; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.5; }
.proof span { color: var(--text-2); font-size: 14.5px; }

/* ---------- Article cards / grids ---------- */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 500; transition: all .2s; }
.chip:hover, .chip.on { border-color: var(--brand); color: var(--text); background: var(--brand-soft); }
.posts { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.posts.grid-3 { grid-template-columns: repeat(3, 1fr); }
.post { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .25s, transform .25s; }
.post:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.post .thumb { display: block; aspect-ratio: 16/9; position: relative; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--surface-2)), color-mix(in srgb, var(--accent) 20%, var(--surface-2))); }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post:hover .thumb img { transform: scale(1.04); }
.post .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.post .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--text-3); }
.post .meta span { display: inline-flex; align-items: center; gap: 5px; }
.post .meta .icon { width: 14px; height: 14px; }
.post .meta .cat { color: var(--brand); font-weight: 600; }
.post .post-title { font-size: 17.5px; font-weight: 700; line-height: 1.6; }
.post .post-title a::after { content: ""; position: absolute; inset: 0; }
.post p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.post.big .post-title { font-size: 21px; }

/* ---------- Designed covers (replace watermarked uploads in cards) ---------- */
.cover { --c: var(--brand); position: absolute; inset: 0; display: block; color: var(--text); overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 60%),
    linear-gradient(160deg, var(--surface-2), var(--bg-2)); }
.cover.tone-accent { --c: var(--accent); }
.cover.tone-gold { --c: var(--gold); }
.cover svg { position: absolute; inset: 12% 0 0; width: 100%; height: 88%; }
.cover-label { position: absolute; top: 14px; inset-inline-start: 14px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line-strong); color: var(--text); backdrop-filter: blur(6px); }

/* ---------- Contact box (old [site_whatsapp] / [site_telegram] shortcodes) ---------- */
.btn-sm { height: 40px; padding-inline: 16px; font-size: 14px; border-radius: 11px; gap: 7px; }
.btn-sm .icon { width: 16px; height: 16px; }
.contact-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 1.6em; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.contact-box-text { color: var(--text-2); font-weight: 600; margin-inline-end: 4px; }
.prose .contact-box a { text-decoration: none; color: inherit; }
.prose .contact-box .btn-primary { color: var(--brand-ink); }

/* ---------- Collapsible SEO text after listings ---------- */
.seo-text { margin-top: 56px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 16px; }
.seo-text-inner { position: relative; }
.seo-text.collapsed .seo-text-inner { max-height: 260px; overflow: hidden; }
.seo-text.collapsed .seo-text-inner::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(transparent, var(--surface)); }
.seo-text .seo-more { margin-top: 16px; height: 42px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
.faq-grid h2 { margin-top: 14px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; }
.faq summary h3 { font-size: 17px; font-weight: 600; line-height: 1.7; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: transform .25s, background .25s; }
.faq summary i .icon { width: 14px; height: 14px; }
.faq details[open] summary i { transform: rotate(45deg); background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.faq details p { margin: 0 0 22px; color: var(--text-2); }

/* ---------- CTA + risk ---------- */
.cta { position: relative; border-radius: 28px; padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 72px); overflow: hidden; text-align: center; background: radial-gradient(800px 300px at 50% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent), var(--surface); border: 1px solid var(--line-strong); }
.cta h2 { max-width: 720px; margin: 16px auto 0; }
.cta p { color: var(--text-2); max-width: 560px; margin: 16px auto 30px; }
.cta .hero-ctas { justify-content: center; }
.risk { margin-top: 20px; display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); font-size: 14px; color: var(--text-2); line-height: 1.9; }
.risk .icon { width: 20px; height: 20px; color: var(--gold); margin-top: 4px; }

/* ---------- Page heroes / archives ---------- */
.page-hero { padding-block: 40px 36px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 240px at 85% -40%, color-mix(in srgb, var(--brand) 12%, transparent), transparent), var(--bg-2); }
.page-hero h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; margin-top: 10px; }
.page-hero h1 small { font-size: .5em; font-weight: 500; color: var(--text-3); }
.archive-desc { color: var(--text-2); max-width: 760px; margin-top: 12px; }
.archive-desc p { margin: 0 0 8px; }
.archive-search { max-width: 640px; margin-top: 20px; }
.empty { text-align: center; padding: 48px 0; }
.empty .search-form { max-width: 560px; margin: 24px auto 0; }

.breadcrumbs { font-size: 13.5px; color: var(--text-3); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after, .breadcrumbs .separator { content: "‹"; margin-inline-start: 6px; opacity: .6; }
.breadcrumbs a { color: var(--text-2); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs p { margin: 0; }
.breadcrumbs .separator { margin-inline: 6px; }
.breadcrumbs .separator::after { content: none; }

.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers { min-width: 44px; height: 44px; padding-inline: 12px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); color: var(--text-2); font-weight: 600; }
a.page-numbers:hover { border-color: var(--brand); color: var(--text); }
.page-numbers.current { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.page-numbers.dots { border: 0; }
.page-jumps { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; color: var(--text-3); }
.page-jumps a, .page-jumps [aria-current] { min-width: 36px; height: 32px; padding-inline: 10px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--text-2); }
.page-jumps a:hover { border-color: var(--brand); color: var(--text); }
.page-jumps [aria-current] { border-color: var(--brand); color: var(--text); }

/* ---------- Single article ---------- */
.article-hero { padding-block: 40px 32px; background: radial-gradient(800px 260px at 85% -40%, color-mix(in srgb, var(--brand) 12%, transparent), transparent), var(--bg-2); border-bottom: 1px solid var(--line); }
.article-hero .eyebrow { margin-top: 18px; }
.article-hero h1 { font-size: clamp(26px, 3.8vw, 44px); font-weight: 900; margin-top: 14px; max-width: 920px; line-height: 1.45; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 20px; color: var(--text-3); font-size: 14px; }
.article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.article-meta .icon { width: 16px; height: 16px; }
.article-meta .author { color: var(--text-2); font-weight: 600; }
.article-meta .avatar { width: 32px; height: 32px; border-radius: 50%; }

.article-layout { display: grid; grid-template-columns: minmax(0, 780px); justify-content: center; gap: 48px; padding-block: 40px 24px; }
.article-layout.has-toc { grid-template-columns: 270px minmax(0, 780px); }
.toc { position: relative; }
.toc-box { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 6px 18px 14px; scrollbar-width: thin; }
.toc summary { display: flex; align-items: center; gap: 8px; padding: 12px 0; font-weight: 700; cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary .chev { margin-inline-start: auto; transition: transform .2s; }
.toc details:not([open]) { padding-bottom: 6px; }
.toc details:not([open]) .chev { transform: rotate(90deg); }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.toc li a { display: block; padding: 6px 12px; margin-inline-start: -2px; border-inline-start: 2px solid transparent; color: var(--text-2); font-size: 14px; line-height: 1.7; transition: color .2s, border-color .2s; }
.toc li.lvl-3 a { padding-inline-start: 26px; font-size: 13.5px; color: var(--text-3); }
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--brand); border-inline-start-color: var(--brand); }

.article-cover { margin: 0 0 32px; }
.article-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.article-cover figcaption { margin-top: 10px; font-size: 14px; color: var(--text-3); text-align: center; line-height: 1.8; }

/* Long-form typography */
.prose { font-size: 17.5px; line-height: 2.05; color: color-mix(in srgb, var(--text) 92%, var(--text-2)); overflow-wrap: anywhere; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { font-size: clamp(22px, 2.5vw, 28px); font-weight: 800; margin: 2em 0 .7em; line-height: 1.55; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { font-size: clamp(19px, 2vw, 22px); font-weight: 700; margin: 1.7em 0 .6em; line-height: 1.6; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h4 { font-size: 18px; font-weight: 700; margin: 1.5em 0 .5em; }
.prose h2::before { content: ""; display: block; width: 36px; height: 3px; border-radius: 3px; background: var(--brand); margin-bottom: 14px; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
/* Links added by the internallink plugin (its own stylesheet is dequeued). */
.internallink-link { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; transition: opacity .15s ease; }
.internallink-link:hover { opacity: .75; }
.prose strong, .prose b { color: var(--text); font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-inline-start: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--brand); }
.prose blockquote { margin: 1.8em 0; padding: 18px 22px; border-inline-start: 4px solid var(--brand); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--text-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { border-radius: 14px; margin-inline: auto; }
.prose figure { margin: 1.8em 0; }
.prose figcaption, .prose .wp-caption-text { font-size: 14px; color: var(--text-3); text-align: center; margin-top: 8px; }
.prose .wp-caption { max-width: 100%; }
.prose hr { border: 0; height: 1px; background: var(--line-strong); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.prose pre { direction: ltr; text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; overflow-x: auto; font-size: 14px; line-height: 1.7; margin: 1.6em 0; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
/* Formulas (once LaTeX for MathJax, now plain text with ×, ÷, sub/superscripts). */
.prose .math { unicode-bidi: isolate; font-variant-numeric: lining-nums; }
.prose .math-block { display: block; width: fit-content; max-width: 100%; margin: .4em auto 1.2em; padding: 10px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; text-align: center; line-height: 2; overflow-wrap: anywhere; }
.prose .math sub, .prose .math sup { font-size: .72em; }
/* The site font draws Persian digits; a Latin formula reads better with Latin ones (EMA12, not EMA۱۲). */
.prose .math[dir="ltr"] { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.8; }
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 700; color: var(--text); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose iframe { max-width: 100%; border-radius: 14px; }
.alignleft { float: left; margin: .4em 0 1em 1.4em; }
.alignright { float: right; margin: .4em 1.4em 1em 0; }
.aligncenter { margin-inline: auto; }

.article-tags { margin: 32px 0 0; }
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.author-box .avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.author-label { margin: 0; font-size: 13px; color: var(--text-3); }
.author-name { font-size: 18px; font-weight: 800; line-height: 1.4; margin: 2px 0 6px; }
.author-box p { margin: 0; color: var(--text-2); font-size: 15px; }
.article-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 32px; padding: 28px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); background: radial-gradient(600px 200px at 0% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent), var(--surface); }
.article-cta h2 { font-size: 21px; }
.article-cta p { margin: 6px 0 0; color: var(--text-2); }
.related { padding-top: 48px; border-top: 1px solid var(--line); }
.related-title { font-size: 26px; margin-bottom: 24px; }

/* ---------- Comments & forms ---------- */
.comments { padding-block: 24px 64px; }
.comments-title { font-size: 22px; margin-bottom: 18px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-inline-start: 28px; }
.comment-body { padding: 18px 20px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 13px; color: var(--text-3); }
.comment-content p { margin: 8px 0; color: var(--text-2); }
.reply a { font-size: 13.5px; color: var(--brand); font-weight: 600; }
.comment-respond { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.comment-reply-title { font-size: 19px; margin-bottom: 8px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); outline: 0; transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.comment-form .form-submit .btn { height: 48px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; }
.comment-form-cookies-consent label { margin: 0; }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(64px, 10vw, 120px); text-align: center; }
.code-404 { font-size: clamp(80px, 16vw, 160px); font-weight: 800; line-height: 1; margin: 0; background: linear-gradient(100deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.notfound h1 { font-size: clamp(24px, 3vw, 34px); margin-top: 16px; }
.notfound .search-form { max-width: 560px; margin: 28px auto 0; }
.notfound-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 64px 28px; margin-top: 96px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.foot-title { margin: 0 0 16px; font-size: 15px; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--text-2); font-size: 14.5px; transition: color .2s; }
.footer ul a:hover { color: var(--brand); }
.footer .about p { color: var(--text-2); font-size: 14.5px; margin: 16px 0 18px; max-width: 360px; }
.footer .contact li { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.footer .contact .icon { width: 16px; height: 16px; color: var(--brand); }
.foot-band { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 14.5px; line-height: 1.9; }
.contact-list .icon { width: 17px; height: 17px; margin-top: 5px; color: var(--brand); }
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--brand); }
.contact-label { color: var(--text-3); }
.contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.trust-row { display: flex; align-items: center; gap: 16px; }
.trust-seal { flex: none; display: grid; place-items: center; min-width: 96px; min-height: 96px; padding: 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.trust-seal img { display: block; max-width: 120px; height: auto; }
.trust-row p, .contact-trust p { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.9; }
.trust-row .icon, .contact-trust .icon { color: var(--brand); margin-top: 4px; }

/* Contact page */
.contact-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.contact-action { display: flex; flex-direction: column; gap: 6px; padding: 22px; }
.contact-action b { font-size: 17px; margin-top: 10px; }
.contact-action .ltr { color: var(--text-2); font-size: 14.5px; }
.contact-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.contact-columns h2 { font-size: 20px; margin-bottom: 18px; }
.contact-columns .card:hover { transform: none; }
.contact-trust .trust-seal { margin-bottom: 16px; width: max-content; }
.contact-extra { margin-top: 40px; max-width: 820px; }

.foot-risk { display: flex; gap: 10px; align-items: flex-start; margin: 40px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.9; }
.foot-risk .icon { width: 16px; height: 16px; color: var(--gold); margin-top: 4px; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; }

/* Grid and flex children may shrink below their content's width (code blocks, the chart, long
   words); without this a single wide child stretches the column past the viewport on phones. */
.hero-grid > *, .bento > *, .code-card > *, .robots > *, .faq-grid > *, .posts > *, .steps > *,
.foot-grid > *, .article-layout > *, .svc-grid > *, .proof > *, .section-head > *,
.foot-band > *, .contact-actions > *, .contact-columns > * { min-width: 0; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .article-layout.has-toc { grid-template-columns: minmax(0, 780px); }
  .toc-box { position: static; max-height: none; }
}
@media (max-width: 1024px) {
  .menu-btn { display: grid; }
  /* Drawer slides in from the right (the start side in RTL): off-screen to the right is not
     scrollable in RTL, whereas off-screen to the left would widen the page. */
  .nav {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60; width: min(86vw, 360px); margin: 0;
    padding: 24px 16px; overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--line-strong);
    transform: translateX(105%); visibility: hidden; transition: transform .3s ease, visibility .3s;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav .nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 17px; }
  .nav .nav-cta { display: flex; justify-content: center; width: 100%; margin-top: 20px; padding: 0; font-size: 16px; font-weight: 700; color: var(--brand-ink); background: var(--brand); }
  .nav .menu { flex-direction: column; gap: 2px; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav .sub-menu, .nav .sub-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0; padding-inline-start: 12px; min-width: 0; display: none; }
  .nav li.open > .sub-menu { display: block; }
  .nav .menu-item-has-children > a::after { margin-inline-start: auto; }
  .nav li.open > a::after { transform: rotate(135deg); }
  .hero-grid, .robots, .faq-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-2, .span-4 { grid-column: span 1; }
  .bento .wide { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .posts, .posts.grid-3 { grid-template-columns: 1fr 1fr; }
  .posts .big { grid-column: span 2; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-band, .contact-columns { grid-template-columns: 1fr; }
  .contact-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal { right: 8px; }
}
@media (max-width: 782px) {
  .admin-bar .header { top: 46px; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .section { padding-block: 56px; }
  .section-head { margin-bottom: 28px; }
  .hero { padding-block: 28px 56px; }
  .hero h1 { font-size: 30px; }
  .hero .lead { margin: 16px 0 26px; }
  .hero-points { margin-top: 22px; }
  .card { padding: 22px; }
  .page-hero, .article-hero { padding-block: 24px 24px; }
  .footer { margin-top: 56px; padding-top: 44px; }
  .hide-sm { display: none !important; }
  .header > .wrap { gap: 12px; }
  .header-actions { gap: 6px; }
  .icon-btn { width: 40px; height: 40px; }
  .bento, .steps, .posts, .posts.grid-3, .proof, .foot-grid { grid-template-columns: 1fr; }
  .bento .wide, .posts .big { grid-column: span 1; }
  .code-card { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-actions { grid-template-columns: 1fr 1fr; gap: 10px; }
  .contact-action { padding: 16px; }
  .contact-action .ltr { font-size: 13px; overflow-wrap: anywhere; }
  .trust-row { align-items: flex-start; }
  .proof div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .proof div:first-child { border-top: 0; }
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .term-foot { grid-template-columns: repeat(2, 1fr); }
  .term-foot div:nth-child(3) { border-left: 0; }
  .term-foot div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .signal { display: none; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn, .article-cta .btn { width: 100%; }
  #chart { height: 200px; }
  .prose { font-size: 16.5px; line-height: 2; }
  .search-form .btn { padding-inline: 14px; }
  .author-box { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .header, .footer, .toc, .article-cta, .related, .comments, .nav-backdrop { display: none !important; }
  body { background: #fff; color: #000; }
}
