/* EMKAN AI v25 — final navigation parity + geometry + responsive layer. */
/* Navigation: Assistant must use exactly the same visual metrics as ordinary nav. */
html body .primary-nav .nav-list>li>.nav-link.emkan-ai-nav-link,
html body .primary-nav .nav-list>li>.nav-link.emkan-ai-nav-link.is-current{
  display:inline-block!important;color:var(--menu-text)!important;text-decoration:none!important;white-space:nowrap!important;
  font-family:var(--font-en)!important;font-size:clamp(11px,.91vw,14px)!important;font-weight:400!important;
  line-height:1.25!important;letter-spacing:normal!important;text-indent:0!important;padding:0!important;margin:0!important;transform:none!important;
}
:is(html[lang="fa"],html[lang="ar"]) body .primary-nav .nav-list>li>.nav-link.emkan-ai-nav-link,
:is(html[lang="fa"],html[lang="ar"]) body .primary-nav .nav-list>li>.nav-link.emkan-ai-nav-link.is-current{
  font-family:var(--font-fa)!important;font-size:clamp(12px,.94vw,14.5px)!important;letter-spacing:0!important;text-indent:0!important;
}
html body .primary-menu .menu-item.emkan-ai-nav-link{
  font-family:inherit!important;font-size:inherit!important;font-weight:400!important;line-height:inherit!important;letter-spacing:inherit!important;text-indent:0!important;
}
html body .emkan-ai-nav-star{display:none!important}

html body.emkan-ai-page .emkan-ai-main{width:min(960px,calc(100% - 44px))!important;margin:30px auto 0!important;padding:0 0 54px!important}
html body.emkan-ai-page .emkan-ai-stage{display:block!important;width:100%!important;min-height:0!important;height:auto!important;margin:0!important;padding:0!important}
html body.emkan-ai-page .emkan-ai-overview{
  direction:ltr!important;display:grid!important;width:min(100%,900px)!important;min-height:0!important;height:auto!important;
  margin:0 auto!important;padding:22px 0 14px!important;align-items:center!important;gap:26px!important;border:0!important;box-sizing:border-box!important;
}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-overview{grid-template-columns:minmax(300px,.9fr) minmax(410px,1.1fr)!important;grid-template-areas:"detail process"!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-overview{grid-template-columns:minmax(410px,1.1fr) minmax(300px,.9fr)!important;grid-template-areas:"process detail"!important}
html body.emkan-ai-page .emkan-ai-process{grid-area:process!important;position:relative!important;display:flex!important;flex-direction:column!important;width:100%!important;max-width:470px!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;align-self:center!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process{direction:rtl!important;justify-self:end!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process{direction:ltr!important;justify-self:start!important}
/* 6px diamond centred at 4px; spine is exactly x=4px. */
html body.emkan-ai-page .emkan-ai-process::before{content:""!important;position:absolute!important;z-index:0!important;top:17px!important;bottom:17px!important;width:1px!important;background:var(--line)!important;pointer-events:none!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process::before{right:4px!important;left:auto!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process::before{left:4px!important;right:auto!important}
html body.emkan-ai-page .emkan-ai-process-step{position:relative!important;display:block!important;width:100%!important;height:34px!important;min-height:34px!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-sizing:border-box!important}
html body.emkan-ai-page .emkan-ai-process-step>i{position:absolute!important;z-index:2!important;top:50%!important;width:6px!important;height:6px!important;margin:0!important;border:1px solid var(--category-muted,var(--fg))!important;background:var(--bg)!important;border-radius:0!important;transform:translateY(-50%) rotate(45deg)!important;box-sizing:border-box!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process-step>i{right:1px!important;left:auto!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process-step>i{left:1px!important;right:auto!important}
html body.emkan-ai-page .emkan-ai-process-step>div{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;column-gap:10px!important;height:100%!important;min-width:0!important;margin:0!important;padding:0!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process-step>div{direction:rtl!important;margin-right:14px!important;margin-left:0!important;text-align:right!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process-step>div{direction:ltr!important;margin-left:14px!important;margin-right:0!important;text-align:left!important}
html body.emkan-ai-page .emkan-ai-process-step strong{display:block!important;margin:0!important;color:var(--fg)!important;font-size:10.5px!important;font-weight:540!important;line-height:1.5!important;white-space:nowrap!important}
html body.emkan-ai-page .emkan-ai-process-step small{display:block!important;min-width:0!important;margin:0!important;color:var(--category-muted,var(--fg))!important;font-size:8.55px!important;font-weight:400!important;line-height:1.5!important;white-space:normal!important}
html body.emkan-ai-page .emkan-ai-process-step.is-active>i{background:var(--hover-accent)!important;border-color:var(--hover-accent)!important}
html body.emkan-ai-page .emkan-ai-process-step.is-active strong{color:var(--hover-accent)!important}
html body.emkan-ai-page .emkan-ai-process-detail{grid-area:detail!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process-detail{direction:rtl!important;text-align:right!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process-detail{direction:ltr!important;text-align:left!important}
html body.emkan-ai-page #aiProcessDetail{display:block!important;width:100%!important;max-width:43ch!important;margin:0!important;color:var(--caption-sub,var(--fg))!important;font-size:11.2px!important;font-weight:420!important;line-height:1.95!important;letter-spacing:0!important}
html body.emkan-ai-page .emkan-ai-workspace{width:100%!important;min-height:0!important;margin-top:10px!important;padding-top:0!important}
html body.emkan-ai-page .emkan-ai-tabs{margin-top:8px!important}

@media(max-width:900px){
  html body.emkan-ai-page .emkan-ai-main{width:min(100% - 32px,900px)!important;margin-top:24px!important}
  html body.emkan-ai-page .emkan-ai-overview{width:min(100%,760px)!important;gap:20px!important}
  html[dir="rtl"] body.emkan-ai-page .emkan-ai-overview{grid-template-columns:minmax(240px,.86fr) minmax(330px,1.14fr)!important}
  html[dir="ltr"] body.emkan-ai-page .emkan-ai-overview{grid-template-columns:minmax(330px,1.14fr) minmax(240px,.86fr)!important}
}
@media(max-width:760px){
  html body.emkan-ai-page .emkan-ai-main{width:calc(100% - 24px)!important;max-width:720px!important;margin:18px auto 0!important;padding-bottom:38px!important}
  html body.emkan-ai-page .emkan-ai-overview{grid-template-columns:1fr!important;grid-template-areas:"process" "detail"!important;width:100%!important;gap:14px!important;padding:14px 0 10px!important}
  html body.emkan-ai-page .emkan-ai-process{max-width:100%!important;justify-self:stretch!important}
  html body.emkan-ai-page .emkan-ai-process-step{height:38px!important;min-height:38px!important}
  html body.emkan-ai-page .emkan-ai-process::before{top:19px!important;bottom:19px!important}
  html body.emkan-ai-page .emkan-ai-process-step>div{grid-template-columns:1fr!important;row-gap:2px!important;align-content:center!important}
  html body.emkan-ai-page .emkan-ai-process-detail{padding-inline:14px!important}
  html body.emkan-ai-page #aiProcessDetail{max-width:100%!important;font-size:10.8px!important;line-height:1.9!important}
  html body.emkan-ai-page .emkan-ai-workspace{margin-top:14px!important}
  html body.emkan-ai-page .emkan-ai-tabs{margin-top:10px!important}
}


/* ===== v26 authoritative tree geometry ===== */
html body.emkan-ai-page .emkan-ai-process{--emkan-ai-axis:4px;--emkan-ai-diamond:6px}
html body.emkan-ai-page .emkan-ai-process::before{top:16px!important;bottom:16px!important;width:1px!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process::before{right:var(--emkan-ai-axis)!important;left:auto!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process::before{left:var(--emkan-ai-axis)!important;right:auto!important}
html body.emkan-ai-page .emkan-ai-process-step{height:32px!important;min-height:32px!important}
html body.emkan-ai-page .emkan-ai-process-step>i{top:50%!important;width:var(--emkan-ai-diamond)!important;height:var(--emkan-ai-diamond)!important;transform:translateY(-50%) rotate(45deg)!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process-step>i{right:calc(var(--emkan-ai-axis) - (var(--emkan-ai-diamond) / 2))!important;left:auto!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process-step>i{left:calc(var(--emkan-ai-axis) - (var(--emkan-ai-diamond) / 2))!important;right:auto!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process-step>div{margin-right:16px!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process-step>div{margin-left:16px!important}
html body.emkan-ai-page .emkan-ai-workspace{margin-top:18px!important}
html body.emkan-ai-page .emkan-ai-tabs{margin-top:12px!important}
@media(max-width:760px){html body.emkan-ai-page .emkan-ai-process-step{height:36px!important;min-height:36px!important}html body.emkan-ai-page .emkan-ai-process::before{top:18px!important;bottom:18px!important}}

/* ===== v27: real axis element; pseudo spine is disabled to end legacy offset conflicts. ===== */
html body.emkan-ai-page .emkan-ai-process::before{content:none!important;display:none!important}
html body.emkan-ai-page .emkan-ai-process{--emkan-ai-v27-axis:4px;--emkan-ai-v27-diamond:6px;position:relative!important}
html body.emkan-ai-page .emkan-ai-v27-axis{
  position:absolute!important;z-index:0!important;top:16px!important;bottom:16px!important;width:1px!important;
  background:var(--line)!important;pointer-events:none!important;display:block!important;
}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-v27-axis{right:var(--emkan-ai-v27-axis)!important;left:auto!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-v27-axis{left:var(--emkan-ai-v27-axis)!important;right:auto!important}
html body.emkan-ai-page .emkan-ai-process-step{height:32px!important;min-height:32px!important;padding:0!important;margin:0!important;position:relative!important}
html body.emkan-ai-page .emkan-ai-process-step>i{
  position:absolute!important;z-index:2!important;top:50%!important;width:var(--emkan-ai-v27-diamond)!important;height:var(--emkan-ai-v27-diamond)!important;
  margin:0!important;border:1px solid var(--category-muted,var(--fg))!important;border-radius:0!important;background:var(--bg)!important;
  transform:translateY(-50%) rotate(45deg)!important;box-sizing:border-box!important;
}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process-step>i{right:calc(var(--emkan-ai-v27-axis) - (var(--emkan-ai-v27-diamond)/2))!important;left:auto!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process-step>i{left:calc(var(--emkan-ai-v27-axis) - (var(--emkan-ai-v27-diamond)/2))!important;right:auto!important}
html[dir="rtl"] body.emkan-ai-page .emkan-ai-process-step>div{margin-right:16px!important;margin-left:0!important}
html[dir="ltr"] body.emkan-ai-page .emkan-ai-process-step>div{margin-left:16px!important;margin-right:0!important}
html body.emkan-ai-page .emkan-ai-process-detail{max-width:none!important}
html body.emkan-ai-page #aiProcessDetail{max-width:44ch!important}
html body.emkan-ai-page .emkan-ai-workspace{margin-top:20px!important}
@media(max-width:760px){
  html body.emkan-ai-page .emkan-ai-v27-axis{top:18px!important;bottom:18px!important}
  html body.emkan-ai-page .emkan-ai-process-step{height:36px!important;min-height:36px!important}
  html body.emkan-ai-page #aiProcessDetail{max-width:100%!important}
}


/* ===== EMKAN AI v29 — runtime-measured spine ===== */
html body.emkan-ai-page .emkan-ai-process::before{content:none!important;display:none!important}
html body.emkan-ai-page .emkan-ai-v27-axis{
  right:auto!important;
  transform:translateX(-.5px)!important;
  width:1px!important;
  z-index:1!important;
}
html body.emkan-ai-page .emkan-ai-process-step>i{z-index:2!important}
